Skip to content

Commit bbd5154

Browse files
committed
Documentation update for v0.1.
1 parent d1ac779 commit bbd5154

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

docs/building_a_deploy.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ arguments:
348348
349349
@hook.before_connect
350350
def my_callback(data, state):
351-
print 'Before connect hook!'
351+
print('Before connect hook!')
352352
353353
To abort a deploy, a hook can raise a ``hook.Error`` which the CLI
354354
will handle.

docs/getting_started.rst

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This guide should help describe the basics of deploying stuff with pyinfra.
77
Install
88
-------
99

10-
pyinfra requires `Python <https://python.org>`_ and can be installed with ``pip``:
10+
pyinfra requires `Python <https://python.org>`_ and can be installed with `pip <https://pip.pypa.io/en/stable/>`_:
1111

1212
.. code:: bash
1313
@@ -18,9 +18,9 @@ pyinfra requires `Python <https://python.org>`_ and can be installed with ``pip`
1818
Usage:
1919
pyinfra -i INVENTORY DEPLOY [-v -vv options]
2020
pyinfra -i INVENTORY --run OP ARGS [-v -vv options]
21-
pyinfra -i INVENTORY --fact FACT [-v options]
22-
pyinfra -i INVENTORY [DEPLOY] --debug-data [options]
23-
pyinfra (--facts | --help | --version)
21+
pyinfra -i INVENTORY --run COMMAND [-v -vv options]
22+
pyinfra -i INVENTORY --fact FACT [-vv options]
23+
...
2424
2525
2626
Command Line Ops
@@ -29,8 +29,7 @@ Command Line Ops
2929
To deploy something with pyinfra, you need an **inventory** and some **operations**:
3030

3131
+ **The inventory** holds the target hosts, groups and any data associated with them
32-
+ **The operations** define the desired state of the target hosts, and are grouped as
33-
**modules**
32+
+ **The operations** define the desired state of the target hosts, and are grouped as **modules**
3433

3534
Lets start by running a deploy that will ensure user "fred" exists, using the ``server.user`` operation:
3635

docs/modules/server.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Manage system users & their ssh `authorized_keys`. Options:
5656
.. code:: python
5757
5858
server.user(
59-
name, present=True, home=None, shell=None,
60-
group=None, groups=None, public_keys=None, ensure_home=True, system=False
59+
name, present=True, home=None, shell=None, group=None,
60+
groups=None, public_keys=None, delete_keys=False, ensure_home=True, system=False
6161
)
6262
6363
+ **name**: name of the user to ensure
@@ -67,12 +67,13 @@ Manage system users & their ssh `authorized_keys`. Options:
6767
+ **group**: the users primary group
6868
+ **groups**: the users secondary groups
6969
+ **public_keys**: list of public keys to attach to this user, ``home`` must be specified
70+
+ **delete_keys**: whether to remove any keys not specified in ``public_keys``
7071
+ **ensure_home**: whether to ensure the ``home`` directory exists
7172
+ **system**: whether to create a system account
7273

7374
Home directory:
7475
When ``ensure_home`` or ``public_keys`` are provided, ``home`` defaults to
75-
``/home/{name}``
76+
``/home/{name}``.
7677

7778

7879
:code:`server.wait`

0 commit comments

Comments
 (0)