From b76b3de28ef810fc09ada4e4ac76ec8f4caa68d7 Mon Sep 17 00:00:00 2001 From: John Barker Date: Mon, 12 Sep 2016 16:16:07 +0100 Subject: [PATCH] Document `backup` options To make future diffing easier, use consistent ordering --- network/eos/eos_config.py | 19 +++++++++++++++---- network/ios/ios_config.py | 4 ++-- network/nxos/nxos_config.py | 12 +++++++++++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/network/eos/eos_config.py b/network/eos/eos_config.py index a91d54653b2..9137946ca42 100644 --- a/network/eos/eos_config.py +++ b/network/eos/eos_config.py @@ -15,6 +15,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . # + DOCUMENTATION = """ --- module: eos_config @@ -108,6 +109,17 @@ options: required: false default: false choices: ['yes', 'no'] + backup: + description: + - This argument will cause the module to create a full backup of + the current C(running-config) from the remote device before any + changes are made. The backup file is written to the C(backup) + folder in the playbook root directory. If the directory does not + exist, it is created. + required: false + default: no + choices: ['yes', 'no'] + version_added: "2.2" config: description: - The module, by default, will connect to the remote device and @@ -270,11 +282,11 @@ def main(): """ main entry point for module execution """ argument_spec = dict( + src=dict(type='path'), + lines=dict(aliases=['commands'], type='list'), parents=dict(type='list'), - src=dict(type='path'), - before=dict(type='list'), after=dict(type='list'), @@ -285,11 +297,10 @@ def main(): # it will be removed in a future version force=dict(default=False, type='bool'), - backup=dict(type='bool', default=False), - config=dict(), defaults=dict(type='bool', default=False), + backup=dict(type='bool', default=False), save=dict(default=False, type='bool'), ) diff --git a/network/ios/ios_config.py b/network/ios/ios_config.py index 426c3183db0..b4bce06758f 100644 --- a/network/ios/ios_config.py +++ b/network/ios/ios_config.py @@ -63,7 +63,7 @@ options: a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched - against the system + against the system. required: false default: null after: @@ -322,8 +322,8 @@ def main(): config=dict(), default=dict(type='bool', default=False), - save=dict(type='bool', default=False), backup=dict(type='bool', default=False), + save=dict(default=False, type='bool'), ) mutually_exclusive = [('lines', 'src')] diff --git a/network/nxos/nxos_config.py b/network/nxos/nxos_config.py index a8c993ec792..ab628fa7926 100644 --- a/network/nxos/nxos_config.py +++ b/network/nxos/nxos_config.py @@ -112,6 +112,17 @@ options: required: false default: false choices: [ "true", "false" ] + backup: + description: + - This argument will cause the module to create a full backup of + the current C(running-config) from the remote device before any + changes are made. The backup file is written to the C(backup) + folder in the playbook root directory. If the directory does not + exist, it is created. + required: false + default: no + choices: ['yes', 'no'] + version_added: "2.2" config: description: - The module, by default, will connect to the remote device and @@ -146,7 +157,6 @@ options: version_added: "2.2" """ - EXAMPLES = """ # Note: examples below use the following provider dict to handle # transport and authentication to the node.