From 4873e8ab12aec300fd159d04c316a796bba19c25 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Tue, 9 Feb 2016 14:34:27 -0500 Subject: [PATCH] update nxos_template doc strings and return values This updates the nxos_template doc string to unify the return values across all network modules. This change now returns stdout, stdout_lines and failed_conditionals --- lib/ansible/modules/network/nxos/nxos_template.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_template.py b/lib/ansible/modules/network/nxos/nxos_template.py index 024fcadc404..7003b21caa8 100644 --- a/lib/ansible/modules/network/nxos/nxos_template.py +++ b/lib/ansible/modules/network/nxos/nxos_template.py @@ -80,7 +80,6 @@ options: """ EXAMPLES = """ - - name: push a configuration onto the device nxos_template: src: config.j2 @@ -94,17 +93,20 @@ EXAMPLES = """ nxos_template: src: candidate_config.txt config: current_config.txt - """ RETURN = """ - -commands: +updates: description: The set of commands that will be pushed to the remote device returned: always 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): @@ -184,9 +186,10 @@ def main(): if not module.check_mode: commands = [str(c).strip() for c in commands] response = module.configure(commands) + result['responses'] = response result['changed'] = True - result['commands'] = commands + result['updates'] = commands return module.exit_json(**result) from ansible.module_utils.basic import *