summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/network/junos/junos_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/modules/network/junos/junos_config.py')
-rw-r--r--lib/ansible/modules/network/junos/junos_config.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/ansible/modules/network/junos/junos_config.py b/lib/ansible/modules/network/junos/junos_config.py
index a60098ab8f..9f49e14d38 100644
--- a/lib/ansible/modules/network/junos/junos_config.py
+++ b/lib/ansible/modules/network/junos/junos_config.py
@@ -45,7 +45,7 @@ options:
src:
description:
- The I(src) argument provides a path to the configuration file
- to load into the remote system. The path can either be a full
+ to load into the remote system. The path can either be a full
system path to the configuration file if the value starts with /
or relative to the root of the implemented role or playbook.
This argument is mutually exclusive with the I(lines) argument.
@@ -142,6 +142,8 @@ requirements:
notes:
- This module requires the netconf system service be enabled on
the remote device being managed.
+ - Loading JSON-formatted configuration I(json) is supported
+ starting in Junos OS Release 16.1 onwards.
"""
EXAMPLES = """
@@ -151,6 +153,14 @@ EXAMPLES = """
comment: update config
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
junos_config:
rollback: 10
@@ -330,7 +340,7 @@ def main():
else:
diff = configure_device(module, warnings)
- if diff:
+ if diff is not None:
if module._diff:
result['diff'] = {'prepared': diff}
result['changed'] = True