mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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 = '''
|
||||
# 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
|
||||
- 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
|
||||
- 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