Minor junos_config module changes (#23972)
* Minor junos_config module changes * Add note for json config support * Add example for lines argument * Fix future warning for ElementTree * Remove unwanted spacepull/4420/head
parent
15c19367d6
commit
09b8badc5e
|
@ -142,6 +142,8 @@ requirements:
|
||||||
notes:
|
notes:
|
||||||
- This module requires the netconf system service be enabled on
|
- This module requires the netconf system service be enabled on
|
||||||
the remote device being managed.
|
the remote device being managed.
|
||||||
|
- Loading JSON-formatted configuration I(json) is supported
|
||||||
|
starting in Junos OS Release 16.1 onwards.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
|
@ -151,6 +153,14 @@ EXAMPLES = """
|
||||||
comment: update config
|
comment: update config
|
||||||
provider: "{{ netconf }}"
|
provider: "{{ netconf }}"
|
||||||
|
|
||||||
|
- name: load configure lines into device
|
||||||
|
junos_config:
|
||||||
|
lines:
|
||||||
|
- set interfaces ge-0/0/1 unit 0 description "Test interface"
|
||||||
|
- set vlans vlan01 description "Test vlan"
|
||||||
|
comment: update config
|
||||||
|
provider: "{{ netconf }}"
|
||||||
|
|
||||||
- name: rollback the configuration to id 10
|
- name: rollback the configuration to id 10
|
||||||
junos_config:
|
junos_config:
|
||||||
rollback: 10
|
rollback: 10
|
||||||
|
@ -330,7 +340,7 @@ def main():
|
||||||
|
|
||||||
else:
|
else:
|
||||||
diff = configure_device(module, warnings)
|
diff = configure_device(module, warnings)
|
||||||
if diff:
|
if diff is not None:
|
||||||
if module._diff:
|
if module._diff:
|
||||||
result['diff'] = {'prepared': diff}
|
result['diff'] = {'prepared': diff}
|
||||||
result['changed'] = True
|
result['changed'] = True
|
||||||
|
|
Loading…
Reference in New Issue