Change example syntax on template module
This commit is contained in:
parent
a1b945a23e
commit
f71134cb98
1 changed files with 19 additions and 6 deletions
|
@ -79,11 +79,24 @@ extends_documentation_fragment: validate
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Example from Ansible Playbooks
|
# Example from Ansible Playbooks
|
||||||
- template: src=/mytemplates/foo.j2 dest=/etc/file.conf owner=bin group=wheel mode=0644
|
- template:
|
||||||
|
src: /mytemplates/foo.j2
|
||||||
|
dest: /etc/file.conf
|
||||||
|
owner: bin
|
||||||
|
group: wheel
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
# The same example, but using symbolic modes equivalent to 0644
|
# The same example, but using symbolic modes equivalent to 0644
|
||||||
- template: src=/mytemplates/foo.j2 dest=/etc/file.conf owner=bin group=wheel mode="u=rw,g=r,o=r"
|
- template:
|
||||||
|
src: /mytemplates/foo.j2
|
||||||
|
dest: /etc/file.conf
|
||||||
|
owner: bin
|
||||||
|
group: wheel
|
||||||
|
mode: "u=rw,g=r,o=r"
|
||||||
|
|
||||||
# Copy a new "sudoers" file into place, after passing validation with visudo
|
# Copy a new "sudoers" file into place, after passing validation with visudo
|
||||||
- template: src=/mine/sudoers dest=/etc/sudoers validate='visudo -cf %s'
|
- template:
|
||||||
|
src: /mine/sudoers
|
||||||
|
dest: /etc/sudoers
|
||||||
|
validate: 'visudo -cf %s'
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue