mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string Added deprecation warning to moduledev.rst and remove deprecated example from it Fixed up a few typos and uppercased some acronyms. add consistency to how EXAMPLES are formatted
This commit is contained in:
@@ -73,19 +73,23 @@ options:
|
||||
description:
|
||||
- all arguments accepted by the M(file) module also work here
|
||||
required: false
|
||||
examples:
|
||||
- code: "copy: src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644"
|
||||
description: "Example from Ansible Playbooks"
|
||||
- code: "copy: src=/mine/ntp.conf dest=/etc/ntp.conf owner=root group=root mode=644 backup=yes"
|
||||
description: "Copy a new C(ntp.conf) file into place, backing up the original if it differs from the copied version"
|
||||
- code: "copy: src=/mine/sudoers dest=/etc/sudoers validate='visudo -c %s'"
|
||||
description: "Copy a new C(sudoers) file into place, after passing validation with visudo"
|
||||
author: Michael DeHaan
|
||||
notes:
|
||||
- The "copy" module can't be used to recursively copy directory structures to the target machine. Please see the
|
||||
"Delegation" section of the Advanced Playbooks documentation for a better approach to recursive copies.
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Example from Ansible Playbooks
|
||||
- copy: src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644
|
||||
|
||||
# Copy a new "ntp.conf file into place, backing up the original if it differs from the copied version
|
||||
- copy: src=/mine/ntp.conf dest=/etc/ntp.conf owner=root group=root mode=644 backup=yes
|
||||
|
||||
# Copy a new "sudoers" file into place, after passing validation with visudo
|
||||
- copy: src=/mine/sudoers dest=/etc/sudoers validate='visudo -c %s'
|
||||
'''
|
||||
|
||||
def main():
|
||||
|
||||
module = AnsibleModule(
|
||||
|
||||
Reference in New Issue
Block a user