diff options
author | Peter Sprygada <psprygada@ansible.com> | 2016-02-20 15:58:19 -0500 |
---|---|---|
committer | Peter Sprygada <psprygada@ansible.com> | 2016-02-23 12:45:41 -0500 |
commit | 72540d1f0c90ffa8bda443b460b09849430e4a88 (patch) | |
tree | 67c6d66a3a71cc632e34260d1f638d2a479b6ac3 | |
parent | 8a3490f448e2970410fbc992de03b3f08d7c4f27 (diff) | |
download | ansible-modules-core-stable-2.0-network.tar.gz |
minor bugfixes for junos_config return valuesstable-2.0-network
The junos_config now properly returns updates and reponses
-rw-r--r-- | network/junos/junos_config.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/network/junos/junos_config.py b/network/junos/junos_config.py index 5b5daf57..ef7a5f04 100644 --- a/network/junos/junos_config.py +++ b/network/junos/junos_config.py @@ -82,19 +82,17 @@ EXAMPLES = """ """ RETURN = """ - -lines: +updates: description: The set of commands that will be pushed to the remote device returned: always type: list sample: ['...', '...'] -response: +responses: description: The set of responses from issuing the commands on the device returned: always type: list sample: ['...', '...'] - """ import re import itertools @@ -137,7 +135,6 @@ def main(): config = to_lines(parsed) result = dict(changed=False) - result['_config'] = config candidate = list() for line in lines: @@ -158,8 +155,6 @@ def main(): candidate.append(line) break - - if candidate: if before: candidate[:0] = before @@ -169,10 +164,10 @@ def main(): if not module.check_mode: response = module.configure(candidate) - result['response'] = response + result['responses'] = response result['changed'] = True - result['lines'] = candidate + result['updates'] = candidate return module.exit_json(**result) from ansible.module_utils.basic import * |