Examples syntax batch4 (#5620)

* Change example syntax on authorized_key module

* Change example syntax on cron module

* Change example syntax on group module

* Change example syntax on hostname module

* Change example syntax on seboolean module

* Change example syntax on selinux module

* Change example syntax on service module

* Change example syntax on sysctl module

* Change example syntax on systemd module

* Change example syntax on user module

* Change example syntax on debug module

* Change example syntax on fail module

* Change example syntax on include module

* Change example syntax on include_role module

* Change example syntax on include_vars module

* Change example syntax on pause module

* Change example syntax on wait_for module

* Change example syntax on apache2_module module

* > Change example syntax on django_manage module

* Change example syntax on htpasswd module
This commit is contained in:
Sam Doran 2016-11-15 15:21:47 -05:00 committed by Matt Clay
commit b56a9852ee
20 changed files with 261 additions and 87 deletions

View file

@ -159,7 +159,7 @@ options:
default: rsa
version_added: "0.9"
description:
- Optionally specify the type of SSH key to generate.
- Optionally specify the type of SSH key to generate.
Available SSH key types will depend on implementation
present on target host.
ssh_key_file:
@ -200,19 +200,38 @@ options:
EXAMPLES = '''
# Add the user 'johnd' with a specific uid and a primary group of 'admin'
- user: name=johnd comment="John Doe" uid=1040 group=admin
- user:
name: johnd
comment: "John Doe"
uid: 1040
group: admin
# Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups
- user: name=james shell=/bin/bash groups=admins,developers append=yes
- user:
name: james
shell: /bin/bash
groups: admins,developers
append: yes
# Remove the user 'johnd'
- user: name=johnd state=absent remove=yes
- user:
name: johnd
state: absent
remove: yes
# Create a 2048-bit SSH key for user jsmith in ~jsmith/.ssh/id_rsa
- user: name=jsmith generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
- user:
name: jsmith
generate_ssh_key: yes
ssh_key_bits: 2048
ssh_key_file: .ssh/id_rsa
# added a consultant whose account you want to expire
- user: name=james18 shell=/bin/zsh groups=developers expires=1422403387
- user:
name: james18
shell: /bin/zsh
groups: developers
expires: 1422403387
'''
import os