|
|
@ -111,18 +111,17 @@ EXAMPLES = """
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
RETURN = """
|
|
|
|
RETURN = """
|
|
|
|
rpc:
|
|
|
|
diff:
|
|
|
|
description: load-configuration RPC send to the device
|
|
|
|
description: Configuration difference before and after applying change.
|
|
|
|
returned: when configuration is changed on device
|
|
|
|
returned: when configuration is changed.
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
sample: >
|
|
|
|
sample: >
|
|
|
|
<system>
|
|
|
|
[edit system syslog]
|
|
|
|
<syslog>
|
|
|
|
+ [edit system syslog]
|
|
|
|
<console replace=\"replace\" active=\"active\">
|
|
|
|
file interactive-commands { ... }
|
|
|
|
<name>pfe</name><error/>
|
|
|
|
+ file test {
|
|
|
|
</console>
|
|
|
|
+ pfe critical;
|
|
|
|
</syslog>
|
|
|
|
+ }
|
|
|
|
</system>
|
|
|
|
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
import collections
|
|
|
|
import collections
|
|
|
|
|
|
|
|
|
|
|
@ -186,11 +185,8 @@ def main():
|
|
|
|
('dest', 'user', ['name', 'facility', 'level']),
|
|
|
|
('dest', 'user', ['name', 'facility', 'level']),
|
|
|
|
('dest', 'console', ['facility', 'level'])]
|
|
|
|
('dest', 'console', ['facility', 'level'])]
|
|
|
|
|
|
|
|
|
|
|
|
mutually_exclusive = [('console', 'name')]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module = AnsibleModule(argument_spec=argument_spec,
|
|
|
|
module = AnsibleModule(argument_spec=argument_spec,
|
|
|
|
required_if=required_if,
|
|
|
|
required_if=required_if,
|
|
|
|
mutually_exclusive=mutually_exclusive,
|
|
|
|
|
|
|
|
supports_check_mode=True)
|
|
|
|
supports_check_mode=True)
|
|
|
|
|
|
|
|
|
|
|
|
warnings = list()
|
|
|
|
warnings = list()
|
|
|
@ -240,8 +236,7 @@ def main():
|
|
|
|
if diff:
|
|
|
|
if diff:
|
|
|
|
result.update({
|
|
|
|
result.update({
|
|
|
|
'changed': True,
|
|
|
|
'changed': True,
|
|
|
|
'diff': {'prepared': diff},
|
|
|
|
'diff': diff,
|
|
|
|
'rpc': tostring(ele)
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
module.exit_json(**result)
|
|
|
|
module.exit_json(**result)
|
|
|
|