From e12f3d40290592aa4a9fe52c14a827e07e8fd53c Mon Sep 17 00:00:00 2001 From: Romeo Theriault Date: Sun, 9 Sep 2012 18:12:27 -1000 Subject: [PATCH 1/2] add backup option to the copy modules docs --- rst/modules/copy.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rst/modules/copy.rst b/rst/modules/copy.rst index 41811997d0..3b534d850e 100644 --- a/rst/modules/copy.rst +++ b/rst/modules/copy.rst @@ -15,9 +15,16 @@ module. +--------------------+----------+---------+----------------------------------------------------------------------------+ | 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 | +--------------------+----------+---------+----------------------------------------------------------------------------+ Example action from Ansible :doc:`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=/srv/myfiles/ntp.conf dest=/etc/ntp.conf owner=root group=root mode=644 backup=yes From cf9d7cd68ea7a5db0a094a38ef701b077a836367 Mon Sep 17 00:00:00 2001 From: Romeo Theriault Date: Mon, 10 Sep 2012 17:26:18 -1000 Subject: [PATCH 2/2] added backup option to the assemble,lineinfile and template module docs --- rst/modules/assemble.rst | 3 +++ rst/modules/lineinfile.rst | 3 +++ rst/modules/template.rst | 3 +++ 3 files changed, 9 insertions(+) diff --git a/rst/modules/assemble.rst b/rst/modules/assemble.rst index 160d2cd415..2f20bca15f 100644 --- a/rst/modules/assemble.rst +++ b/rst/modules/assemble.rst @@ -20,6 +20,9 @@ sorting order. Puppet calls this idea "fragments". +--------------------+----------+---------+----------------------------------------------------------------------------+ | dest | yes | | A file to create using the concatenation of all of the source files | +--------------------+----------+---------+----------------------------------------------------------------------------+ +| 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 that the file module takes may also be used | +--------------------+----------+---------+----------------------------------------------------------------------------+ diff --git a/rst/modules/lineinfile.rst b/rst/modules/lineinfile.rst index 156c7d5e6f..ab28492843 100644 --- a/rst/modules/lineinfile.rst +++ b/rst/modules/lineinfile.rst @@ -30,6 +30,9 @@ For other cases, see the copy or template modules. | | | | inserting the line at the beginning of the file, and EOF for inserting the | | | | | line at the end of the file. | +--------------------+----------+---------+----------------------------------------------------------------------------+ +| 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. | ++--------------------+----------+---------+----------------------------------------------------------------------------+ Example action from Ansible :doc:`playbooks`:: diff --git a/rst/modules/template.rst b/rst/modules/template.rst index a121c585e8..597c271fe9 100644 --- a/rst/modules/template.rst +++ b/rst/modules/template.rst @@ -13,6 +13,9 @@ Templates a file out to a remote server. +--------------------+----------+---------+----------------------------------------------------------------------------+ | dest | yes | | Location to render the template on the remote server | +--------------------+----------+---------+----------------------------------------------------------------------------+ +| 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 | | | This module also supports all of the arguments to the file module | +--------------------+----------+---------+----------------------------------------------------------------------------+