Merge pull request #4798 from gundalow/docs_backup

Document `backup` option in eos_config and nxos_config
This commit is contained in:
Peter Sprygada 2016-09-16 07:45:50 -04:00 committed by GitHub
commit e927fa73d5
3 changed files with 26 additions and 6 deletions

View file

@ -111,6 +111,17 @@ options:
required: false required: false
default: false default: false
choices: ['yes', 'no'] 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: config:
description: description:
- The module, by default, will connect to the remote device and - The module, by default, will connect to the remote device and
@ -273,11 +284,11 @@ def main():
""" main entry point for module execution """ main entry point for module execution
""" """
argument_spec = dict( argument_spec = dict(
src=dict(type='path'),
lines=dict(aliases=['commands'], type='list'), lines=dict(aliases=['commands'], type='list'),
parents=dict(type='list'), parents=dict(type='list'),
src=dict(type='path'),
before=dict(type='list'), before=dict(type='list'),
after=dict(type='list'), after=dict(type='list'),
@ -288,11 +299,10 @@ def main():
# it will be removed in a future version # it will be removed in a future version
force=dict(default=False, type='bool'), force=dict(default=False, type='bool'),
backup=dict(type='bool', default=False),
config=dict(), config=dict(),
defaults=dict(type='bool', default=False), defaults=dict(type='bool', default=False),
backup=dict(type='bool', default=False),
save=dict(default=False, type='bool'), save=dict(default=False, type='bool'),
) )

View file

@ -322,8 +322,8 @@ def main():
config=dict(), config=dict(),
defaults=dict(type='bool', default=False), defaults=dict(type='bool', default=False),
save=dict(type='bool', default=False),
backup=dict(type='bool', default=False), backup=dict(type='bool', default=False),
save=dict(default=False, type='bool'),
) )
mutually_exclusive = [('lines', 'src')] mutually_exclusive = [('lines', 'src')]

View file

@ -111,6 +111,17 @@ options:
required: false required: false
default: false default: false
choices: [ "true", "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: config:
description: description:
- The module, by default, will connect to the remote device and - The module, by default, will connect to the remote device and
@ -145,7 +156,6 @@ options:
version_added: "2.2" version_added: "2.2"
""" """
EXAMPLES = """ EXAMPLES = """
# Note: examples below use the following provider dict to handle # Note: examples below use the following provider dict to handle
# transport and authentication to the node. # transport and authentication to the node.