From 8813b4f03db99309a6d1d0895a5ebad858a0a073 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Mon, 19 Jun 2017 11:59:40 +0100 Subject: [PATCH] Update docs based on 23946 (#25860) * Update docs based on 23946 Original PR https://github.com/ansible/ansible/pull/23946 * files/copy.py is now clean --- lib/ansible/modules/files/copy.py | 10 +++++++++- test/sanity/pep8/legacy-files.txt | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/files/copy.py b/lib/ansible/modules/files/copy.py index aa390b2a7b2..69179504c0c 100644 --- a/lib/ansible/modules/files/copy.py +++ b/lib/ansible/modules/files/copy.py @@ -29,7 +29,9 @@ module: copy version_added: "historical" short_description: Copies files to remote locations. description: - - The C(copy) module copies a file on the local box to remote locations. Use the M(fetch) module to copy files from remote locations to the local box. If you need variable interpolation in copied files, use the M(template) module. + - The C(copy) module copies a file from the local or remote machine to a location on the remote machine. + Use the M(fetch) module to copy files from remote locations to the local box. + If you need variable interpolation in copied files, use the M(template) module. options: src: description: @@ -144,6 +146,12 @@ EXAMPLES = ''' src: /mine/sudoers dest: /etc/sudoers validate: 'visudo -cf %s' + +# Copy a "sudoers" file on the remote machine for editing +- copy: + remote_src: true + src: /etc/sudoers + dest: /etc/sudoers.edit ''' RETURN = ''' diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index b48824c8f0e..1c240077db8 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -118,7 +118,6 @@ lib/ansible/modules/database/postgresql/postgresql_user.py lib/ansible/modules/database/vertica/vertica_user.py lib/ansible/modules/files/acl.py lib/ansible/modules/files/archive.py -lib/ansible/modules/files/copy.py lib/ansible/modules/files/synchronize.py lib/ansible/modules/files/tempfile.py lib/ansible/modules/files/unarchive.py