update ios_template doc strings and return values
Sets the return values from ios_template to be consistent with the rest of the network modules. Return values are now updates and responses
This commit is contained in:
parent
d33b840ec6
commit
25d724a88d
1 changed files with 9 additions and 7 deletions
|
@ -90,7 +90,6 @@ options:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
|
|
||||||
- name: push a configuration onto the device
|
- name: push a configuration onto the device
|
||||||
net_config:
|
net_config:
|
||||||
src: config.j2
|
src: config.j2
|
||||||
|
@ -104,18 +103,20 @@ EXAMPLES = """
|
||||||
net_config:
|
net_config:
|
||||||
src: candidate_config.txt
|
src: candidate_config.txt
|
||||||
config: current_config.txt
|
config: current_config.txt
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = """
|
||||||
|
updates:
|
||||||
commands:
|
|
||||||
description: The set of commands that will be pushed to the remote device
|
description: The set of commands that will be pushed to the remote device
|
||||||
returned: always
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
sample: [...]
|
sample: ['...', '...']
|
||||||
|
|
||||||
|
responses:
|
||||||
|
description: The set of responses from issuing the commands on the device
|
||||||
|
retured: when not check_mode
|
||||||
|
type: list
|
||||||
|
sample: ['...', '...']
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def compare(this, other, ignore_missing=False):
|
def compare(this, other, ignore_missing=False):
|
||||||
|
@ -202,9 +203,10 @@ def main():
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
commands = [str(c).strip() for c in commands]
|
commands = [str(c).strip() for c in commands]
|
||||||
response = module.configure(commands)
|
response = module.configure(commands)
|
||||||
|
result['responses'] = response
|
||||||
result['changed'] = True
|
result['changed'] = True
|
||||||
|
|
||||||
result['commands'] = commands
|
result['updates'] = commands
|
||||||
return module.exit_json(**result)
|
return module.exit_json(**result)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue