minor bugfixes for junos_config return values
The junos_config now properly returns updates and reponses
This commit is contained in:
parent
7901f54140
commit
7a19e16dca
1 changed files with 4 additions and 9 deletions
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue