mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-12 08:00:51 -07:00
add backup option to the copy modules docs
This commit is contained in:
parent
df779decf6
commit
e12f3d4029
1 changed files with 7 additions and 0 deletions
|
@ -15,9 +15,16 @@ module.
|
||||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||||
| dest | yes | | Remote absolute path where the file should end up |
|
| dest | yes | | Remote absolute path where the file should end up |
|
||||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||||
|
| backup | no | no | Create a backup file including the timestamp information so you can |
|
||||||
|
| | | | get the original file back if you somehow clobbered it incorrectly. |
|
||||||
|
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||||
| OTHERS | | | All arguments the file module takes are also supported |
|
| OTHERS | | | All arguments the file module takes are also supported |
|
||||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||||
|
|
||||||
Example action from Ansible :doc:`playbooks`::
|
Example action from Ansible :doc:`playbooks`::
|
||||||
|
|
||||||
copy src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644
|
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=/srv/myfiles/ntp.conf dest=/etc/ntp.conf owner=root group=root mode=644 backup=yes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue