summaryrefslogtreecommitdiffstats
path: root/ansible_collections/junipernetworks/junos/docs
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/junipernetworks/junos/docs')
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acl_interfaces_module.rst68
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acls_module.rst20
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_address_family_module.rst880
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_global_module.rst885
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_command_module.rst12
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_config_module.rst45
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_interfaces_module.rst778
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l2_interfaces_module.rst902
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l3_interfaces_module.rst731
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lacp_interfaces_module.rst66
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lag_interfaces_module.rst66
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lldp_interfaces_module.rst26
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_logging_module.rst16
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospf_interfaces_module.rst63
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv2_module.rst1223
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv3_module.rst633
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_package_module.rst177
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ping_module.rst4
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_prefix_lists_module.rst606
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_routing_instances_module.rst78
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_scp_module.rst159
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_policies_module.rst24
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_zones_module.rst266
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_snmp_server_module.rst44
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_static_routes_module.rst300
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_system_module.rst10
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_user_module.rst12
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vlans_module.rst38
-rw-r--r--ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vrf_module.rst42
29 files changed, 5696 insertions, 2478 deletions
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acl_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acl_interfaces_module.rst
index 55faeffc0..e5e04b215 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acl_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acl_interfaces_module.rst
@@ -254,15 +254,15 @@ Examples
- name: Delete JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- - name: ge-1/0/0
- access_groups:
- - afi: ipv4
- acls:
- - name: inbound_acl
- direction: in
- - name: outbound_acl
- direction: out
- state: deleted
+ - name: ge-1/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: inbound_acl
+ direction: in
+ - name: outbound_acl
+ direction: out
+ state: deleted
# After state:
# -------------
@@ -298,15 +298,15 @@ Examples
- name: Merge JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- - name: ge-1/0/0
- access_groups:
- - afi: ipv4
- acls:
- - name: inbound_acl
- direction: in
- - name: outbound_acl
- direction: out
- state: merged
+ - name: ge-1/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: inbound_acl
+ direction: in
+ - name: outbound_acl
+ direction: out
+ state: merged
# After state:
# -------------
@@ -349,15 +349,15 @@ Examples
- name: Override JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- - name: ge-1/0/0
- access_groups:
- - afi: ipv4
- acls:
- - name: inbound_acl
- direction: in
- - name: outbound_acl
- direction: out
- state: overridden
+ - name: ge-1/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: inbound_acl
+ direction: in
+ - name: outbound_acl
+ direction: out
+ state: overridden
# After state:
# -------------
@@ -401,13 +401,13 @@ Examples
- name: Replace JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- - name: ge-1/0/0
- access_groups:
- - afi: ipv4
- acls:
- - name: inbound_acl
- direction: in
- state: replaced
+ - name: ge-1/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: inbound_acl
+ direction: in
+ state: replaced
# After state:
# -------------
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acls_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acls_module.rst
index 610cb3d77..ea8584d2d 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acls_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_acls_module.rst
@@ -1171,16 +1171,16 @@ Examples
- name: Merge JUNOS acl
junipernetworks.junos.junos_acls:
config:
- - afi: ipv4
- acls:
- - name: allow_ssh_acl
- aces:
- - name: ssh_rule
- source:
- port_protocol:
- eq: ssh
- protocol: tcp
- state: merged
+ - afi: ipv4
+ acls:
+ - name: allow_ssh_acl
+ aces:
+ - name: ssh_rule
+ source:
+ port_protocol:
+ eq: ssh
+ protocol: tcp
+ state: merged
# After state:
# -------------
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_address_family_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_address_family_module.rst
index 992887a17..d0915c0db 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_address_family_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_address_family_module.rst
@@ -6148,6 +6148,90 @@ Examples
graceful_restart_forwarding_state_bit: 'from-fib'
state: merged
+ # Task Output:
+ # ------------
+ #
+ # before: {}
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp><nc:family><nc:evpn><nc:signaling>
+ # <nc:accepted-prefix-limit><nc:maximum>20</nc:maximum><nc:teardown><nc:limit-threshold>98</nc:limit-threshold>
+ # <nc:idle-timeout><nc:timeout>2001</nc:timeout></nc:idle-timeout></nc:teardown></nc:accepted-prefix-limit>
+ # <nc:damping/><nc:defer-initial-multipath-build><nc:maximum-delay>2</nc:maximum-delay>
+ # </nc:defer-initial-multipath-build></nc:signaling></nc:evpn><nc:inet><nc:flow><nc:legacy-redirect-ip-action>
+ # <nc:send/><nc:receive/></nc:legacy-redirect-ip-action><nc:loops>4</nc:loops><nc:no-install/>
+ # <nc:output-queue-priority><nc:expedited/></nc:output-queue-priority><nc:secondary-independent-resolution/>
+ # </nc:flow><nc:unicast><nc:extended-nexthop/><nc:extended-nexthop-color/><nc:local-ipv4-address>9.9.9.9</nc:local-ipv4-address>
+ # </nc:unicast><nc:labeled-unicast><nc:entropy-label><nc:no-next-hop-validation/></nc:entropy-label>
+ # <nc:explicit-null><nc:connected-only/></nc:explicit-null><nc:per-prefix-label/><nc:per-group-label/>
+ # <nc:prefix-limit><nc:maximum>20</nc:maximum><nc:teardown>99<nc:idle-timeout><nc:forever/></nc:idle-timeout>
+ # </nc:teardown></nc:prefix-limit><nc:resolve-vpn/><nc:rib><nc:inet.3/></nc:rib><nc:route-refresh-priority>
+ # <nc:expedited/><nc:priority>3</nc:priority></nc:route-refresh-priority></nc:labeled-unicast><nc:any>
+ # <nc:accepted-prefix-limit><nc:maximum>20</nc:maximum><nc:teardown><nc:limit-threshold>99</nc:limit-threshold>
+ # <nc:idle-timeout><nc:timeout>2000</nc:timeout></nc:idle-timeout></nc:teardown></nc:accepted-prefix-limit>
+ # <nc:damping/><nc:defer-initial-multipath-build><nc:maximum-delay>2</nc:maximum-delay></nc:defer-initial-multipath-build>
+ # <nc:delay-route-advertisements><nc:maximum-delay><nc:route-age>20</nc:route-age><nc:routing-uptime>32000</nc:routing-uptime>
+ # </nc:maximum-delay><nc:minimum-delay><nc:inbound-convergence>32000</nc:inbound-convergence>
+ # <nc:routing-uptime>23000</nc:routing-uptime></nc:minimum-delay></nc:delay-route-advertisements><nc:graceful-restart>
+ # <nc:forwarding-state-bit>from-fib</nc:forwarding-state-bit></nc:graceful-restart></nc:any></nc:inet></nc:family>
+ # </nc:bgp></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>
+ #
+ # after:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2001
+ # limit_threshold: 98
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+
# After state
# -----------
#
@@ -6221,6 +6305,8 @@ Examples
# }
# }
# }
+
+ #
# Using replaced
#
# Before state
@@ -6310,38 +6396,154 @@ Examples
- name: Replace existing Junos BGP address family config with provided config
junipernetworks.junos.junos_bgp_address_family:
- config:
- address_family:
- - afi: 'evpn'
- af_type:
- - type: 'signaling'
- accepted_prefix_limit:
- maximum: 21
- limit_threshold: 99
- idle_timeout_value: 2002
- delay_route_advertisements:
- max_delay_route_age: 20
- max_delay_routing_uptime: 32000
- min_delay_inbound_convergence: 32000
- min_delay_routing_uptime: 23000
- damping: true
- state: replaced
+ config:
+ address_family:
+ - afi: 'evpn'
+ af_type:
+ - type: 'signaling'
+ accepted_prefix_limit:
+ maximum: 21
+ limit_threshold: 99
+ idle_timeout_value: 2002
+ delay_route_advertisements:
+ max_delay_route_age: 20
+ max_delay_routing_uptime: 32000
+ min_delay_inbound_convergence: 32000
+ min_delay_routing_uptime: 23000
+ damping: true
+ state: replaced
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2001
+ # limit_threshold: 98
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp><nc:family>
+ # <nc:evpn delete="delete"/></nc:family><nc:family><nc:evpn><nc:signaling><nc:accepted-prefix-limit>
+ # <nc:maximum>21</nc:maximum><nc:teardown><nc:limit-threshold>99</nc:limit-threshold><nc:idle-timeout>
+ # <nc:timeout>2002</nc:timeout></nc:idle-timeout></nc:teardown></nc:accepted-prefix-limit><nc:damping/>
+ # <nc:delay-route-advertisements><nc:maximum-delay><nc:route-age>20</nc:route-age>
+ # <nc:routing-uptime>32000</nc:routing-uptime></nc:maximum-delay><nc:minimum-delay>
+ # <nc:inbound-convergence>32000</nc:inbound-convergence><nc:routing-uptime>23000</nc:routing-uptime>
+ # </nc:minimum-delay></nc:delay-route-advertisements></nc:signaling></nc:evpn></nc:family></nc:bgp></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>
+ #
+ # after:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2002
+ # limit_threshold: 99
+ # maximum: 21
+ # damping: true
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+ #
# After state
# -----------
#
# admin# show protocols bgp
- # preference 2;
- # hold-time 5;
- # advertise-inactive;
- # out-delay 10;
- # bgp-error-tolerance {
- # malformed-route-limit 40000000;
- # }
- # authentication-algorithm md5;
- # advertise-bgp-static {
- # policy static-to-bgp;
- # }
# family inet {
# unicast {
# local-ipv4-address 9.9.9.9;
@@ -6418,6 +6620,7 @@ Examples
# }
# }
# }
+
# Using overridden
#
# Before state
@@ -6496,23 +6699,96 @@ Examples
- name: Override Junos BGP address family config
junipernetworks.junos.junos_bgp_address_family:
- config:
- address_family:
- - afi: 'evpn'
- af_type:
- - type: 'signaling'
- accepted_prefix_limit:
- maximum: 21
- limit_threshold: 99
- idle_timeout_value: 2002
- delay_route_advertisements:
- max_delay_route_age: 20
- max_delay_routing_uptime: 32000
- min_delay_inbound_convergence: 32000
- min_delay_routing_uptime: 23000
- damping: true
- state: overridden
+ config:
+ address_family:
+ - afi: 'evpn'
+ af_type:
+ - type: 'signaling'
+ accepted_prefix_limit:
+ maximum: 21
+ limit_threshold: 99
+ idle_timeout_value: 2002
+ delay_route_advertisements:
+ max_delay_route_age: 20
+ max_delay_routing_uptime: 32000
+ min_delay_inbound_convergence: 32000
+ min_delay_routing_uptime: 23000
+ damping: true
+ state: overridden
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2002
+ # limit_threshold: 99
+ # maximum: 21
+ # damping: true
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp><nc:family>
+ # <nc:evpn delete="delete"/><nc:inet delete="delete"/></nc:family><nc:family><nc:evpn delete="delete"/>
+ # </nc:family><nc:family><nc:evpn><nc:signaling><nc:accepted-prefix-limit><nc:maximum>21</nc:maximum>
+ # <nc:teardown><nc:limit-threshold>99</nc:limit-threshold><nc:idle-timeout><nc:timeout>2002</nc:timeout>
+ # </nc:idle-timeout></nc:teardown></nc:accepted-prefix-limit><nc:damping/><nc:delay-route-advertisements>
+ # <nc:maximum-delay><nc:route-age>20</nc:route-age><nc:routing-uptime>32000</nc:routing-uptime>
+ # </nc:maximum-delay><nc:minimum-delay><nc:inbound-convergence>32000</nc:inbound-convergence>
+ # <nc:routing-uptime>23000</nc:routing-uptime></nc:minimum-delay></nc:delay-route-advertisements>
+ # </nc:signaling></nc:evpn></nc:family></nc:bgp></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>
+ #
# After state
# -----------
#
@@ -6619,19 +6895,91 @@ Examples
- name: Delete Junos BGP address family config based on the afi
junipernetworks.junos.junos_bgp_address_family:
- config:
- address_family:
- - afi: 'inet'
- state: deleted
+ config:
+ address_family:
+ - afi: 'inet'
+ state: deleted
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2001
+ # limit_threshold: 98
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp>
+ # <nc:family><nc:inet delete="delete"/></nc:family></nc:bgp></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>
+ #
+ # after:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2001
+ # limit_threshold: 98
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # type: signaling
+ # afi: evpn
+ #
# After state
# -----------
#
# admin# show protocols bgp
- # preference 2;
- # hold-time 5;
- # advertise-inactive;
- # out-delay 10;
# family evpn {
# signaling {
# accepted-prefix-limit {
@@ -6651,10 +6999,6 @@ Examples
# ------------
#
# admin# show protocols bgp
- # preference 2;
- # hold-time 5;
- # advertise-inactive;
- # out-delay 10;
# family inet {
# unicast {
# local-ipv4-address 9.9.9.9;
@@ -6727,18 +7071,79 @@ Examples
- name: Delete complete Junos BGP address family config
junipernetworks.junos.junos_bgp_address_family:
- config:
- state: deleted
+ config:
+ state: deleted
+
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2001
+ # limit_threshold: 98
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:bgp><nc:family><nc:evpn delete="delete"/><nc:inet delete="delete"/>
+ # </nc:family></nc:bgp></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>
+ #
+ # after: {}
# After state
# -----------
#
# admin# show protocols bgp
- # preference 2;
- # hold-time 5;
- # advertise-inactive;
- # out-delay 10;
-
+ #
# Using gathered
#
@@ -6746,10 +7151,6 @@ Examples
# ------------
#
# admin# show protocols bgp
- # preference 2;
- # hold-time 5;
- # advertise-inactive;
- # out-delay 10;
# family inet {
# unicast {
# local-ipv4-address 9.9.9.9;
@@ -6826,92 +7227,64 @@ Examples
state: gathered
#
#
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- # "gathered": {
- # "address_family": [
- # {
- # "af_type": [
- # {
- # "accepted_prefix_limit": {
- # "idle_timeout_value": 2001,
- # "limit_threshold": 98,
- # "maximum": 20
- # },
- # "damping": true,
- # "defer_initial_multipath_build": {
- # "maximum_delay": 2
- # },
- # "type": "signaling"
- # }
- # ],
- # "afi": "evpn"
- # },
- # {
- # "af_type": [
- # {
- # "accepted_prefix_limit": {
- # "idle_timeout_value": 2000,
- # "limit_threshold": 99,
- # "maximum": 20
- # },
- # "damping": true,
- # "defer_initial_multipath_build": {
- # "maximum_delay": 2
- # },
- # "delay_route_advertisements": {
- # "max_delay_route_age": 20,
- # "max_delay_routing_uptime": 32000,
- # "min_delay_inbound_convergence": 32000,
- # "min_delay_routing_uptime": 23000
- # },
- # "graceful_restart_forwarding_state_bit": "from-fib",
- # "type": "any"
- # },
- # {
- # "legacy_redirect_ip_action": {
- # "receive": true,
- # "send": true
- # },
- # "loops": 4,
- # "no_install": true,
- # "output_queue_priority_expedited": true,
- # "secondary_independent_resolution": true,
- # "type": "flow"
- # },
- # {
- # "entropy_label": {
- # "no_next_hop_validation": true
- # },
- # "explicit_null": {
- # "connected_only": true
- # },
- # "per_group_label": true,
- # "per_prefix_label": true,
- # "prefix_limit": {
- # "forever": true,
- # "limit_threshold": 99,
- # "maximum": 20
- # },
- # "resolve_vpn": true,
- # "rib": "inet.3",
- # "route_refresh_priority_priority": 3,
- # "type": "labeled-unicast"
- # },
- # {
- # "extended_nexthop": true,
- # "extended_nexthop_color": true,
- # "local_ipv4_address": "9.9.9.9",
- # "type": "unicast"
- # }
- # ],
- # "afi": "inet"
- # }
- # ]
- # }
+ # Task Output:
+ # ------------
#
+ # gathered:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2001
+ # limit_threshold: 98
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+
# Using parsed
# parsed.cfg
# ------------
@@ -7055,96 +7428,66 @@ Examples
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
#
+ # Task Output:
+ # ------------
#
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- #
- # "parsed": {
- # "address_family": [
- # {
- # "af_type": [
- # {
- # "accepted_prefix_limit": {
- # "idle_timeout_value": 2001,
- # "limit_threshold": 98,
- # "maximum": 20
- # },
- # "damping": true,
- # "defer_initial_multipath_build": {
- # "maximum_delay": 2
- # },
- # "type": "signaling"
- # }
- # ],
- # "afi": "evpn"
- # },
- # {
- # "af_type": [
- # {
- # "accepted_prefix_limit": {
- # "idle_timeout_value": 2000,
- # "limit_threshold": 99,
- # "maximum": 20
- # },
- # "damping": true,
- # "defer_initial_multipath_build": {
- # "maximum_delay": 2
- # },
- # "delay_route_advertisements": {
- # "max_delay_route_age": 20,
- # "max_delay_routing_uptime": 32000,
- # "min_delay_inbound_convergence": 32000,
- # "min_delay_routing_uptime": 23000
- # },
- # "graceful_restart_forwarding_state_bit": "from-fib",
- # "type": "any"
- # },
- # {
- # "legacy_redirect_ip_action": {
- # "receive": true,
- # "send": true
- # },
- # "loops": 4,
- # "no_install": true,
- # "output_queue_priority_expedited": true,
- # "secondary_independent_resolution": true,
- # "type": "flow"
- # },
- # {
- # "entropy_label": {
- # "no_next_hop_validation": true
- # },
- # "explicit_null": {
- # "connected_only": true
- # },
- # "per_group_label": true,
- # "per_prefix_label": true,
- # "prefix_limit": {
- # "forever": true,
- # "limit_threshold": 99,
- # "maximum": 20
- # },
- # "resolve_vpn": true,
- # "rib": "inet.3",
- # "route_refresh_priority_priority": 3,
- # "type": "labeled-unicast"
- # },
- # {
- # "extended_nexthop": true,
- # "extended_nexthop_color": true,
- # "local_ipv4_address": "9.9.9.9",
- # "type": "unicast"
- # }
- # ],
- # "afi": "inet"
- # }
- # ]
- # }
+ # parsed:
+ # address_family:
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2001
+ # limit_threshold: 98
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # type: signaling
+ # afi: evpn
+ # - af_type:
+ # - accepted_prefix_limit:
+ # idle_timeout_value: 2000
+ # limit_threshold: 99
+ # maximum: 20
+ # damping: true
+ # defer_initial_multipath_build:
+ # maximum_delay: 2
+ # delay_route_advertisements:
+ # max_delay_route_age: 20
+ # max_delay_routing_uptime: 32000
+ # min_delay_inbound_convergence: 32000
+ # min_delay_routing_uptime: 23000
+ # graceful_restart_forwarding_state_bit: from-fib
+ # type: any
+ # - legacy_redirect_ip_action:
+ # receive: true
+ # send: true
+ # loops: 4
+ # no_install: true
+ # output_queue_priority_expedited: true
+ # secondary_independent_resolution: true
+ # type: flow
+ # - entropy_label:
+ # no_next_hop_validation: true
+ # explicit_null:
+ # connected_only: true
+ # per_group_label: true
+ # per_prefix_label: true
+ # prefix_limit:
+ # forever: true
+ # limit_threshold: 99
+ # maximum: 20
+ # resolve_vpn: true
+ # rib: inet.3
+ # route_refresh_priority_priority: 3
+ # type: labeled-unicast
+ # - extended_nexthop: true
+ # extended_nexthop_color: true
+ # local_ipv4_address: 9.9.9.9
+ # type: unicast
+ # afi: inet
+
# Using rendered
#
- #
- name: Render the commands for provided configuration
junipernetworks.junos.junos_bgp_address_family:
config:
@@ -7207,14 +7550,10 @@ Examples
graceful_restart_forwarding_state_bit: 'from-fib'
state: rendered
+ # Task Output:
+ # ------------
#
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- #
- # "rendered": "<nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # rendered: "<nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:bgp><nc:family><nc:evpn><nc:signaling><nc:accepted-prefix-limit><nc:maximum>20</nc:maximum>
# <nc:teardown><nc:limit-threshold>98</nc:limit-threshold><nc:idle-timeout><nc:timeout>2001</nc:timeout>
# </nc:idle-timeout></nc:teardown></nc:accepted-prefix-limit><nc:damping/><nc:defer-initial-multipath-build>
@@ -7308,6 +7647,57 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;nc:bgp&gt;&lt;nc:family&gt;&lt;nc:evpn&gt;&lt;nc:signaling&gt;&lt;nc:accepted-prefix-limit&gt; &lt;nc:maximum&gt;21&lt;/nc:maximum&gt;&lt;nc:teardown&gt;&lt;nc:limit-threshold&gt;99&lt;/nc:limit-threshold&gt; &lt;nc:idle-timeout&gt;&lt;nc:timeout&gt;2002&lt;/nc:timeout&gt;&lt;/nc:idle-timeout&gt; &lt;/nc:teardown&gt;&lt;/nc:accepted-prefix-limit&gt;&lt;nc:damping/&gt; &lt;nc:delay-route-advertisements&gt;&lt;nc:maximum-delay&gt; &lt;nc:route-age&gt;20&lt;/nc:route-age&gt;&lt;nc:routing-uptime&gt;32000&lt;/nc:routing-uptime&gt; &lt;/nc:maximum-delay&gt;&lt;nc:minimum-delay&gt;&lt;nc:inbound-convergence&gt;32000&lt;/nc:inbound-convergence&gt; &lt;nc:routing-uptime&gt;23000&lt;/nc:routing-uptime&gt;&lt;/nc:minimum-delay&gt;&lt;/nc:delay-route-advertisements&gt; &lt;/nc:signaling&gt;&lt;/nc:evpn&gt;&lt;/nc:family&gt;&lt;/nc:bgp&gt;&lt;/nc:protocols&gt;&#x27;, &#x27;xml 2&#x27;, &#x27;xml 3&#x27;]</div>
</td>
</tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
+ </td>
+ </tr>
</table>
<br/><br/>
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_global_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_global_module.rst
index 27246dbb3..e116888b2 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_global_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_bgp_global_module.rst
@@ -10548,6 +10548,7 @@ Parameters
<li>purged</li>
<li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
<li>replaced</li>
+ <li>overridden</li>
<li>deleted</li>
<li>gathered</li>
<li>parsed</li>
@@ -10583,16 +10584,15 @@ Examples
# Using merged
#
- # Before state
- # ------------
+ # Before state:
+ # -------------
#
- # admin# show protocols bgp
- # [edit]
+ # vsrx# show bgp summary
+ # BGP is not running
- # admin# show routing-options autonomous-system
- # [edit]
+ # vsrx# show routing-options autonomous-system
- - name: Merge Junos BGP config
+ - name: Merge provided bgp config with device configuration
junipernetworks.junos.junos_bgp_global:
config:
as_number: "65534"
@@ -10600,8 +10600,6 @@ Examples
asdot_notation: true
accept_remote_nexthop: true
add_path_display_ipv4_address: true
- advertise_bgp_static:
- policy: "static-to-bgp"
advertise_from_main_vpn_tables: true
advertise_inactive: true
authentication_algorithm: "md5"
@@ -10624,13 +10622,50 @@ Examples
preference: 2
state: merged
- # After state
- # -----------
+ # Task Output:
+ # ------------
+ # before: {}
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp><nc:accept-remote-nexthop/>
+ # <nc:add-path-display-ipv4-address/><nc:advertise-from-main-vpn-tables/><nc:advertise->
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:autonomous-system>65534<nc:loops>3</nc:loops><nc:asdot-notation/></nc:autonomous-system></nc:routing-options>
+ #
+ # after:
+ # accept_remote_nexthop: true
+ # add_path_display_ipv4_address: true
+ # advertise_from_main_vpn_tables: true
+ # advertise_inactive: true
+ # as_number: '65534'
+ # asdot_notation: true
+ # authentication_algorithm: md5
+ # bgp_error_tolerance:
+ # malformed_route_limit: 20000000
+ # bmp:
+ # monitor: true
+ # damping: true
+ # description: This is configured with Junos_bgp resource module
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # holddown_all_stale_labels: true
+ # include_mp_next_hop: true
+ # log_updown: true
+ # loops: 3
+ # no_advertise_peer_as: true
+ # no_aggregator_id: true
+ # no_client_reflect: true
+ # out_delay: 10
+ # precision_timers: true
+ # preference: '2'
+
+ # After state:
+ # ------------
#
- # admin# show routing-options autonomous-system
+ # vsrx# show routing-options autonomous-system
# 65534 loops 3 asdot-notation;
- # admin# show protocols bgp
+ # vsrx# show protocols bgp
# precision-timers;
# advertise-from-main-vpn-tables;
# holddown-all-stale-labels;
@@ -10653,22 +10688,17 @@ Examples
# bmp {
# monitor enable;
# }
- # advertise-bgp-static {
- # policy static-to-bgp;
- # }
# add-path-display-ipv4-address;
# egress-te-sid-stats;
-
- # Using merged
+ # Using replaced
#
- # Before state
- # ------------
+ # Before state:
+ # -------------
#
- # admin# show routing-options autonomous-system
- # 65534 loops 3 asdot-notation;
-
- # admin# show protocols bgp
+ # vsrx# show routing-options autonomous-system
+ # [edit]
+ # vsrx# show protocols bgp
# precision-timers;
# advertise-from-main-vpn-tables;
# holddown-all-stale-labels;
@@ -10691,146 +10721,123 @@ Examples
# bmp {
# monitor enable;
# }
- # advertise-bgp-static {
- # policy static-to-bgp;
- # }
# add-path-display-ipv4-address;
# egress-te-sid-stats;
- - name: Update running Junos BGP config
+ - name: Replace running config with provided config
junipernetworks.junos.junos_bgp_global:
config:
- egress_te_backup_paths:
- templates:
- - path_name: customer1
- peers:
- - '11.11.11.11'
- - '11.11.11.12'
- - '11.11.11.13'
- remote_nexthop: '2.2.2.2'
- groups:
- - name: 'internal'
- type: 'internal'
- vpn_apply_export: true
- out_delay: 30
- accept_remote_nexthop: true
- add_path_display_ipv4_address: true
- peer_as: '65534'
- allow:
- - 'all'
- - '1.1.1.0/24'
- neighbors:
- - neighbor_address: '11.11.11.11'
- peer_as: '65534'
- out_delay: 11
- - neighbor_address: '11.11.11.12'
- peer_as: '65534'
- out_delay: 12
-
- - name: 'external'
- out_delay: 20
- peer_as: '65534'
- accept_remote_nexthop: true
- add_path_display_ipv4_address: true
- neighbors:
- - neighbor_address: '12.12.12.12'
- peer_as: '65534'
- out_delay: 21
- accept_remote_nexthop: true
- add_path_display_ipv4_address: true
- - neighbor_address: '11.11.11.13'
- peer_as: '65534'
- out_delay: 31
- accept_remote_nexthop: true
- add_path_display_ipv4_address: true
- state: merged
+ advertise_inactive: true
+ authentication_algorithm: "md5"
+ bfd_liveness_detection:
+ minimum_receive_interval: 8
+ multiplier: 30
+ no_adaptation: true
+ transmit_interval:
+ minimum_interval: 4
+ version: "automatic"
+ bgp_error_tolerance:
+ malformed_route_limit: 40000000
+ description: "Replace running bgp config"
+ egress_te_sid_stats: true
+ hold_time: 5
+ out_delay: 10
+ preference: "2"
+ state: replaced
- # After state
- # -----------
+ # Task Output:
+ # ------------
#
- # admin# show routing-options autonomous-system
- # 65534 loops 3 asdot-notation;
+ # before:
+ # accept_remote_nexthop: true
+ # add_path_display_ipv4_address: true
+ # advertise_from_main_vpn_tables: true
+ # advertise_inactive: true
+ # as_number: '65534'
+ # asdot_notation: true
+ # authentication_algorithm: md5
+ # bgp_error_tolerance:
+ # malformed_route_limit: 20000000
+ # bmp:
+ # monitor: true
+ # damping: true
+ # description: This is configured with Junos_bgp resource module
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # holddown_all_stale_labels: true
+ # include_mp_next_hop: true
+ # log_updown: true
+ # loops: 3
+ # no_advertise_peer_as: true
+ # no_aggregator_id: true
+ # no_client_reflect: true
+ # out_delay: 10
+ # precision_timers: true
+ # preference: '2'
+
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp>
+ # <nc:accept-remote-nexthop delete="delete"/><nc:add-path-display-ipv4-address delete="delete"/><nc:advertise-bgp-t
+ # delete="delete"/><nc:include-mp-next-hop delete="delete"/><nc:ipsec-sa delete="delete"/><nc:keep delete="delete"/>
+ # <nc:local-address delete="delete"/><nc:local-interface delete="delete"/t
+ # delete="delete"/></nc:bgp><nc:bgp><nc:advertise-inactive/><nc:egress-te-sid-stats/>
+ # <nc:authentication-algorithm>md5</nc:authentication-algorithm><nc:description>Replace running bgp conf>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:autonomous-system delete="delete"/></nc:routing-options>
- # admin# show protocols bgp
- # precision-timers;
- # advertise-from-main-vpn-tables;
- # holddown-all-stale-labels;
- # egress-te-backup-paths {
- # template customer1 {
- # peer 11.11.11.11;
- # peer 11.11.11.12;
- # peer 11.11.11.13;
- # remote-nexthop {
- # 2.2.2.2;
- # }
- # }
- # }
- # description "This is configured with Junos_bgp resource module";
- # accept-remote-nexthop;
+ #
+ # after:
+ # advertise_inactive: true
+ # authentication_algorithm: md5
+ # bfd_liveness_detection:
+ # minimum_receive_interval: 8
+ # multiplier: 30
+ # no_adaptation: true
+ # transmit_interval:
+ # minimum_interval: 4
+ # version: automatic
+ # bgp_error_tolerance:
+ # malformed_route_limit: 40000000
+ # description: Replace running bgp config
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # out_delay: 10
+ # preference: '2'
+
+ # After state:
+ # ------------
+ #
+ # varx# show protocols bgp
+ # description "Replace running bgp config";
# preference 2;
# hold-time 5;
# advertise-inactive;
- # no-advertise-peer-as;
- # no-aggregator-id;
# out-delay 10;
- # log-updown;
- # damping;
# bgp-error-tolerance {
- # malformed-route-limit 20000000;
+ # malformed-route-limit 40000000;
# }
# authentication-algorithm md5;
- # no-client-reflect;
- # include-mp-next-hop;
- # bmp {
- # monitor enable;
- # }
- # add-path-display-ipv4-address;
- # egress-te-sid-stats;
- # group internal {
- # type internal;
- # accept-remote-nexthop;
- # out-delay 30;
- # vpn-apply-export;
- # peer-as 65534;
- # add-path-display-ipv4-address;
- # allow [ 0.0.0.0/0 1.1.1.0/24 ];
- # neighbor 11.11.11.11 {
- # out-delay 11;
- # peer-as 65534;
- # }
- # neighbor 11.11.11.12 {
- # out-delay 12;
- # peer-as 65534;
- # }
- # }
- # group external {
- # accept-remote-nexthop;
- # out-delay 20;
- # peer-as 65534;
- # add-path-display-ipv4-address;
- # neighbor 12.12.12.12 {
- # accept-remote-nexthop;
- # out-delay 21;
- # peer-as 65534;
- # add-path-display-ipv4-address;
- # }
- # neighbor 11.11.11.13 {
- # accept-remote-nexthop;
- # out-delay 31;
- # peer-as 65534;
- # add-path-display-ipv4-address;
+ # bfd-liveness-detection {
+ # version automatic;
+ # minimum-receive-interval 8;
+ # multiplier 30;
+ # no-adaptation;
+ # transmit-interval {
+ # minimum-interval 4;
# }
# }
+ # egress-te-sid-stats;
+ # vsrx# show routing-options autonomous-system
- # Using replaced
+ # Using overridden
+ # "(NOTE: This will work same as replaced operation)"
#
- # Before state
- # ------------
+ # Before state:
+ # -------------
#
- # admin# show routing-options autonomous-system
+ # vsrx# show routing-options autonomous-system
# [edit]
- # admin# show protocols bgp
+ # vsrx# show protocols bgp
# precision-timers;
# advertise-from-main-vpn-tables;
# holddown-all-stale-labels;
@@ -10853,40 +10860,93 @@ Examples
# bmp {
# monitor enable;
# }
- # advertise-bgp-static {
- # policy static-to-bgp;
- # }
# add-path-display-ipv4-address;
# egress-te-sid-stats;
- - name: Replace Junos BGP global config
+ - name: Override running config with provided config
junipernetworks.junos.junos_bgp_global:
- config:
- advertise_bgp_static:
- policy: "static-to-bgp"
- advertise_inactive: true
- authentication_algorithm: "md5"
- bfd_liveness_detection:
- minimum_receive_interval: 8
- multiplier: 30
- no_adaptation: true
- transmit_interval:
- minimum_interval: 4
- version: "automatic"
- bgp_error_tolerance:
- malformed_route_limit: 40000000
- description: "This is configured with Junos_bgp resource module replace"
- egress_te_sid_stats: true
- hold_time: 5
- out_delay: 10
- preference: "2"
- state: replaced
-
- # After state
- # -----------
+ config:
+ advertise_inactive: true
+ authentication_algorithm: "md5"
+ bfd_liveness_detection:
+ minimum_receive_interval: 8
+ multiplier: 30
+ no_adaptation: true
+ transmit_interval:
+ minimum_interval: 4
+ version: "automatic"
+ bgp_error_tolerance:
+ malformed_route_limit: 40000000
+ description: "Replace running bgp config"
+ egress_te_sid_stats: true
+ hold_time: 5
+ out_delay: 10
+ preference: "2"
+ state: overridden
+
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # accept_remote_nexthop: true
+ # add_path_display_ipv4_address: true
+ # advertise_from_main_vpn_tables: true
+ # advertise_inactive: true
+ # as_number: '65534'
+ # asdot_notation: true
+ # authentication_algorithm: md5
+ # bgp_error_tolerance:
+ # malformed_route_limit: 20000000
+ # bmp:
+ # monitor: true
+ # damping: true
+ # description: This is configured with Junos_bgp resource module
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # holddown_all_stale_labels: true
+ # include_mp_next_hop: true
+ # log_updown: true
+ # loops: 3
+ # no_advertise_peer_as: true
+ # no_aggregator_id: true
+ # no_client_reflect: true
+ # out_delay: 10
+ # precision_timers: true
+ # preference: '2'
+
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp>
+ # <nc:accept-remote-nexthop delete="delete"/><nc:add-path-display-ipv4-address delete="delete"/><nc:advertise-bgp-t
+ # delete="delete"/><nc:include-mp-next-hop delete="delete"/><nc:ipsec-sa delete="delete"/><nc:keep delete="delete"/>
+ # <nc:local-address delete="delete"/><nc:local-interface delete="delete"/t
+ # delete="delete"/></nc:bgp><nc:bgp><nc:advertise-inactive/><nc:egress-te-sid-stats/>
+ # <nc:authentication-algorithm>md5</nc:authentication-algorithm><nc:description>Replace running bgp conf>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:autonomous-system delete="delete"/></nc:routing-options>
+
+ #
+ # after:
+ # advertise_inactive: true
+ # authentication_algorithm: md5
+ # bfd_liveness_detection:
+ # minimum_receive_interval: 8
+ # multiplier: 30
+ # no_adaptation: true
+ # transmit_interval:
+ # minimum_interval: 4
+ # version: automatic
+ # bgp_error_tolerance:
+ # malformed_route_limit: 40000000
+ # description: Replace running bgp config
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # out_delay: 10
+ # preference: '2'
+
+ # After state:
+ # ------------
#
- # admin# show protocols bgp
- # description "This is configured with Junos_bgp resource module replace";
+ # varx# show protocols bgp
+ # description "Replace running bgp config";
# preference 2;
# hold-time 5;
# advertise-inactive;
@@ -10895,9 +10955,6 @@ Examples
# malformed-route-limit 40000000;
# }
# authentication-algorithm md5;
- # advertise-bgp-static {
- # policy static-to-bgp;
- # }
# bfd-liveness-detection {
# version automatic;
# minimum-receive-interval 8;
@@ -10909,136 +10966,149 @@ Examples
# }
# egress-te-sid-stats;
- # admin# show routing-options autonomous-system
- # [edit]
+ # vsrx# show routing-options autonomous-system
- #
# Using deleted
- #
+ # "(NOTE: This WILL delete the bgp global attributes)"
# Before state
# ------------
#
- # admin# show protocols bgp
- # precision-timers;
- # advertise-from-main-vpn-tables;
- # holddown-all-stale-labels;
- # description "This is configured with Junos_bgp resource module";
- # accept-remote-nexthop;
+ # vsrx# show protocols bgp
+ # description "Replace running bgp config";
# preference 2;
# hold-time 5;
# advertise-inactive;
- # no-advertise-peer-as;
- # no-aggregator-id;
# out-delay 10;
- # log-updown;
- # damping;
# bgp-error-tolerance {
- # malformed-route-limit 20000000;
+ # malformed-route-limit 40000000;
# }
# authentication-algorithm md5;
- # no-client-reflect;
- # include-mp-next-hop;
- # bmp {
- # monitor enable;
+ # bfd-liveness-detection {
+ # version automatic;
+ # minimum-receive-interval 8;
+ # multiplier 30;
+ # no-adaptation;
+ # transmit-interval {
+ # minimum-interval 4;
+ # }
# }
- # add-path-display-ipv4-address;
# egress-te-sid-stats;
- # group internal {
- # out-delay 12;
- # }
- # admin# show routing-options autonomous-system
- # 65534 loops 3 asdot-notation;
- - name: Delete Junos BGP global config
+ - name: Delete bgp section of running config
junipernetworks.junos.junos_bgp_global:
config:
state: deleted
- # After state
- # -----------
- # admin# show protocols bgp
- # group internal {
- # out-delay 12;
- # }
-
+ # Task Output:
+ # ------------
+ # before:
+ # advertise_inactive: true
+ # authentication_algorithm: md5
+ # bfd_liveness_detection:
+ # minimum_receive_interval: 8
+ # multiplier: 30
+ # no_adaptation: true
+ # transmit_interval:
+ # minimum_interval: 4
+ # version: automatic
+ # bgp_error_tolerance:
+ # malformed_route_limit: 40000000
+ # description: Replace running bgp config
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # out_delay: 10
+ # preference: '2'
+
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp><nc:accept-remote-nexthop delete="delete"/>
+ # <nc:add-path-display-ipv4-address delete="delete"/><nc:advertise-bgp-t
+ # delete="delete"/><nc:include-mp-next-hop delete="delete"/><nc:ipsec-sa delete="delete"/><nc:keep delete="delete"/>
+ # <nc:local-address delete="delete"/><nc:local-interface delete="delete"/t
+ # delete="delete"/></nc:bgp></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>
+
+ # after: {}
+
+ # After state:
+ # ------------
+ # vsrx# show protocols bgp
- # admin# show protocols bgp
- # [edit]
+ # vsrx# show routing-options autonomous-system
- # admin# show routing-options autonomous-system
- # [edit]
# Using gathered
#
- # Before state
- # ------------
+ # Before state:
+ # -------------
#
- # admin# show protocols bgp
- # description "This is configured with Junos_bgp resource module replace";
+ # vsrx# show protocols bgp
+ # precision-timers;
+ # advertise-from-main-vpn-tables;
+ # holddown-all-stale-labels;
+ # description "This is configured with Junos_bgp resource module";
+ # accept-remote-nexthop;
# preference 2;
# hold-time 5;
# advertise-inactive;
+ # no-advertise-peer-as;
+ # no-aggregator-id;
# out-delay 10;
+ # log-updown;
+ # damping;
# bgp-error-tolerance {
- # malformed-route-limit 40000000;
+ # malformed-route-limit 20000000;
# }
# authentication-algorithm md5;
- # advertise-bgp-static {
- # policy static-to-bgp;
- # }
- # bfd-liveness-detection {
- # version automatic;
- # minimum-receive-interval 8;
- # multiplier 30;
- # no-adaptation;
- # transmit-interval {
- # minimum-interval 4;
- # }
+ # no-client-reflect;
+ # include-mp-next-hop;
+ # bmp {
+ # monitor enable;
# }
+ # add-path-display-ipv4-address;
# egress-te-sid-stats;
- - name: Gather Junos BGP global config
+ - name: Gather BGP facts from running config
junipernetworks.junos.junos_bgp_global:
config:
state: gathered
- #
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- # "gathered": {
- # "advertise_bgp_static": {
- # "policy": "static-to-bgp"
- # },
- # "advertise_inactive": true,
- # "authentication_algorithm": "md5",
- # "bfd_liveness_detection": {
- # "minimum_receive_interval": 8,
- # "multiplier": 30,
- # "no_adaptation": true,
- # "transmit_interval": {
- # "minimum_interval": 4
- # },
- # "version": "automatic"
- # },
- # "bgp_error_tolerance": {
- # "malformed_route_limit": 40000000
- # },
- # "description": "This is configured with Junos_bgp resource module replace",
- # "egress_te_sid_stats": true,
- # "hold_time": 5,
- # "out_delay": 10,
- # "preference": "2"
- # }
- #
- #
- # Using purged
- #
- # Before state
+
+ # Task Output:
# ------------
+
+ # gathered:
+ # accept_remote_nexthop: true
+ # add_path_display_ipv4_address: true
+ # advertise_from_main_vpn_tables: true
+ # advertise_inactive: true
+ # as_number: '65534'
+ # asdot_notation: true
+ # authentication_algorithm: md5
+ # bgp_error_tolerance:
+ # malformed_route_limit: 20000000
+ # bmp:
+ # monitor: true
+ # damping: true
+ # description: This is configured with Junos_bgp resource module
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # holddown_all_stale_labels: true
+ # include_mp_next_hop: true
+ # log_updown: true
+ # loops: 3
+ # no_advertise_peer_as: true
+ # no_aggregator_id: true
+ # no_client_reflect: true
+ # out_delay: 10
+ # precision_timers: true
+ # preference: '2'
+
+ # Using purged
+ # "(NOTE: This WILL delete the configured global BGP, and BGP address family config)"
+
+ # Before state:
+ # -------------
#
- # admin# show protocols bgp
+ # vsrx# show protocols bgp
# precision-timers;
# advertise-from-main-vpn-tables;
# holddown-all-stale-labels;
@@ -11063,41 +11133,68 @@ Examples
# }
# add-path-display-ipv4-address;
# egress-te-sid-stats;
- # group internal {
- # out-delay 12;
- # }
- # admin# show routing-options autonomous-system
- # 65534 loops 3 asdot-notation;
- - name: Purge Junos BGP global config
+ - name: Purge BGP config from running config
junipernetworks.junos.junos_bgp_global:
config:
state: purged
- # After state
- # ----------
- # admin# show protocols bgp
- #
- # [edit]
- # admin# show routing-options autonomous-system
- #
- #[edit]
+ # Task Output:
+ # ------------
+
+ # before:
+ # accept_remote_nexthop: true
+ # add_path_display_ipv4_address: true
+ # advertise_from_main_vpn_tables: true
+ # advertise_inactive: true
+ # as_number: '65534'
+ # asdot_notation: true
+ # authentication_algorithm: md5
+ # bgp_error_tolerance:
+ # malformed_route_limit: 20000000
+ # bmp:
+ # monitor: true
+ # damping: true
+ # description: This is configured with Junos_bgp resource module
+ # egress_te_sid_stats: true
+ # hold_time: 5
+ # holddown_all_stale_labels: true
+ # include_mp_next_hop: true
+ # log_updown: true
+ # loops: 3
+ # no_advertise_peer_as: true
+ # no_aggregator_id: true
+ # no_client_reflect: true
+ # out_delay: 10
+ # precision_timers: true
+ # preference: '2'
+
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:bgp delete="delete"/></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:autonomous-system delete="delete"/></nc:routing-options>
+
+ # after: {}
+
+ # After state:
+ # ------------
+ # vsrx# show protocols bgp
+ # vsrx# show routing-options autonomous-system
# Using rendered
- #
- #
- - name: Render the commands for provided configuration
+
+ - name: Render the commands for provided configuration
junipernetworks.junos.junos_bgp_global:
config:
+ as_number: "65534"
+ loops: 3
+ asdot_notation: true
+ accept_remote_nexthop: true
+ add_path_display_ipv4_address: true
+ advertise_from_main_vpn_tables: true
+ advertise_inactive: true
authentication_algorithm: "md5"
- bfd_liveness_detection:
- minimum_receive_interval: 4
- multiplier: 10
- no_adaptation: true
- transmit_interval:
- minimum_interval: 2
- version: "automatic"
bgp_error_tolerance:
malformed_route_limit: 20000000
bmp:
@@ -11106,41 +11203,25 @@ Examples
description: "This is configured with Junos_bgp resource module"
egress_te_sid_stats: true
hold_time: 5
+ holddown_all_stale_labels: true
+ include_mp_next_hop: true
+ log_updown: true
+ no_advertise_peer_as: true
+ no_aggregator_id: true
+ no_client_reflect: true
+ out_delay: 10
+ precision_timers: true
+ preference: 2
state: rendered
- #
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- #
- # "rendered": "
- # <nc:protocols
- # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # <nc:bgp>
- # <nc:damping/>
- # <nc:egress-te-sid-stats/>
- # <nc:authentication-algorithm>md5</nc:authentication-algorithm>
- # <nc:description>This is configured with Junos_bgp resource module</nc:description>
- # <nc:hold-time>5</nc:hold-time>
- # <nc:bfd-liveness-detection>
- # <nc:transmit-interval>
- # <nc:minimum-interval>2</nc:minimum-interval>
- # </nc:transmit-interval>
- # <nc:minimum-receive-interval>4</nc:minimum-receive-interval>
- # <nc:multiplier>10</nc:multiplier>
- # <nc:no-adaptation/>
- # <nc:version>automatic</nc:version>
- # </nc:bfd-liveness-detection>
- # <nc:bgp-error-tolerance>
- # <nc:malformed-route-limit>20000000</nc:malformed-route-limit>
- # </nc:bgp-error-tolerance>
- # <nc:bmp>
- # <nc:monitor>enable</nc:monitor>
- # </nc:bmp>
- # </nc:bgp>
- # </nc:protocols>"
+ # Task Output:
+ # ------------
+
+ # rendered:
+ # <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:bgp><nc:accept-remote-nexthop/><nc:add-path-display-ipv4-address/>
+ # <nc:advertise-from-main-vpn-tables/><nc:ad>
+
#
# Using parsed
# parsed.cfg
@@ -11246,63 +11327,66 @@ Examples
# </rpc-reply>
- - name: Parsed the device configuration to get output commands
+ - name: Parsed the device configuration to get ansible facts
junipernetworks.junos.junos_bgp_global:
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
- #
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- #
- # "parsed": {
- # "accept_remote_nexthop": true,
- # "add_path_display_ipv4_address": true,
- # "advertise_bgp_static": {
- # "policy": "static-to-bgp"
- # },
- # "advertise_from_main_vpn_tables": true,
- # "advertise_inactive": true,
- # "as_number": "65432",
- # "authentication_algorithm": "md5",
- # "bfd_liveness_detection": {
- # "detection_time": {
- # "threshold": 300000
- # },
- # "minimum_receive_interval": 4,
- # "multiplier": 10,
- # "no_adaptation": true,
- # "transmit_interval": {
- # "minimum_interval": 2
- # },
- # "version": "automatic"
- # },
- # "bgp_error_tolerance": {
- # "malformed_route_limit": 20000000
- # },
- # "bmp": {
- # "monitor": false,
- # "route_monitoring": {
- # "none": true
- # }
- # },
- # "damping": true,
- # "description": "This is configured with Junos_bgp resource module",
- # "egress_te_sid_stats": true,
- # "hold_time": 5,
- # "holddown_all_stale_labels": true,
- # "include_mp_next_hop": true,
- # "log_updown": true,
- # "no_advertise_peer_as": true,
- # "no_aggregator_id": true,
- # "no_client_reflect": true,
- # "out_delay": 10,
- # "precision_timers": true,
- # "preference": "2"
- # }
- #
+
+ # Task Output:
+ # ------------
+
+ # parsed:
+ # accept_remote_nexthop: true
+ # add_path_display_ipv4_address: true
+ # advertise_bgp_static:
+ # policy: static-to-bgp
+ # advertise_from_main_vpn_tables: true
+ # advertise_inactive: true
+ # as_number: '65432'
+ # authentication_algorithm: md5
+ # bfd_liveness_detection:
+ # detection_time:
+ # threshold: 300000
+ # minimum_receive_interval: 4
+ # multiplier: 10
+ # no_adaptation: true
+ # transmit_interval:
+ # minimum_interval: 2
+ # version: automatic
+ # bgp_error_tolerance:
+ # malformed_route_limit: 20000000
+ # bmp:
+ # monitor: false
+ # route_monitoring:
+ # none: true
+ # damping: true
+ # description: This is configured with Junos_bgp resource module
+ # egress_te_sid_stats: true
+ # groups:
+ # - name: internal
+ # out_delay: 8
+ # - name: external
+ # out_delay: 9
+ # - name: inboun
+ # type: internal
+ # - export: static-to-bgp
+ # local_address: 10.2.2.2
+ # name: ibgp
+ # neighbors:
+ # - neighbor_address: 10.1.1.1
+ # type: internal
+ # hold_time: 5
+ # holddown_all_stale_labels: true
+ # include_mp_next_hop: true
+ # log_updown: true
+ # no_advertise_peer_as: true
+ # no_aggregator_id: true
+ # no_client_reflect: true
+ # out_delay: 10
+ # precision_timers: true
+ # preference: '2'
+ # remove_private:
+ # set: true
@@ -11371,6 +11455,57 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27; &lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;nc:bgp&gt; &lt;nc:damping/&gt; &lt;nc:egress-te-sid-stats/&gt; &lt;nc:authentication-algorithm&gt;md5&lt;/nc:authentication-algorithm&gt; &lt;nc:description&gt;This is configured with Junos_bgp resource module&lt;/nc:description&gt; &lt;nc:hold-time&gt;5&lt;/nc:hold-time&gt; &lt;nc:bfd-liveness-detection&gt; &lt;nc:transmit-interval&gt; &lt;nc:minimum-interval&gt;2&lt;/nc:minimum-interval&gt; &lt;/nc:transmit-interval&gt; &lt;nc:minimum-receive-interval&gt;4&lt;/nc:minimum-receive-interval&gt; &lt;nc:multiplier&gt;10&lt;/nc:multiplier&gt; &lt;nc:no-adaptation/&gt; &lt;nc:version&gt;automatic&lt;/nc:version&gt; &lt;/nc:bfd-liveness-detection&gt; &lt;nc:bgp-error-tolerance&gt; &lt;nc:malformed-route-limit&gt;20000000&lt;/nc:malformed-route-limit&gt; &lt;/nc:bgp-error-tolerance&gt; &lt;nc:bmp&gt; &lt;nc:monitor&gt;enable&lt;/nc:monitor&gt; &lt;/nc:bmp&gt; &lt;/nc:bgp&gt; &lt;/nc:protocols&gt;&#x27;, &#x27;xml 2&#x27;, &#x27;xml 3&#x27;]</div>
</td>
</tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
+ </td>
+ </tr>
</table>
<br/><br/>
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_command_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_command_module.rst
index 96f550b31..f7aad42db 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_command_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_command_module.rst
@@ -197,17 +197,17 @@ Examples
- name: run multiple commands on remote nodes
junipernetworks.junos.junos_command:
commands:
- - show version
- - show interfaces
+ - show version
+ - show interfaces
- name: run multiple commands and evaluate the output
junipernetworks.junos.junos_command:
commands:
- - show version
- - show interfaces
+ - show version
+ - show interfaces
wait_for:
- - result[0] contains Juniper
- - result[1] contains Loopback0
+ - result[0] contains Juniper
+ - result[1] contains Loopback0
- name: run commands and specify the output format
junipernetworks.junos.junos_command:
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_config_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_config_module.rst
index 624ac8812..5abc26ee7 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_config_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_config_module.rst
@@ -70,7 +70,7 @@ Parameters
<td>
</td>
<td>
- <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>yes</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div>
+ <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>true</em>, if <code>backup</code> is set to <em>false</em> this option will be silently ignored.</div>
</td>
</tr>
<tr>
@@ -336,7 +336,7 @@ Notes
.. note::
- This module requires the netconf system service be enabled on the remote device being managed.
- - Abbreviated commands are NOT idempotent, see L(Network FAQ,../network/user_guide/faq.html
+ - Abbreviated commands are NOT idempotent, see `Network FAQ <../network/user_guide/faq.html>`_
- Loading JSON-formatted configuration *json* is supported starting in Junos OS Release 16.1 onwards.
- Update ``override`` not currently compatible with ``set`` notation.
- Tested against vSRX JUNOS version 15.1X49-D15.4, vqfx-10000 JUNOS Version 15.1X53-D60.4.
@@ -361,20 +361,20 @@ Examples
- name: load configure lines into device
junipernetworks.junos.junos_config:
lines:
- - set interfaces ge-0/0/1 unit 0 description "Test interface"
- - set vlans vlan01 description "Test vlan"
+ - set interfaces ge-0/0/1 unit 0 description "Test interface"
+ - set vlans vlan01 description "Test vlan"
comment: update config
- name: Set routed VLAN interface (RVI) IPv4 address
junipernetworks.junos.junos_config:
lines:
- - set vlans vlan01 vlan-id 1
- - set interfaces irb unit 10 family inet address 10.0.0.1/24
- - set vlans vlan01 l3-interface irb.10
+ - set vlans vlan01 vlan-id 1
+ - set interfaces irb unit 10 family inet address 10.0.0.1/24
+ - set vlans vlan01 l3-interface irb.10
- name: Check correctness of commit configuration
junipernetworks.junos.junos_config:
- check_commit: yes
+ check_commit: true
- name: rollback the configuration to id 10
junipernetworks.junos.junos_config:
@@ -382,31 +382,30 @@ Examples
- name: zero out the current configuration
junipernetworks.junos.junos_config:
- zeroize: yes
+ zeroize: true
- name: Set VLAN access and trunking
junipernetworks.junos.junos_config:
lines:
- - set vlans vlan02 vlan-id 6
- - set interfaces ge-0/0/6.0 family ethernet-switching interface-mode access vlan
- members vlan02
- - set interfaces ge-0/0/6.0 family ethernet-switching interface-mode trunk vlan
- members vlan02
+ - set vlans vlan02 vlan-id 6
+ - set interfaces ge-0/0/6.0 family ethernet-switching interface-mode access vlan
+ members vlan02
+ - set interfaces ge-0/0/6.0 family ethernet-switching interface-mode trunk vlan
+ members vlan02
- name: confirm a previous commit
junipernetworks.junos.junos_config:
- confirm_commit: yes
+ confirm_commit: true
- name: for idempotency, use full-form commands
junipernetworks.junos.junos_config:
lines:
- # - set int ge-0/0/1 unit 0 desc "Test interface"
- - set interfaces ge-0/0/1 unit 0 description "Test interface"
+ - set interfaces ge-0/0/1 unit 0 description "Test interface"
- name: configurable backup path
junipernetworks.junos.junos_config:
src: srx.cfg
- backup: yes
+ backup: true
backup_options:
filename: backup.cfg
dir_path: /home/user
@@ -434,7 +433,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<span style="color: purple">string</span>
</div>
</td>
- <td>when backup is yes</td>
+ <td>when backup is true</td>
<td>
<div>The full path to the backup file</div>
<br/>
@@ -451,7 +450,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<span style="color: purple">string</span>
</div>
</td>
- <td>when backup is yes</td>
+ <td>when backup is true</td>
<td>
<div>The date extracted from the backup file name</div>
<br/>
@@ -468,7 +467,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<span style="color: purple">string</span>
</div>
</td>
- <td>when backup is yes and filename is not specified in backup options</td>
+ <td>when backup is true and filename is not specified in backup options</td>
<td>
<div>The name of the backup file</div>
<br/>
@@ -485,7 +484,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<span style="color: purple">string</span>
</div>
</td>
- <td>when backup is yes and filename is not specified in backup options</td>
+ <td>when backup is true and filename is not specified in backup options</td>
<td>
<div>The full path to the backup file excluding the timestamp</div>
<br/>
@@ -502,7 +501,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<span style="color: purple">string</span>
</div>
</td>
- <td>when backup is yes</td>
+ <td>when backup is true</td>
<td>
<div>The time extracted from the backup file name</div>
<br/>
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_interfaces_module.rst
index a0e0238bd..0a5d41ae0 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_interfaces_module.rst
@@ -318,8 +318,8 @@ Notes
.. note::
- This module requires the netconf system service be enabled on the remote device being managed.
- Tested against vSRX JUNOS version 18.4R1.
- - This module works with connection ``netconf``.
- - See `the Junos OS Platform Options <https://docs.ansible.com/ansible/latest/network/user_guide/platform_junos.html>`_.
+ - This module works with connection ``netconf``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_junos.html
+ - The module examples uses callback plugin (stdout_callback = yaml) to generate task output in yaml format.
@@ -328,54 +328,158 @@ Examples
.. code-block:: yaml
- # Using deleted
+ # Using merged
# Before state:
# -------------
+ #
# user@junos01# show interfaces
# ge-0/0/1 {
- # description "Configured by Ansible-1";
- # speed 1g;
- # mtu 1800
- # unit 0 {
- # description "This is logical intf unit0";
+ # description "test interface";
+ # speed 1g;
# }
- # ge-0/0/2 {
- # description "Configured by Ansible-2";
- # ether-options {
- # auto-negotiation;
- # }
+ # fe-0/0/2 {
+ # vlan-tagging;
+ # unit 10 {
+ # vlan-id 10;
+ # }
+ # unit 11 {
+ # vlan-id 11;
+ # }
+ # }
+ # ge-0/0/3 {
+ # description "Configured by Ansible-3";
+ # }
+ # fxp0 {
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
# }
- - name: "Delete given options for the interface (Note: This won't delete the interface itself if any other values are configured for interface)"
+ - name: Merge provided configuration with device configuration (default operation
+ is merge)
junipernetworks.junos.junos_interfaces:
config:
- - name: ge-0/0/1
- description: Configured by Ansible-1
- speed: 1g
- mtu: 1800
- - name: ge-0/0/2
- description: Configured by Ansible -2
- state: deleted
+ - name: ge-0/0/1
+ description: Configured by Ansible-1
+ enabled: true
+ units:
+ - name: 0
+ description: "This is logical intf unit0"
+ mtu: 1800
+ - name: ge-0/0/2
+ description: Configured by Ansible-2
+ enabled: false
+ state: merged
+
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - description: test interface
+ # enabled: true
+ # name: ge-0/0/1
+ # speed: 1g
+ # - enabled: true
+ # name: fe-0/0/2
+ # - description: Configured by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:interface><nc:name>ge-0/0/1</nc:name>
+ # <nc:description>Configured by Ansible-1</nc:description><nc:mtu>1800</nc:mtu><nc:unit><nc:name>0</nc:name>
+ # <nc:description>This is logical intf unit0</nc:description></nc:unit></nc:interface><nc:interface><nc:name>ge-0/0/2</nc:name>
+ # <nc:description>Configured by Ansible-2</nc:description><nc:disable/></nc:interface></nc:interfaces>
+ # after:
+ # - description: Configured by Ansible-1
+ # enabled: true
+ # mtu: 1800
+ # name: ge-0/0/1
+ # speed: 1g
+ # units:
+ # - description: This is logical intf unit0
+ # name: 0
+ # - enabled: true
+ # name: fe-0/0/2
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # name: ge-0/0/2
+ # - description: Configured by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
# After state:
# ------------
+ #
# user@junos01# show interfaces
+ # ge-0/0/1 {
+ # description "Configured by Ansible-1";
+ # speed 1g;
+ # mtu 1800;
+ # unit 0 {
+ # description "This is logical intf unit0";
+ # }
+ # }
+ # fe-0/0/2 {
+ # vlan-tagging;
+ # unit 10 {
+ # vlan-id 10;
+ # }
+ # unit 11 {
+ # vlan-id 11;
+ # }
+ # }
# ge-0/0/2 {
- # ether-options {
- # auto-negotiation;
- # }
+ # description "Configured by Ansible-2";
+ # disable;
+ # }
+ # ge-0/0/3 {
+ # description "Configured by Ansible-3";
+ # }
+ # fxp0 {
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
# }
-
- # Using merged
+ # Using deleted
# Before state:
# -------------
- # user@junos01# show interfaces
+ #
# ge-0/0/1 {
- # description "test interface";
- # speed 1g;
+ # description "Configured by Ansible-1";
+ # speed 1g;
+ # mtu 1800;
+ # unit 0 {
+ # description "This is logical intf unit0";
+ # }
# }
# fe-0/0/2 {
# vlan-tagging;
@@ -386,82 +490,262 @@ Examples
# vlan-id 11;
# }
# }
+ # ge-0/0/2 {
+ # description "Configured by Ansible-2";
+ # disable;
+ # }
+ # ge-0/0/3 {
+ # description "Configured by Ansible-3";
+ # }
+ # fxp0 {
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
+ # }
- - name: Merge provided configuration with device configuration (default operation
- is merge)
+ - name: "Delete given options for the interface (Note: This won't delete the interface itself if any other values are configured for interface)"
junipernetworks.junos.junos_interfaces:
config:
- - name: ge-0/0/1
- description: Configured by Ansible-1
- enabled: true
- units:
- - name: 0
- description: "This is logical intf unit0"
- mtu: 1800
- - name: ge-0/0/2
- description: Configured by Ansible-2
- enabled: false
- state: merged
+ - name: ge-0/0/1
+ description: Configured by Ansible-1
+ speed: 1g
+ mtu: 1800
+ - name: ge-0/0/2
+ description: Configured by Ansible -2
+ state: deleted
+
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - description: Configured by Ansible-1
+ # enabled: true
+ # mtu: 1800
+ # name: ge-0/0/1
+ # speed: 1g
+ # units:
+ # - description: This is logical intf unit0
+ # name: 0
+ # - enabled: true
+ # name: fe-0/0/2
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # name: ge-0/0/2
+ # - description: Configured by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:interface>
+ # <nc:name>ge-0/0/1</nc:name><nc:description delete="delete"/>
+ # <nc:speed delete="delete"/><nc:mtu delete="delete"/><nc:link-mode delete="delete"/>
+ # <nc:disable delete="delete"/><nc:hold-time><nc:up delete="delete"/><nc:down delete="delete"/></nc:hold-time><nc:unit>
+ # <nc:name>0</nc:name><nc:description delete="delete"/></nc:unit></nc:interface><nc:interface><nc:name>ge-0/0/2</nc:name>
+ # <nc:description delete="delete"/><nc:speed delete="delete"/><nc:mtu delete="delete"/><nc:link-mode delete="delete"/>
+ # <nc:disable delete="delete"/><nc:hold-time><nc:up delete="delete"/><nc:down delete="delete"/></nc:hold-time></nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - enabled: true
+ # name: ge-0/0/1
+ # - enabled: true
+ # name: fe-0/0/2
+ # - description: Configured by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
# After state:
# ------------
+ #
# user@junos01# show interfaces
# ge-0/0/1 {
- # description "Configured by Ansible-1";
- # speed 1g;
- # mtu 1800
- # unit 0 {
- # description "This is logical intf unit0";
- # }
+ # unit 0;
# }
- # ge-0/0/2 {
- # disable;
- # description "Configured by Ansible-2";
+ # fe-0/0/2 {
+ # vlan-tagging;
+ # unit 10 {
+ # vlan-id 10;
+ # }
+ # unit 11 {
+ # vlan-id 11;
+ # }
+ # }
+ # ge-0/0/3 {
+ # description "Configured by Ansible-3";
+ # }
+ # fxp0 {
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
# }
-
# Using overridden
# Before state:
# -------------
+ #
# user@junos01# show interfaces
# ge-0/0/1 {
- # description "Configured by Ansible-1";
- # speed 1g;
- # mtu 1800
+ # unit 0;
# }
- # ge-0/0/2 {
- # disable;
- # description "Configured by Ansible-2";
- # ether-options {
- # auto-negotiation;
- # }
+ # fe-0/0/2 {
+ # vlan-tagging;
+ # unit 10 {
+ # vlan-id 10;
+ # }
+ # unit 11 {
+ # vlan-id 11;
+ # }
+ # }
+ # ge-0/0/3 {
+ # description "Configured by Ansible-3";
# }
- # ge-0/0/11 {
- # description "Configured by Ansible-11";
+ # fxp0 {
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
# }
- name: Override device configuration of all interfaces with provided configuration
junipernetworks.junos.junos_interfaces:
config:
- - name: ge-0/0/2
- description: Configured by Ansible-2
- enabled: false
- mtu: 2800
- - name: ge-0/0/3
- description: Configured by Ansible-3
+ - enabled: true
+ name: ge-0/0/1
+ - name: fe-0/0/2
+ description: Configured by Ansible-2
+ enabled: false
+ mtu: 2800
+ - description: Updated by Ansible-3
+ enabled: true
+ name: ge-0/0/3
+ - enabled: true
+ name: fxp0
+ - enabled: true
+ name: lo0
state: overridden
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - enabled: true
+ # name: ge-0/0/1
+ # - enabled: true
+ # name: fe-0/0/2
+ # - description: Configured by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface><nc:name>ge-0/0/1</nc:name><nc:description delete="delete"/>
+ # <nc:speed delete="delete"/><nc:mtu delete="delete"/><nc:link-mode delete="delete"/>
+ # <nc:disable delete="delete"/><nc:hold-time><nc:up delete="delete"/><nc:down delete="delete"/>
+ # </nc:hold-time></nc:interface><nc:interface><nc:name>fe-0/0/2</nc:name><nc:description delete="delete"/>
+ # <nc:speed delete="delete"/><nc:mtu delete="delete"/><nc:link-mode delete="delete"/><nc:disable delete="delete"/>
+ # <nc:hold-time><nc:up delete="delete"/><nc:down delete="delete"/></nc:hold-time></nc:interface><nc:interface>
+ # <nc:name>ge-0/0/3</nc:name><nc:description delete="delete"/><nc:speed delete="delete"/><nc:mtu delete="delete"/>
+ # <nc:link-mode delete="delete"/><nc:disable delete="delete"/><nc:hold-time>
+ # <nc:up delete="delete"/><nc:down delete="delete"/></nc:hold-time></nc:interface>
+ # <nc:interface><nc:name>fxp0</nc:name><nc:description delete="delete"/><nc:speed delete="delete"/>
+ # <nc:link-mode delete="delete"/><nc:disable delete="delete"/>
+ # <nc:hold-time><nc:up delete="delete"/><nc:down delete="delete"/>
+ # </nc:hold-time></nc:interface><nc:interface><nc:name>lo0</nc:name>
+ # <nc:description delete="delete"/><nc:disable delete="delete"/>
+ # <nc:hold-time><nc:up delete="delete"/><nc:down delete="delete"/>
+ # </nc:hold-time></nc:interface><nc:interface><nc:name>ge-0/0/1</nc:name>
+ # </nc:interface><nc:interface><nc:name>fe-0/0/2</nc:name>
+ # <nc:description>Configured by Ansible-2</nc:description>
+ # <nc:mtu>2800</nc:mtu><nc:disable/></nc:interface><nc:interface>
+ # <nc:name>ge-0/0/3</nc:name><nc:description>Updated by Ansible-3</nc:description>
+ # </nc:interface><nc:interface><nc:name>fxp0</nc:name></nc:interface><nc:interface>
+ # <nc:name>lo0</nc:name></nc:interface></nc:interfaces>
+ # after:
+ # - enabled: true
+ # name: ge-0/0/1
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # mtu: 2800
+ # name: fe-0/0/2
+ # - description: Updated by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
+
# After state:
# ------------
+ #
# user@junos01# show interfaces
- # ge-0/0/2 {
- # disable;
- # description "Configured by Ansible-2";
- # mtu 2800
+ # ge-0/0/1 {
+ # unit 0;
+ # }
+ # fe-0/0/2 {
+ # description "Configured by Ansible-2";
+ # disable;
+ # vlan-tagging;
+ # mtu 2800;
+ # unit 10 {
+ # vlan-id 10;
+ # }
+ # unit 11 {
+ # vlan-id 11;
+ # }
# }
# ge-0/0/3 {
- # description "Configured by Ansible-3";
+ # description "Updated by Ansible-3";
+ # }
+ # fxp0 {
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
# }
@@ -469,143 +753,212 @@ Examples
# Before state:
# -------------
+ #
# user@junos01# show interfaces
# ge-0/0/1 {
- # description "Configured by Ansible-1";
- # speed 1g;
- # mtu 1800
+ # unit 0;
# }
- # ge-0/0/2 {
- # disable;
- # mtu 1800;
- # speed 1g;
- # description "Configured by Ansible-2";
- # ether-options {
- # auto-negotiation;
- # }
+ # fe-0/0/2 {
+ # description "Configured by Ansible-2";
+ # disable;
+ # vlan-tagging;
+ # mtu 2800;
+ # unit 10 {
+ # vlan-id 10;
+ # }
+ # unit 11 {
+ # vlan-id 11;
+ # }
# }
- # ge-0/0/11 {
- # description "Configured by Ansible-11";
+ # ge-0/0/3 {
+ # description "Updated by Ansible-3";
+ # }
+ # fxp0 {
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
# }
- - name: Replaces device configuration of listed interfaces with provided configuration
+ - name: Replace device configuration of listed interfaces with provided configuration
junipernetworks.junos.junos_interfaces:
config:
- - name: ge-0/0/2
- description: Configured by Ansible-2
- enabled: false
- mtu: 2800
- - name: ge-0/0/3
- description: Configured by Ansible-3
+ - name: ge-0/0/2
+ description: Configured by Ansible-2
+ enabled: false
+ mtu: 2800
+ - name: ge-0/0/3
+ description: Configured by Ansible-3
state: replaced
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - enabled: true
+ # name: ge-0/0/1
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # mtu: 2800
+ # name: fe-0/0/2
+ # - description: Updated by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:interface>
+ # <nc:name>ge-0/0/2</nc:name><nc:description delete="delete"/><nc:speed delete="delete"/>
+ # <nc:mtu delete="delete"/><nc:link-mode delete="delete"/><nc:disable delete="delete"/>
+ # <nc:hold-time><nc:up delete="delete"/><nc:down delete="delete"/></nc:hold-time></nc:interface>
+ # <nc:interface><nc:name>ge-0/0/3</nc:name><nc:description delete="delete"/><nc:speed delete="delete"/>
+ # <nc:mtu delete="delete"/><nc:link-mode delete="delete"/><nc:disable delete="delete"/><nc:hold-time>
+ # <nc:up delete="delete"/><nc:down delete="delete"/></nc:hold-time></nc:interface><nc:interface><nc:name>ge-0/0/2</nc:name>
+ # <nc:description>Configured by Ansible-2</nc:description><nc:mtu>2800</nc:mtu><nc:disable/></nc:interface><nc:interface>
+ # <nc:name>ge-0/0/3</nc:name><nc:description>Configured by Ansible-3</nc:description></nc:interface></nc:interfaces>
+ # after:
+ # - enabled: true
+ # name: ge-0/0/1
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # mtu: 2800
+ # name: fe-0/0/2
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # mtu: 2800
+ # name: ge-0/0/2
+ # - description: Configured by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
+
# After state:
# ------------
+ #
# user@junos01# show interfaces
# ge-0/0/1 {
- # description "Configured by Ansible-1";
- # speed 1g;
- # mtu 1800
- # }
- # ge-0/0/2 {
- # disable;
- # description "Configured by Ansible-2";
- # mtu 2800
- # }
- # ge-0/0/3 {
- # description "Configured by Ansible-3";
- # }
- # ge-0/0/11 {
- # description "Configured by Ansible-11";
+ # unit 0;
# }
- # Using gathered
- # Before state:
- # ------------
- #
- # vagrant@vsrx# show interfaces
# fe-0/0/2 {
- # description "This is interface DESCRIPTION";
+ # description "Configured by Ansible-2";
+ # disable;
# vlan-tagging;
+ # mtu 2800;
# unit 10 {
- # description "UNIT 10 DESCRIPTION";
# vlan-id 10;
# }
# unit 11 {
- # description "UNIT 11 DESCRIPTION";
# vlan-id 11;
# }
# }
+ # ge-0/0/2 {
+ # description "Configured by Ansible-2";
+ # disable;
+ # mtu 2800;
+ # }
+ # ge-0/0/3 {
+ # description "Configured by Ansible-3";
+ # }
# fxp0 {
- # description OUTER;
# unit 0 {
- # description "Sample config";
# family inet {
# dhcp;
# }
# }
# }
- #
- - name: Gather junos interfaces as in given arguments
- junipernetworks.junos.junos_interfaces:
- state: gathered
- # Task Output (redacted)
- # -----------------------
- #
- # "gathered": [
- # {
- # "description": "This is interface DESCRIPTION",
- # "enabled": true,
- # "name": "fe-0/0/2",
- # "units": [
- # {
- # "description": "UNIT 10 DESCRIPTION",
- # "name": 10
- # },
- # {
- # "description": "UNIT 11 DESCRIPTION",
- # "name": 11
- # }
- # ]
- # },
- # {
- # "description": "OUTER",
- # "enabled": true,
- # "name": "fxp0",
- # "units": [
- # {
- # "description": "Sample config",
- # "name": 0
- # }
- # ]
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
# }
- # ]
- # After state:
+ # }
+ # }
+
+ # Using gathered
+
+ # Before state:
# ------------
#
# vagrant@vsrx# show interfaces
+ # ge-0/0/1 {
+ # unit 0;
+ # }
# fe-0/0/2 {
- # description "This is interface DESCRIPTION";
+ # description "Configured by Ansible-2";
+ # disable;
# vlan-tagging;
+ # mtu 2800;
# unit 10 {
- # description "UNIT 10 DESCRIPTION";
# vlan-id 10;
# }
# unit 11 {
- # description "UNIT 11 DESCRIPTION";
# vlan-id 11;
# }
# }
+ # ge-0/0/2 {
+ # description "Configured by Ansible-2";
+ # disable;
+ # mtu 2800;
+ # }
+ # ge-0/0/3 {
+ # description "Configured by Ansible-3";
+ # }
# fxp0 {
- # description OUTER;
# unit 0 {
- # description "Sample config";
# family inet {
# dhcp;
# }
# }
# }
+ # lo0 {
+ # unit 0 {
+ # family inet {
+ # address 192.0.2.1/32;
+ # }
+ # }
+ # }
+
+ - name: Gather junos interfaces as in given arguments
+ junipernetworks.junos.junos_interfaces:
+ state: gathered
+
+ # Task Output
+ # -----------
#
+ # gathered:
+ # - enabled: true
+ # name: ge-0/0/1
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # mtu: 2800
+ # name: fe-0/0/2
+ # - description: Configured by Ansible-2
+ # enabled: false
+ # mtu: 2800
+ # name: ge-0/0/2
+ # - description: Configured by Ansible-3
+ # enabled: true
+ # name: ge-0/0/3
+ # - enabled: true
+ # name: fxp0
+ # - enabled: true
+ # name: lo0
+
# Using parsed
+
# parsed.cfg
# ------------
#
@@ -639,46 +992,48 @@ Examples
# </interfaces>
# </configuration>
# </rpc-reply>
- # - name: Convert interfaces config to argspec without connecting to the appliance
+
+ # - name: Convert interfaces config to structured data without connecting to the appliance
# junipernetworks.junos.junos_interfaces:
# running_config: "{{ lookup('file', './parsed.cfg') }}"
# state: parsed
- # Task Output (redacted)
- # -----------------------
- # "parsed": [
- # {
- # "description": "Configured by Ansible",
- # "duplex": "full-duplex",
- # "enabled": false,
- # "hold_time": {
- # "down": 2200,
- # "up": 2000
- # },
- # "mtu": 1024,
- # "name": "ge-0/0/1",
- # "speed": "100m"
- # }
- # ]
+
+ # Task Output
+ # -----------
#
+ # parsed:
+ # - description: Configured by Ansible
+ # duplex: full-duplex
+ # enabled: false
+ # hold_time:
+ # down: 2200
+ # up: 2000
+ # mtu: 1024
+ # name: ge-0/0/1
+ # speed: 100m
+
# Using rendered
+
- name: Render platform specific xml from task input using rendered state
junipernetworks.junos.junos_interfaces:
config:
- - name: ge-0/0/2
- description: Configured by Ansibull
- mtu: 2048
- speed: 20m
- hold_time:
- up: 3200
- down: 3200
+ - name: ge-0/0/2
+ description: Configured by Ansible
+ mtu: 2048
+ speed: 20m
+ hold_time:
+ up: 3200
+ down: 3200
state: rendered
- # Task Output (redacted)
- # -----------------------
- # "rendered": <nc:interfaces
+
+ # Task Output
+ # -----------
+ #
+ # rendered: <nc:interfaces
# xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:interface>
# <nc:name>ge-0/0/2</nc:name>
- # <nc:description>Configured by Ansibull</nc:description>
+ # <nc:description>Configured by Ansible</nc:description>
# <nc:speed>20m</nc:speed>
# <nc:mtu>2048</nc:mtu>
# <nc:hold-time>
@@ -741,6 +1096,57 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
<b>xml</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l2_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l2_interfaces_module.rst
index c39d2b55e..b14828db2 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l2_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l2_interfaces_module.rst
@@ -246,7 +246,8 @@ Notes
.. note::
- This module requires the netconf system service be enabled on the remote device being managed.
- Tested against vSRX JUNOS version 18.4R1.
- - This module works with connection ``netconf``. See `the Junos OS Platform Options <../network/user_guide/platform_junos.html>`_.
+ - This module works with connection ``netconf``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_junos.html
+ - The module examples uses callback plugin (stdout_callback = yaml) to generate task output in yaml format.
@@ -255,119 +256,162 @@ Examples
.. code-block:: yaml
- # Using deleted
+ # Using merged
# Before state:
# -------------
#
# ansible@junos01# show interfaces
# ge-0/0/1 {
- # description "L2 interface";
- # speed 1g;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members vlan30;
- # }
- # }
- # }
- #}
- #ge-0/0/2 {
- # description "non L2 interface";
- # unit 0 {
- # family inet {
- # address 192.168.56.14/24;
- # }
- # }
-
- - name: "Delete L2 attributes of given interfaces (Note: This won't delete the
- interface itself)."
- junipernetworks.junos.junos_l2_interfaces:
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- state: deleted
-
- # After state:
- # ------------
- #
- # ansible@junos01# show interfaces
- # ge-0/0/1 {
- # description "L2 interface";
- # speed 1g;
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
# }
- #ge-0/0/2 {
- # description "non L2 interface";
- # unit 0 {
- # family inet {
- # address 192.168.56.14/24;
- # }
- # }
-
-
- # Using merged
-
- # Before state:
- # -------------
- # ansible@junos01# show interfaces
# ge-0/0/3 {
- # description "test interface";
- # speed 1g;
- #}
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode access;
+ # }
+ # }
+ # }
# ge-0/0/4 {
- # description interface-trunk;
- # native-vlan-id 100;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode trunk;
- # vlan {
- # members [ vlan40 ];
- # }
- # }
- # }
- # }
-
- - name: Merge provided configuration with device configuration (default operation
- is merge)
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode access;
+ # }
+ # }
+ # }
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
+ # }
+
+ - name: Merge provided configuration with device configuration
junipernetworks.junos.junos_l2_interfaces:
config:
- - name: ge-0/0/3
- access:
- vlan: v101
- - name: ge-0/0/4
- trunk:
- allowed_vlans:
- - vlan30
- native_vlan: 50
+ - name: ge-0/0/3
+ access:
+ vlan: v101
+ - name: ge-0/0/4
+ trunk:
+ allowed_vlans:
+ - vlan30
+ native_vlan: 50
state: merged
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - enhanced_layer: true
+ # name: ge-0/0/3
+ # unit: 0
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # unit: 0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/3</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode>access</nc:interface-mode>
+ # <nc:vlan>
+ # <nc:members>v101</nc:members>
+ # </nc:vlan>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/4</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode>trunk</nc:interface-mode>
+ # <nc:vlan>
+ # <nc:members>vlan30</nc:members>
+ # </nc:vlan>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # <nc:native-vlan-id>50</nc:native-vlan-id>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - access:
+ # vlan: v101
+ # enhanced_layer: true
+ # name: ge-0/0/3
+ # unit: 0
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # trunk:
+ # allowed_vlans:
+ # - vlan30
+ # native_vlan: '50'
+ # unit: 0
+
# After state:
# ------------
+ #
# user@junos01# show interfaces
+ # ge-0/0/1 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
# ge-0/0/3 {
- # description "test interface";
- # speed 1g;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members v101;
- # }
- # }
- # }
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode access;
+ # vlan {
+ # members v101;
+ # }
+ # }
+ # }
# }
# ge-0/0/4 {
- # description interface-trunk;
- # native-vlan-id 50;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode trunk;
- # vlan {
- # members [ vlan40 vlan30 ];
- # }
- # }
- # }
+ # native-vlan-id 50;
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode trunk;
+ # vlan {
+ # members vlan30;
+ # }
+ # }
+ # }
+ # }
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
# }
@@ -376,94 +420,211 @@ Examples
# Before state:
# -------------
# ansible@junos01# show interfaces
+ # ge-0/0/1 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
# ge-0/0/3 {
- # description "test interface";
- # speed 1g;
- #}
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode access;
+ # vlan {
+ # members v101;
+ # }
+ # }
+ # }
+ # }
# ge-0/0/4 {
- # description interface-trunk;
- # native-vlan-id 100;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode trunk;
- # vlan {
- # members [ vlan40 ];
- # }
- # }
- # }
- # }
- # ge-0/0/5 {
- # description "Configured by Ansible-11";
- # unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members v101;
- # }
- # }
- # }
+ # native-vlan-id 50;
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode trunk;
+ # vlan {
+ # members vlan30;
+ # }
+ # }
+ # }
+ # }
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
# }
- name: Override provided configuration with device configuration
junipernetworks.junos.junos_l2_interfaces:
config:
- - name: ge-0/0/3
- access:
- vlan: v101
- name: ge-0/0/4
trunk:
allowed_vlans:
- - vlan30
- native_vlan: 50
+ - v101
+ native_vlan: 30
state: overridden
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - access:
+ # vlan: v101
+ # enhanced_layer: true
+ # name: ge-0/0/3
+ # unit: 0
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # trunk:
+ # allowed_vlans:
+ # - vlan30
+ # native_vlan: '50'
+ # unit: 0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/4</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode delete="delete"/>
+ # <nc:vlan delete="delete"/>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # <nc:native-vlan-id delete="delete"/>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/4</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode>trunk</nc:interface-mode>
+ # <nc:vlan>
+ # <nc:members>v101</nc:members>
+ # </nc:vlan>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # <nc:native-vlan-id>30</nc:native-vlan-id>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/3</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode delete="delete"/>
+ # <nc:vlan delete="delete"/>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # <nc:native-vlan-id delete="delete"/>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # trunk:
+ # allowed_vlans:
+ # - v101
+ # native_vlan: '30'
+ # unit: 0
+
# After state:
# ------------
# user@junos01# show interfaces
+ # ge-0/0/1 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
# ge-0/0/3 {
- # unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members v101;
- # }
- # }
- # }
+ # unit 0 {
+ # family ethernet-switching;
+ # }
# }
# ge-0/0/4 {
- # description interface-trunk;
- # native-vlan-id 50;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode trunk;
- # vlan {
- # members [ vlan30 ];
- # }
- # }
- # }
+ # native-vlan-id 30;
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode trunk;
+ # vlan {
+ # members v101;
+ # }
+ # }
+ # }
+ # }
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
# }
-
# Using replaced
# Before state:
# -------------
+ #
# ansible@junos01# show interfaces
+ # ge-0/0/1 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
# ge-0/0/3 {
- # description "test interface";
- # speed 1g;
- #}
+ # unit 0 {
+ # family ethernet-switching;
+ # }
+ # }
# ge-0/0/4 {
- # description interface-trunk;
- # native-vlan-id 100;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode trunk;
- # vlan {
- # members [ vlan40 ];
- # }
- # }
- # }
+ # native-vlan-id 30;
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode trunk;
+ # vlan {
+ # members v101;
+ # }
+ # }
+ # }
+ # }
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
# }
- name: Replace provided configuration with device configuration
@@ -479,111 +640,268 @@ Examples
native_vlan: 50
state: replaced
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # trunk:
+ # allowed_vlans:
+ # - v101
+ # native_vlan: '30'
+ # unit: 0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/4</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode delete="delete"/>
+ # <nc:vlan delete="delete"/>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # <nc:native-vlan-id delete="delete"/>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/3</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode>access</nc:interface-mode>
+ # <nc:vlan>
+ # <nc:members>v101</nc:members>
+ # </nc:vlan>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/4</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode>trunk</nc:interface-mode>
+ # <nc:vlan>
+ # <nc:members>vlan30</nc:members>
+ # </nc:vlan>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # <nc:native-vlan-id>50</nc:native-vlan-id>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - access:
+ # vlan: v101
+ # enhanced_layer: true
+ # name: ge-0/0/3
+ # unit: 0
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # trunk:
+ # allowed_vlans:
+ # - vlan30
+ # native_vlan: '50'
+ # unit: 0
+
# After state:
# ------------
+ #
# user@junos01# show interfaces
+ # ge-0/0/1 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
# ge-0/0/3 {
- # unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members v101;
- # }
- # }
- # }
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode access;
+ # vlan {
+ # members v101;
+ # }
+ # }
+ # }
# }
# ge-0/0/4 {
- # description interface-trunk;
- # native-vlan-id 50;
- # unit 0 {
- # family ethernet-switching {
- # interface-mode trunk;
- # vlan {
- # members [ vlan30 ];
- # }
- # }
- # }
+ # native-vlan-id 50;
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode trunk;
+ # vlan {
+ # members vlan30;
+ # }
+ # }
+ # }
# }
- # Using gathered
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
+ # }
+
+ # Using deleted
+
# Before state:
- # ------------
+ # -------------
#
- # user@junos01# show interfaces
+ # ansible@junos01# show interfaces
# ge-0/0/1 {
- # description "Configured by Ansible";
- # disable;
- # speed 100m;
- # mtu 1024;
- # hold-time up 2000 down 2200;
- # link-mode full-duplex;
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/3 {
# unit 0 {
# family ethernet-switching {
# interface-mode access;
# vlan {
- # members vlan100;
+ # members v101;
# }
# }
# }
# }
- # ge-0/0/2 {
- # description "Configured by Ansible";
- # native-vlan-id 400;
- # speed 10m;
- # mtu 2048;
- # hold-time up 3000 down 3200;
+ # ge-0/0/4 {
+ # native-vlan-id 50;
# unit 0 {
# family ethernet-switching {
# interface-mode trunk;
# vlan {
- # members [ vlan200 vlan300 ];
+ # members vlan30;
# }
# }
# }
# }
- # em1 {
- # description TEST;
- # }
# fxp0 {
- # description ANSIBLE;
- # speed 1g;
- # link-mode automatic;
+ # enable;
# unit 0 {
# family inet {
- # address 10.8.38.38/24;
+ # dhcp;
# }
+ # family inet6;
# }
# }
- - name: Gather junos layer 2 interfaces as in given arguments
+
+ - name: "Delete L2 attributes of given interfaces (Note: This won't delete the
+ interface itself)."
junipernetworks.junos.junos_l2_interfaces:
- state: gathered
- # Task Output (redacted)
- # -----------------------
+ config:
+ - name: ge-0/0/1
+ - name: ge-0/0/2
+ state: deleted
+
+ # Task Output
+ # -----------
#
- # "gathered": [
- # {
- # "access": {
- # "vlan": "vlan100"
- # },
- # "enhanced_layer": true,
- # "name": "ge-0/0/1",
- # "unit": 0
- # },
- # {
- # "enhanced_layer": true,
- # "name": "ge-0/0/2",
- # "trunk": {
- # "allowed_vlans": [
- # "vlan200",
- # "vlan300"
- # ],
- # "native_vlan": "400"
- # },
- # "unit": 0
- # }
- # ]
+ # before:
+ # - access:
+ # vlan: v101
+ # enhanced_layer: true
+ # name: ge-0/0/3
+ # unit: 0
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # trunk:
+ # allowed_vlans:
+ # - vlan30
+ # native_vlan: '50'
+ # unit: 0
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/3</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:ethernet-switching>
+ # <nc:interface-mode delete="delete"/>
+ # <nc:vlan delete="delete"/>
+ # </nc:ethernet-switching>
+ # </nc:family>
+ # </nc:unit>
+ # <nc:native-vlan-id delete="delete"/>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - enhanced_layer: true
+ # name: ge-0/0/4
+ # trunk:
+ # allowed_vlans:
+ # - vlan30
+ # native_vlan: '50'
+ # unit: 0
+
# After state:
# ------------
#
+ # ansible@junos01# show interfaces
+ # ge-0/0/1 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/2 {
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
+ # }
+ # ge-0/0/3 {
+ # unit 0 {
+ # family ethernet-switching;
+ # }
+ # }
+ # ge-0/0/4 {
+ # native-vlan-id 50;
+ # unit 0 {
+ # family ethernet-switching {
+ # interface-mode trunk;
+ # vlan {
+ # members vlan30;
+ # }
+ # }
+ # }
+ # }
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
+ # }
+
+ # Using gathered
+
+ # Before state:
+ # -------------
+ #
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Configured by Ansible";
@@ -629,7 +947,31 @@ Examples
# }
# }
# }
+
+ - name: Gather junos layer 2 interfaces facts
+ junipernetworks.junos.junos_l2_interfaces:
+ state: gathered
+
+ # Task Output
+ # -----------
+ #
+ # gathered:
+ # - access:
+ # vlan: vlan100
+ # enhanced_layer: true
+ # name: ge-0/0/1
+ # unit: 0
+ # - enhanced_layer: true
+ # name: ge-0/0/2
+ # trunk:
+ # allowed_vlans:
+ # - vlan200
+ # - vlan300
+ # native_vlan: '400'
+ # unit: 0
+
# Using parsed
+
# parsed.cfg
# ------------
#
@@ -663,36 +1005,32 @@ Examples
# </interfaces>
# </configuration>
# </rpc-reply>
- # - name: Convert interfaces config to argspec without connecting to the appliance
- # junipernetworks.junos.junos_l2_interfaces:
- # running_config: "{{ lookup('file', './parsed.cfg') }}"
- # state: parsed
- # Task Output (redacted)
- # -----------------------
- # "parsed": [
- # {
- # "access": {
- # "vlan": "vlan100"
- # },
- # "enhanced_layer": true,
- # "name": "ge-0/0/1",
- # "unit": 0
- # },
- # {
- # "enhanced_layer": true,
- # "name": "ge-0/0/2",
- # "trunk": {
- # "allowed_vlans": [
- # "vlan200",
- # "vlan300"
- # ],
- # "native_vlan": "400"
- # },
- # "unit": 0
- # }
- # ]
+
+ - name: Convert interfaces config to argspec without connecting to the appliance
+ junipernetworks.junos.junos_l2_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+ # Task Output
+ # -----------
#
+ # parsed:
+ # - access:
+ # vlan: vlan100
+ # enhanced_layer: true
+ # name: ge-0/0/1
+ # unit: 0
+ # - enhanced_layer: true
+ # name: ge-0/0/2
+ # trunk:
+ # allowed_vlans:
+ # - vlan200
+ # - vlan300
+ # native_vlan: '400'
+ # unit: 0
+
# Using rendered
+
- name: Render platform specific xml from task input using rendered state
junipernetworks.junos.junos_l2_interfaces:
config:
@@ -706,10 +1044,11 @@ Examples
- vlan300
native_vlan: '400'
state: rendered
- # Task Output (redacted)
- # -----------------------
- # "rendered": "<nc:interfaces
- # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+
+ # Task Output
+ # -----------
+ #
+ # "rendered": "<nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:interface>
# <nc:name>ge-0/0/1</nc:name>
# <nc:unit>
@@ -809,6 +1148,57 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:interfaces xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;nc:interface&gt; &lt;nc:name&gt;ge-0/0/1&lt;/nc:name&gt; &lt;nc:unit&gt; &lt;nc:name&gt;0&lt;/nc:name&gt; &lt;nc:family&gt; &lt;nc:ethernet-switching&gt; &lt;nc:interface-mode&gt;access&lt;/nc:interface-mode&gt; &lt;nc:vlan&gt; &lt;nc:members&gt;vlan100&lt;/nc:members&gt; &lt;/nc:vlan&gt; &lt;/nc:ethernet-switching&gt; &lt;/nc:family&gt; &lt;/nc:unit&gt; &lt;/nc:interface&gt; &lt;nc:interface&gt; &lt;nc:name&gt;ge-0/0/2&lt;/nc:name&gt; &lt;nc:unit&gt; &lt;nc:name&gt;0&lt;/nc:name&gt; &lt;nc:family&gt; &lt;nc:ethernet-switching&gt; &lt;nc:interface-mode&gt;trunk&lt;/nc:interface-mode&gt; &lt;nc:vlan&gt; &lt;nc:members&gt;vlan200&lt;/nc:members&gt; &lt;nc:members&gt;vlan300&lt;/nc:members&gt; &lt;/nc:vlan&gt; &lt;/nc:ethernet-switching&gt; &lt;/nc:family&gt; &lt;/nc:unit&gt; &lt;nc:native-vlan-id&gt;400&lt;/nc:native-vlan-id&gt; &lt;/nc:interface&gt; &lt;/nc:interfaces&gt;&#x27;, &#x27;xml 2&#x27;, &#x27;xml 3&#x27;]</div>
</td>
</tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
+ </td>
+ </tr>
</table>
<br/><br/>
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l3_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l3_interfaces_module.rst
index 3ec94094d..ef68d82f2 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l3_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_l3_interfaces_module.rst
@@ -210,8 +210,9 @@ Notes
.. note::
- This module requires the netconf system service be enabled on the device being managed.
- - This module works with connection ``netconf``. See `the Junos OS Platform Options <../network/user_guide/platform_junos.html>`_.
- Tested against JunOS v18.4R1
+ - This module works with connection ``netconf``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_junos.html
+ - The module examples uses callback plugin (stdout_callback = yaml) to generate task output in yaml format.
@@ -220,75 +221,22 @@ Examples
.. code-block:: yaml
- # Using deleted
-
- # Before state:
- # -------------
- #
- # admin# show interfaces
- # ge-0/0/1 {
- # description "L3 interface";
- # unit 0 {
- # family inet {
- # address 10.200.16.10/24;
- # }
- # }
- # }
- # ge-0/0/2 {
- # description "non L3 interface";
- # unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members 2;
- # }
- # }
- # }
- # }
-
- - name: Delete JUNOS L3 logical interface
- junipernetworks.junos.junos_l3_interfaces:
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- state: deleted
-
- # After state:
- # ------------
- #
- # admin# show interfaces
- # ge-0/0/1 {
- # description "deleted L3 interface";
- # }
- # ge-0/0/2 {
- # description "non L3 interface";
- # unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members 2;
- # }
- # }
- # }
- # }
# Using merged
+
# Before state
# ------------
#
# admin# show interfaces
- # ge-0/0/1 {
- # description "L3 interface";
+ # fxp0 {
+ # enable;
# unit 0 {
# family inet {
- # address 10.200.16.10/24;
+ # dhcp;
# }
# }
# }
- # ge-0/0/2 {
- # description "non configured interface";
- # unit 0;
- # }
- - name: Merge provided configuration with device configuration (default operation is merge)
+
+ - name: Merge provided configuration with device configuration
junipernetworks.junos.junos_l3_interfaces:
config:
- name: ge-0/0/1
@@ -301,15 +249,71 @@ Examples
- address: dhcp
state: merged
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/1</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:address>
+ # <nc:name>192.168.1.10/24</nc:name>
+ # </nc:address>
+ # </nc:inet>
+ # </nc:family>
+ # <nc:family>
+ # <nc:inet6>
+ # <nc:address>
+ # <nc:name>8d8d:8d01::1/64</nc:name>
+ # </nc:address>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/2</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:dhcp/>
+ # </nc:inet>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - ipv4:
+ # - address: 192.168.1.10/24
+ # ipv6:
+ # - address: 8d8d:8d01::1/64
+ # name: ge-0/0/1
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: ge-0/0/2
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+
# After state:
# ------------
#
# admin# show interfaces
# ge-0/0/1 {
- # description "L3 interface";
# unit 0 {
# family inet {
- # address 10.200.16.10/24;
# address 192.168.1.10/24;
# }
# family inet6 {
@@ -318,14 +322,20 @@ Examples
# }
# }
# ge-0/0/2 {
- # description "L3 interface with dhcp";
# unit 0 {
# family inet {
# dhcp;
# }
# }
# }
-
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # }
+ # }
# Using overridden
@@ -334,26 +344,27 @@ Examples
#
# admin# show interfaces
# ge-0/0/1 {
- # description "L3 interface";
# unit 0 {
# family inet {
- # address 10.200.16.10/24;
+ # address 192.168.1.10/24;
+ # }
+ # family inet6 {
+ # address 8d8d:8d01::1/64;
# }
# }
# }
# ge-0/0/2 {
- # description "L3 interface with dhcp";
# unit 0 {
# family inet {
# dhcp;
# }
# }
# }
- # ge-0/0/3 {
- # description "another L3 interface";
+ # fxp0 {
+ # enable;
# unit 0 {
# family inet {
- # address 192.168.1.10/24;
+ # dhcp;
# }
# }
# }
@@ -364,42 +375,139 @@ Examples
- name: ge-0/0/1
ipv4:
- address: 192.168.1.10/24
- ipv6:
- - address: 8d8d:8d01::1/64
- - name: ge-0/0/2
- ipv6:
- - address: 2001:db8:3000::/64
+ - ipv4:
+ - address: dhcp
+ name: fxp0
+ unit: '0'
state: overridden
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - ipv4:
+ # - address: 192.168.1.10/24
+ # ipv6:
+ # - address: 8d8d:8d01::1/64
+ # name: ge-0/0/1
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: ge-0/0/2
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/1</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:address delete="delete"/>
+ # </nc:inet>
+ # <nc:inet6>
+ # <nc:address delete="delete"/>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/2</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:dhcp delete="delete"/>
+ # </nc:inet>
+ # <nc:inet6>
+ # <nc:address delete="delete"/>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>fxp0</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:dhcp delete="delete"/>
+ # </nc:inet>
+ # <nc:inet6>
+ # <nc:address delete="delete"/>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/1</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:address>
+ # <nc:name>192.168.1.10/24</nc:name>
+ # </nc:address>
+ # </nc:inet>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>fxp0</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:dhcp/>
+ # </nc:inet>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - ipv4:
+ # - address: 192.168.1.10/24
+ # name: ge-0/0/1
+ # unit: '0'
+ # - name: ge-0/0/2
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+
# After state:
# ------------
#
# admin# show interfaces
# ge-0/0/1 {
- # description "L3 interface";
# unit 0 {
# family inet {
# address 192.168.1.10/24;
# }
- # family inet6 {
- # address 8d8d:8d01::1/64;
- # }
+ # family inet6;
# }
# }
# ge-0/0/2 {
- # description "L3 interface with ipv6";
# unit 0 {
- # family inet6 {
- # address 2001:db8:3000::/64;
- # }
+ # family inet;
+ # family inet6;
# }
# }
- # ge-0/0/3 {
- # description "overridden L3 interface";
- # unit 0;
+ # fxp0 {
+ # enable;
+ # unit 0 {
+ # family inet {
+ # dhcp;
+ # }
+ # family inet6;
+ # }
# }
-
# Using replaced
# Before state
@@ -407,23 +515,26 @@ Examples
#
# admin# show interfaces
# ge-0/0/1 {
- # description "L3 interface";
# unit 0 {
# family inet {
- # address 10.200.16.10/24;
+ # address 192.168.1.10/24;
# }
+ # family inet6;
# }
# }
# ge-0/0/2 {
- # description "non configured interface";
- # unit 0;
+ # unit 0 {
+ # family inet;
+ # family inet6;
+ # }
# }
- # ge-0/0/3 {
- # description "another L3 interface";
+ # fxp0 {
+ # enable;
# unit 0 {
# family inet {
- # address 192.168.1.10/24;
+ # dhcp;
# }
+ # family inet6;
# }
# }
@@ -440,12 +551,101 @@ Examples
- address: dhcp
state: replaced
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - ipv4:
+ # - address: 192.168.1.10/24
+ # name: ge-0/0/1
+ # unit: '0'
+ # - name: ge-0/0/2
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/1</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:address delete="delete"/>
+ # </nc:inet>
+ # <nc:inet6>
+ # <nc:address delete="delete"/>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/2</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet/>
+ # <nc:inet6>
+ # <nc:address delete="delete"/>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/1</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:address>
+ # <nc:name>192.168.1.10/24</nc:name>
+ # </nc:address>
+ # </nc:inet>
+ # </nc:family>
+ # <nc:family>
+ # <nc:inet6>
+ # <nc:address>
+ # <nc:name>8d8d:8d01::1/64</nc:name>
+ # </nc:address>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/2</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:dhcp/>
+ # </nc:inet>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - ipv4:
+ # - address: 192.168.1.10/24
+ # ipv6:
+ # - address: 8d8d:8d01::1/64
+ # name: ge-0/0/1
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: ge-0/0/2
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+
# After state:
# ------------
#
# admin# show interfaces
# ge-0/0/1 {
- # description "L3 interface";
# unit 0 {
# family inet {
# address 192.168.1.10/24;
@@ -456,151 +656,152 @@ Examples
# }
# }
# ge-0/0/2 {
- # description "L3 interface with dhcp";
# unit 0 {
# family inet {
# dhcp;
# }
+ # family inet6;
# }
# }
- # ge-0/0/3 {
- # description "another L3 interface";
+ # fxp0 {
+ # enable;
# unit 0 {
# family inet {
- # address 192.168.1.10/24;
+ # dhcp;
# }
+ # family inet6;
# }
# }
- # Using gathered
+
+ # Using deleted
+
# Before state:
- # ------------
+ # -------------
#
- # user@junos01# show interfaces
+ # admin# show interfaces
# ge-0/0/1 {
- # description "Configured by Ansible";
- # disable;
- # speed 100m;
- # mtu 1024;
- # hold-time up 2000 down 2200;
- # link-mode full-duplex;
# unit 0 {
- # family ethernet-switching {
- # interface-mode access;
- # vlan {
- # members vlan100;
- # }
+ # family inet {
+ # address 192.168.1.10/24;
+ # }
+ # family inet6 {
+ # address 8d8d:8d01::1/64;
# }
# }
# }
# ge-0/0/2 {
- # description "Configured by Ansible";
- # native-vlan-id 400;
- # speed 10m;
- # mtu 2048;
- # hold-time up 3000 down 3200;
# unit 0 {
- # family ethernet-switching {
- # interface-mode trunk;
- # vlan {
- # members [ vlan200 vlan300 ];
- # }
+ # family inet {
+ # dhcp;
# }
+ # family inet6;
# }
# }
- # ge-1/0/0 {
+ # fxp0 {
+ # enable;
# unit 0 {
# family inet {
- # address 192.168.100.1/24;
- # address 10.200.16.20/24;
+ # dhcp;
# }
# family inet6;
# }
# }
- # ge-2/0/0 {
+
+ - name: Delete L3 logical interface
+ junipernetworks.junos.junos_l3_interfaces:
+ config:
+ - name: ge-0/0/1
+ - name: ge-0/0/2
+ state: deleted
+
+ # Task Output
+ # -----------
+ #
+ # before:
+ # - ipv4:
+ # - address: 192.168.1.10/24
+ # ipv6:
+ # - address: 8d8d:8d01::1/64
+ # name: ge-0/0/1
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: ge-0/0/2
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+ # commands:
+ # - <nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:interface>
+ # <nc:name>ge-0/0/1</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:address delete="delete"/>
+ # </nc:inet>
+ # <nc:inet6>
+ # <nc:address delete="delete"/>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # <nc:interface>
+ # <nc:name>ge-0/0/2</nc:name>
+ # <nc:unit>
+ # <nc:name>0</nc:name>
+ # <nc:family>
+ # <nc:inet>
+ # <nc:dhcp delete="delete"/>
+ # </nc:inet>
+ # <nc:inet6>
+ # <nc:address delete="delete"/>
+ # </nc:inet6>
+ # </nc:family>
+ # </nc:unit>
+ # </nc:interface>
+ # </nc:interfaces>
+ # after:
+ # - name: ge-0/0/1
+ # unit: '0'
+ # - name: ge-0/0/2
+ # unit: '0'
+ # - ipv4:
+ # - address: dhcp
+ # name: fxp0
+ # unit: '0'
+
+ # After state:
+ # ------------
+ #
+ # admin# show interfaces
+ # ge-0/0/1 {
# unit 0 {
- # family inet {
- # address 192.168.100.2/24;
- # address 10.200.16.21/24;
- # }
+ # family inet;
# family inet6;
# }
# }
- # ge-3/0/0 {
+ # ge-0/0/2 {
# unit 0 {
- # family inet {
- # address 192.168.100.3/24;
- # address 10.200.16.22/24;
- # }
+ # family inet;
# family inet6;
# }
# }
- # em1 {
- # description TEST;
- # }
# fxp0 {
- # description ANSIBLE;
- # speed 1g;
- # link-mode automatic;
+ # enable;
# unit 0 {
# family inet {
- # address 10.8.38.38/24;
+ # dhcp;
# }
+ # family inet6;
# }
# }
- - name: Gather junos layer3 interfaces as in given arguments
- junipernetworks.junos.junos_l3_interfaces:
- state: gathered
- # Task Output (redacted)
- # -----------------------
- #
- # "gathered": [
- # {
- # "ipv4": [
- # {
- # "address": "192.168.100.1/24"
- # },
- # {
- # "address": "10.200.16.20/24"
- # }
- # ],
- # "name": "ge-1/0/0",
- # "unit": "0"
- # },
- # {
- # "ipv4": [
- # {
- # "address": "192.168.100.2/24"
- # },
- # {
- # "address": "10.200.16.21/24"
- # }
- # ],
- # "name": "ge-2/0/0",
- # "unit": "0"
- # },
- # {
- # "ipv4": [
- # {
- # "address": "192.168.100.3/24"
- # },
- # {
- # "address": "10.200.16.22/24"
- # }
- # ],
- # "name": "ge-3/0/0",
- # "unit": "0"
- # },
- # {
- # "ipv4": [
- # {
- # "address": "10.8.38.38/24"
- # }
- # ],
- # "name": "fxp0",
- # "unit": "0"
- # }
- # ]
- # After state:
+
+ # Using gathered
+
+ # Before state:
# ------------
#
# user@junos01# show interfaces
@@ -675,7 +876,37 @@ Examples
# }
# }
# }
+
+ - name: Gather layer3 interfaces facts
+ junipernetworks.junos.junos_l3_interfaces:
+ state: gathered
+
+ # Task Output
+ # -----------
+ #
+ # gathered:
+ # - ipv4:
+ # - address: 192.168.100.1/24
+ # - address: 10.200.16.20/24
+ # name: ge-1/0/0
+ # unit: '0'
+ # - ipv4:
+ # - address: 192.168.100.2/24
+ # - address: 10.200.16.21/24
+ # name: ge-2/0/0
+ # unit: '0'
+ # - ipv4:
+ # - address: 192.168.100.3/24
+ # - address: 10.200.16.22/24
+ # name: ge-3/0/0
+ # unit: '0'
+ # - ipv4:
+ # - address: 10.8.38.38/24
+ # name: fxp0
+ # unit: '0'
+
# Using parsed
+
# parsed.cfg
# ------------
#
@@ -720,40 +951,29 @@ Examples
# </interfaces>
# </configuration>
# </rpc-reply>
+
# - name: Convert interfaces config to argspec without connecting to the appliance
# junipernetworks.junos.junos_l3_interfaces:
# running_config: "{{ lookup('file', './parsed.cfg') }}"
# state: parsed
- # Task Output (redacted)
- # -----------------------
- # "parsed": [
- # {
- # "ipv4": [
- # {
- # "address": "192.168.100.1/24"
- # },
- # {
- # "address": "10.200.16.20/24"
- # }
- # ],
- # "name": "ge-1/0/0",
- # "unit": "0"
- # },
- # {
- # "ipv4": [
- # {
- # "address": "192.168.100.2/24"
- # },
- # {
- # "address": "10.200.16.21/24"
- # }
- # ],
- # "name": "ge-2/0/0",
- # "unit": "0"
- # }
- # ]
+
+ # Task Output
+ # -----------
#
+ # parsed:
+ # - ipv4:
+ # - address: 192.168.100.1/24
+ # - address: 10.200.16.20/24
+ # name: ge-1/0/0
+ # unit: '0'
+ # - ipv4:
+ # - address: 192.168.100.2/24
+ # - address: 10.200.16.21/24
+ # name: ge-2/0/0
+ # unit: '0'
+
# Using rendered
+
- name: Render platform specific xml from task input using rendered state
junipernetworks.junos.junos_l3_interfaces:
config:
@@ -762,17 +982,17 @@ Examples
- address: 192.168.100.1/24
- address: 10.200.16.20/24
unit: 0
-
- name: ge-2/0/0
ipv4:
- address: 192.168.100.2/24
- address: 10.200.16.21/24
unit: 0
state: rendered
- # Task Output (redacted)
- # -----------------------
- # "rendered": "<nc:interfaces
- # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+
+ # Task Output
+ # -----------
+ #
+ # "rendered": "<nc:interfaces xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:interface>
# <nc:name>ge-1/0/0</nc:name>
# <nc:unit>
@@ -874,6 +1094,57 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:interfaces xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;nc:interface&gt; &lt;nc:name&gt;ge-1/0/0&lt;/nc:name&gt; &lt;nc:unit&gt; &lt;nc:name&gt;0&lt;/nc:name&gt; &lt;nc:family&gt; &lt;nc:inet&gt; &lt;nc:address&gt; &lt;nc:name&gt;192.168.100.1/24&lt;/nc:name&gt; &lt;/nc:address&gt; &lt;nc:address&gt; &lt;nc:name&gt;10.200.16.20/24&lt;/nc:name&gt; &lt;/nc:address&gt; &lt;/nc:inet&gt; &lt;/nc:family&gt; &lt;/nc:unit&gt; &lt;/nc:interfaces&gt;&#x27;, &#x27;xml 2&#x27;, &#x27;xml 3&#x27;]</div>
</td>
</tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
+ </td>
+ </tr>
</table>
<br/><br/>
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lacp_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lacp_interfaces_module.rst
index a1af096ad..3e4115223 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lacp_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lacp_interfaces_module.rst
@@ -301,16 +301,16 @@ Examples
- name: Merge provided configuration with device configuration
junipernetworks.junos.junos_lacp_interfaces:
config:
- - name: ae0
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/3
- port_priority: 100
- force_up: true
+ - name: ae0
+ period: fast
+ sync_reset: enable
+ system:
+ priority: 100
+ mac:
+ address: 00:00:00:00:00:02
+ - name: ge-0/0/3
+ port_priority: 100
+ force_up: true
state: merged
# After state:
@@ -399,8 +399,8 @@ Examples
- name: Replace device LACP interfaces configuration with provided configuration
junipernetworks.junos.junos_lacp_interfaces:
config:
- - name: ae0
- period: slow
+ - name: ae0
+ period: slow
state: replaced
# After state:
@@ -483,14 +483,14 @@ Examples
- name: Overrides all device LACP interfaces configuration with provided configuration
junipernetworks.junos.junos_lacp_interfaces:
config:
- - name: ae0
- system:
- priority: 300
- mac:
- address: 00:00:00:00:00:03
- - name: ge-0/0/2
- port_priority: 200
- force_up: false
+ - name: ae0
+ system:
+ priority: 300
+ mac:
+ address: 00:00:00:00:00:03
+ - name: ge-0/0/2
+ port_priority: 200
+ force_up: false
state: overridden
# After state:
@@ -585,9 +585,9 @@ Examples
- name: "Delete LACP interfaces attributes of given interfaces (Note: This won't delete the interface itself)"
junipernetworks.junos.junos_lacp_interfaces:
config:
- - name: ae0
- - name: ge-0/0/3
- - name: ge-0/0/2
+ - name: ae0
+ - name: ge-0/0/3
+ - name: ge-0/0/2
state: deleted
# After state:
@@ -979,17 +979,17 @@ Examples
- name: Render platform specific xml from task input using rendered state
junipernetworks.junos.junos_lacp_interfaces:
config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
+ - name: ae1
+ period: fast
+ sync_reset: enable
+ system:
+ priority: 100
+ mac:
+ address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: true
+ - name: ge-0/0/1
+ port_priority: 100
+ force_up: true
state: rendered
# Task Output (redacted)
# -----------------------
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lag_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lag_interfaces_module.rst
index d3ab7e89b..8c1f66268 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lag_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lag_interfaces_module.rst
@@ -256,8 +256,8 @@ Examples
- name: "Delete LAG attributes of given interfaces (Note: This won't delete the interface itself)"
junipernetworks.junos.junos_lag_interfaces:
config:
- - name: ae0
- - name: ae1
+ - name: ae0
+ - name: ae1
state: deleted
# After state:
@@ -286,12 +286,12 @@ Examples
- name: Merge provided configuration with device configuration
junipernetworks.junos.junos_lag_interfaces:
config:
- - name: ae0
- members:
- - member: ge-0/0/1
- link_type: primary
- - member: ge-0/0/2
- link_type: backup
+ - name: ae0
+ members:
+ - member: ge-0/0/1
+ link_type: primary
+ - member: ge-0/0/2
+ link_type: backup
state: merged
# After state:
@@ -344,13 +344,13 @@ Examples
- name: Overrides all device LAG configuration with provided configuration
junipernetworks.junos.junos_lag_interfaces:
config:
- - name: ae0
- members:
- - member: ge-0/0/2
- - name: ae1
- members:
- - member: ge-0/0/1
- mode: passive
+ - name: ae0
+ members:
+ - member: ge-0/0/2
+ - name: ae1
+ members:
+ - member: ge-0/0/1
+ mode: passive
state: overridden
# After state:
@@ -398,10 +398,10 @@ Examples
- name: Replace device LAG configuration with provided configuration
junipernetworks.junos.junos_lag_interfaces:
config:
- - name: ae0
- members:
- - member: ge-0/0/1
- mode: active
+ - name: ae0
+ members:
+ - member: ge-0/0/1
+ mode: active
state: replaced
# After state:
@@ -814,20 +814,20 @@ Examples
- name: Render platform specific xml from task input using rendered state
junipernetworks.junos.junos_lag_interfaces:
config:
- - name: ae1
- members:
- - member: ge-0/0/1
- - member: ge-0/0/2
- mode: active
-
- - name: ae2
- link_protection: true
- members:
- - member: ge-0/0/3
- link_type: primary
- - member: ge-0/0/4
- link_type: backup
- mode: passive
+ - name: ae1
+ members:
+ - member: ge-0/0/1
+ - member: ge-0/0/2
+ mode: active
+
+ - name: ae2
+ link_protection: true
+ members:
+ - member: ge-0/0/3
+ link_type: primary
+ - member: ge-0/0/4
+ link_type: backup
+ mode: passive
# Task Output (redacted)
# -----------------------
# "rendered": "<nc:interfaces
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lldp_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lldp_interfaces_module.rst
index 8b6738407..d4721c000 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lldp_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_lldp_interfaces_module.rst
@@ -149,9 +149,9 @@ Examples
- name: Merge provided configuration with device configuration
junipernetworks.junos.junos_lldp_interfaces:
config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: false
+ - name: ge-0/0/1
+ - name: ge-0/0/2
+ enabled: false
state: merged
# After state:
@@ -178,10 +178,10 @@ Examples
- name: Replace provided configuration with device configuration
junipernetworks.junos.junos_lldp_interfaces:
config:
- - name: ge-0/0/2
- disable: false
- - name: ge-0/0/3
- enabled: false
+ - name: ge-0/0/2
+ disable: false
+ - name: ge-0/0/3
+ enabled: false
state: replaced
# After state:
@@ -209,8 +209,8 @@ Examples
- name: Override provided configuration with device configuration
junipernetworks.junos.junos_lldp_interfaces:
config:
- - name: ge-0/0/2
- enabled: false
+ - name: ge-0/0/2
+ enabled: false
state: overridden
# After state:
@@ -236,8 +236,8 @@ Examples
- name: Delete lldp interface configuration (this will not delete other lldp configuration)
junipernetworks.junos.junos_lldp_interfaces:
config:
- - name: ge-0/0/1
- - name: ge-0/0/3
+ - name: ge-0/0/1
+ - name: ge-0/0/3
state: deleted
# After state:
@@ -251,7 +251,7 @@ Examples
# Before state:
# ------------
#
- #ansible@cm123456tr21# show protocols lldp
+ # ansible@cm123456tr21# show protocols lldp
# interface ge-0/0/1;
# interface ge-0/0/2 {
# disable;
@@ -274,7 +274,7 @@ Examples
# After state:
# ------------
#
- #ansible@cm123456tr21# show protocols lldp
+ # ansible@cm123456tr21# show protocols lldp
# interface ge-0/0/1;
# interface ge-0/0/2 {
# disable;
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_logging_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_logging_module.rst
index a1957a65c..7274d565b 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_logging_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_logging_module.rst
@@ -421,19 +421,19 @@ Examples
junipernetworks.junos.junos_logging:
dest: file
aggregate:
- - name: test-1
- facility: pfe
- level: critical
- - name: test-2
- facility: kernel
- level: emergency
+ - name: test-1
+ facility: pfe
+ level: critical
+ - name: test-2
+ facility: kernel
+ level: emergency
active: true
- name: Delete file logging using aggregate
junipernetworks.junos.junos_logging:
aggregate:
- - {dest: file, name: test-1, facility: pfe, level: critical}
- - {dest: file, name: test-2, facility: kernel, level: emergency}
+ - {dest: file, name: test-1, facility: pfe, level: critical}
+ - {dest: file, name: test-2, facility: kernel, level: emergency}
state: absent
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospf_interfaces_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospf_interfaces_module.rst
index 46b39a7c5..8a68a001b 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospf_interfaces_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospf_interfaces_module.rst
@@ -178,7 +178,8 @@ Parameters
<b>md5</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
- <span style="color: purple">dictionary</span>
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
@@ -198,7 +199,7 @@ Parameters
<b>key_id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
- <span style="color: purple">string</span>
+ <span style="color: purple">integer</span>
</div>
</td>
<td>
@@ -606,10 +607,14 @@ Parameters
<b>node_link_protection</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
- <span style="color: purple">string</span>
+ <span style="color: purple">boolean</span>
</div>
</td>
<td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
</td>
<td>
<div>Protect interface from both link and node faults.</div>
@@ -855,14 +860,14 @@ Examples
- name: Merge Junos OSPF interfaces config
junipernetworks.junos.junos_ospf_interfaces:
config:
- - name: 'ge-0/0/2.0'
- address_family:
- - afi: 'ipv4'
- processes:
- area:
- area_id: '0.0.0.2'
- priority: 3
- metric: 5
+ - name: 'ge-0/0/2.0'
+ address_family:
+ - afi: 'ipv4'
+ processes:
+ area:
+ area_id: '0.0.0.2'
+ priority: 3
+ metric: 5
state: merged
# After state
@@ -890,16 +895,16 @@ Examples
# }
- name: Replace Junos OSPF interfaces config
junipernetworks.junos.junos_ospf_interfaces:
- config:
- - name: 'ge-0/0/2.0'
- address_family:
- - afi: 'ipv4'
- processes:
- area:
- area_id: '0.0.0.1'
- priority: 6
- metric: 6
- state: replaced
+ config:
+ - name: 'ge-0/0/2.0'
+ address_family:
+ - afi: 'ipv4'
+ processes:
+ area:
+ area_id: '0.0.0.1'
+ priority: 6
+ metric: 6
+ state: replaced
# After state
# -----------
@@ -1047,14 +1052,14 @@ Examples
- name: Render the commands for provided configuration
junipernetworks.junos.junos_ospf_interfaces:
config:
- - name: 'ge-0/0/2.0'
- address_family:
- - afi: 'ipv4'
- processes:
- area:
- area_id: '0.0.0.2'
- priority: 3
- metric: 5
+ - name: 'ge-0/0/2.0'
+ address_family:
+ - afi: 'ipv4'
+ processes:
+ area:
+ area_id: '0.0.0.2'
+ priority: 3
+ metric: 5
state: rendered
#
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv2_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv2_module.rst
index 6e253ec59..18e04ea6b 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv2_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv2_module.rst
@@ -17,7 +17,7 @@ Version added: 1.0.0
Synopsis
--------
-- This module manages global OSPFv2 configuration on devices running Juniper JUNOS.
+- This module manages OSPFv2 configuration on devices running Juniper JUNOS.
@@ -36,12 +36,12 @@ Parameters
<table border=0 cellpadding=0 class="documentation-table">
<tr>
- <th colspan="5">Parameter</th>
+ <th colspan="6">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
<th width="100%">Comments</th>
</tr>
<tr>
- <td colspan="5">
+ <td colspan="6">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>config</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -58,7 +58,7 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>areas</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -76,7 +76,7 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="3">
+ <td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>area_id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -94,7 +94,7 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="3">
+ <td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>area_range</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -106,13 +106,114 @@ Parameters
</td>
<td>
<div>Configure an address range for the area.</div>
+ <div>Included for compatibility, remove/deprecate after 2025-07-01.</div>
+ <div>Alternate for this would be area_ranges which is a list.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure IP address ranges for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify ip address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>exact</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enforce exact match for advertisement of this area range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>override_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override the dynamic metric for this area-range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>restrict</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Restrict advertisement of this area range.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
<b>interfaces</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
@@ -130,7 +231,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>authentication</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -149,8 +250,108 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>md5</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MD5 authentication keys</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the key identity</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Start time for key transmission (YYYY-MM-DD.HH:MM)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify authentication key.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
<b>type</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
@@ -161,6 +362,7 @@ Parameters
</td>
<td>
<div>Type of authentication to use.</div>
+ <div>Included for compatibility, remove/deprecate after 2025-07-01.</div>
</td>
</tr>
@@ -168,7 +370,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>bandwidth_based_metrics</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -188,7 +390,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>bandwidth</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -211,7 +413,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>metric</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -230,7 +432,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>flood_reduction</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -252,7 +454,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>metric</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -270,7 +472,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>name</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -289,7 +491,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>passive</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -311,7 +513,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>priority</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -329,7 +531,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>timers</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -348,7 +550,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dead_interval</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -367,7 +569,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>hello_interval</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -386,7 +588,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>poll_interval</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -405,7 +607,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>retransmit_interval</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -424,7 +626,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>transit_delay</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -443,7 +645,7 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="3">
+ <td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>stub</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -461,7 +663,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>default_metric</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -479,7 +681,7 @@ Parameters
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="2">
+ <td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>set</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -501,7 +703,7 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>external_preference</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -517,7 +719,7 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>overload</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -534,7 +736,70 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="3">
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allow_route_leaking</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Allow routes to be leaked when overload is configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise As External with maximum usable metric.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub_network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise Stub Network with maximum metric.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>timeout</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -551,7 +816,7 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>preference</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -567,7 +832,7 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>prefix_export_limit</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -583,7 +848,7 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>reference_bandwidth</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -603,7 +868,7 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>rfc1583compatibility</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -623,7 +888,7 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>router_id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -639,7 +904,7 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
- <td colspan="4">
+ <td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>spf_options</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -656,7 +921,7 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="3">
+ <td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>delay</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -673,7 +938,7 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="3">
+ <td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>holddown</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -690,7 +955,28 @@ Parameters
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
- <td colspan="3">
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_ignore_our_externals</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not ignore self-generated external and NSSA LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>rapid_runs</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -707,7 +993,7 @@ Parameters
<tr>
- <td colspan="5">
+ <td colspan="6">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>running_config</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -719,12 +1005,12 @@ Parameters
</td>
<td>
<div>This option is used only with state <em>parsed</em>.</div>
- <div>The value of this option should be the output received from the Junos device by executing the command B(show protocols ospf.</div>
+ <div>The value of this option should be the output received from the Junos device by executing the command <b>show protocols ospf</b>.</div>
<div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result</div>
</td>
</tr>
<tr>
- <td colspan="5">
+ <td colspan="6">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>state</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -774,44 +1060,588 @@ Examples
#
# admin# show protocols ospf
- - name: Merge Junos OSPFv2 config
+ - name: Merge provided OSPFv2 configuration into running config.
junipernetworks.junos.junos_ospfv2:
config:
- - reference_bandwidth: 10g
- areas:
- - area_id: 0.0.0.100
- area_range: 10.200.16.0/24
- stub:
- default_metric: 100
- set: true
- interfaces:
- - name: so-0/0/0.0
- priority: 3
- metric: 5
- flood_reduction: false
- passive: true
- bandwidth_based_metrics:
- - bandwidth: 1g
- metric: 5
- - bandwidth: 10g
- metric: 40
- timers:
- dead_interval: 4
- hello_interval: 2
- poll_interval: 2
- retransmit_interval: 2
- rfc1583compatibility: false
+ - reference_bandwidth: 10g
+ areas:
+ - area_id: 0.0.0.100
+ area_ranges:
+ - address: 10.200.17.0/24
+ exact: true
+ restrict: true
+ override_metric: 2000
+ - address: 10.200.15.0/24
+ exact: true
+ restrict: true
+ override_metric: 2000
+ stub:
+ default_metric: 100
+ set: true
+ interfaces:
+ - name: so-0/0/0.0
+ priority: 3
+ metric: 5
+ flood_reduction: false
+ passive: true
+ bandwidth_based_metrics:
+ - bandwidth: 1g
+ metric: 5
+ - bandwidth: 10g
+ metric: 40
+ timers:
+ dead_interval: 4
+ hello_interval: 2
+ poll_interval: 2
+ retransmit_interval: 2
+ rfc1583compatibility: false
state: merged
+ # Task Output:
+ # ------------
+ #
+ # before: []
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf><nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:no-rfc-1583/>
+ # <nc:area><nc:name>0.0.0.100</nc:name><nc:area-range><nc:name>10.200.17.0/24</nc:name><nc:exact/>
+ # <nc:restrict/><nc:override-metric>2000</nc:override-metric></nc:area-range><nc:area-range>
+ # <nc:name>10.200.15.0/24</nc:name><nc:exact/><nc:restrict/><nc:override-metric>2000</nc:override-metric>
+ # </nc:area-range><nc:interface><nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority>
+ # <nc:metric>5</nc:metric><nc:passive/><nc:bandwidth-based-metrics><nc:bandwidth><nc:name>1g</nc:name>
+ # <nc:metric>5</nc:metric></nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name><nc:metric>40</nc:metric>
+ # </nc:bandwidth></nc:bandwidth-based-metrics><nc:dead-interval>4</nc:dead-interval>
+ # <nc:hello-interval>2</nc:hello-interval><nc:poll-interval>2</nc:poll-interval>
+ # <nc:retransmit-interval>2</nc:retransmit-interval></nc:interface><nc:stub>
+ # <nc:default-metric>100</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>
+ #
+ # after:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # area_range: '[''10.200.17.0/24'', ''10.200.15.0/24'']'
+ # area_ranges:
+ # - address: 10.200.17.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # - address: 10.200.15.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # timers:
+ # dead_interval: 4
+ # hello_interval: 2
+ # poll_interval: 2
+ # retransmit_interval: 2
+ # stub:
+ # default_metric: 100
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+
+ # After state
+ # -----------
+ #
+ # admin# show protocols ospf
+ # reference-bandwidth 10g;
+ # no-rfc-1583;
+ # area 0.0.0.100 {
+ # stub default-metric 100;
+ # area-range 10.200.17.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # area-range 10.200.15.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # interface so-0/0/0.0 {
+ # passive;
+ # bandwidth-based-metrics {
+ # bandwidth 1g metric 5;
+ # bandwidth 10g metric 40;
+ # }
+ # metric 5;
+ # priority 3;
+ # retransmit-interval 2;
+ # hello-interval 2;
+ # dead-interval 4;
+ # poll-interval 2;
+ # }
+ # }
+ #
+ # Using replaced
+ #
+ # Before state
+ # ------------
+ #
+ # admin# show protocols ospf
+ # reference-bandwidth 10g;
+ # no-rfc-1583;
+ # area 0.0.0.100 {
+ # stub default-metric 100;
+ # area-range 10.200.17.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # area-range 10.200.15.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # interface so-0/0/0.0 {
+ # passive;
+ # bandwidth-based-metrics {
+ # bandwidth 1g metric 5;
+ # bandwidth 10g metric 40;
+ # }
+ # metric 5;
+ # priority 3;
+ # retransmit-interval 2;
+ # hello-interval 2;
+ # dead-interval 4;
+ # poll-interval 2;
+ # }
+ # }
+
+ - name: Replace existing Junos OSPFv2 config with provided config
+ junipernetworks.junos.junos_ospfv2:
+ config:
+ - reference_bandwidth: 10g
+ areas:
+ - area_id: 0.0.0.100
+ area_ranges:
+ - address: 10.200.17.0/24
+ exact: true
+ restrict: true
+ - address: 10.200.16.0/24
+ exact: true
+ restrict: true
+ override_metric: 1000
+ stub:
+ default_metric: 100
+ set: true
+ interfaces:
+ - name: so-0/0/0.0
+ priority: 3
+ metric: 5
+ flood_reduction: false
+ passive: true
+ bandwidth_based_metrics:
+ - bandwidth: 1g
+ metric: 5
+ - bandwidth: 10g
+ metric: 40
+ timers:
+ dead_interval: 4
+ hello_interval: 2
+ poll_interval: 2
+ retransmit_interval: 2
+ rfc1583compatibility: false
+ state: replacedd
+
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # area_range: '[''10.200.17.0/24'', ''10.200.15.0/24'']'
+ # area_ranges:
+ # - address: 10.200.17.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # - address: 10.200.15.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # timers:
+ # dead_interval: 4
+ # hello_interval: 2
+ # poll_interval: 2
+ # retransmit_interval: 2
+ # stub:
+ # default_metric: 100
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf><nc:area delete="delete">0.0.0.100</nc:area></nc:ospf><nc:ospf>
+ # <nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:no-rfc-1583/><nc:area>
+ # <nc:name>0.0.0.100</nc:name><nc:area-range><nc:name>10.200.17.0/24</nc:name><nc:exact/>
+ # <nc:restrict/></nc:area-range><nc:area-range><nc:name>10.200.16.0/24</nc:name><nc:exact/>
+ # <nc:restrict/><nc:override-metric>1000</nc:override-metric></nc:area-range><nc:interface>
+ # <nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority><nc:metric>5</nc:metric><nc:passive/>
+ # <nc:bandwidth-based-metrics><nc:bandwidth><nc:name>1g</nc:name><nc:metric>5</nc:metric>
+ # </nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name><nc:metric>40</nc:metric></nc:bandwidth>
+ # </nc:bandwidth-based-metrics><nc:dead-interval>4</nc:dead-interval><nc:hello-interval>2</nc:hello-interval>
+ # <nc:poll-interval>2</nc:poll-interval><nc:retransmit-interval>2</nc:retransmit-interval></nc:interface>
+ # <nc:stub><nc:default-metric>100</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>
+ #
+ # after:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # area_range: '[''10.200.17.0/24'', ''10.200.16.0/24'']'
+ # area_ranges:
+ # - address: 10.200.17.0/24
+ # exact: true
+ # restrict: true
+ # - address: 10.200.16.0/24
+ # exact: true
+ # override_metric: 1000
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # timers:
+ # dead_interval: 4
+ # hello_interval: 2
+ # poll_interval: 2
+ # retransmit_interval: 2
+ # stub:
+ # default_metric: 100
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+ #
+ # After state
+ # -----------
+ #
+ # admin# show protocols ospf
+ # reference-bandwidth 10g;
+ # no-rfc-1583;
+ # area 0.0.0.100 {
+ # stub default-metric 100;
+ # area-range 10.200.17.0/24 {
+ # restrict;
+ # exact;
+ # }
+ # area-range 10.200.16.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 1000;
+ # }
+ # interface so-0/0/0.0 {
+ # passive;
+ # bandwidth-based-metrics {
+ # bandwidth 1g metric 5;
+ # bandwidth 10g metric 40;
+ # }
+ # metric 5;
+ # priority 3;
+ # retransmit-interval 2;
+ # hello-interval 2;
+ # dead-interval 4;
+ # poll-interval 2;
+ # }
+ # }
+ #
+ # Using overridden
+ #
+ # Before state
+ # ------------
+ #
+ # admin# show protocols ospf
+ # reference-bandwidth 10g;
+ # no-rfc-1583;
+ # area 0.0.0.100 {
+ # stub default-metric 100;
+ # area-range 10.200.17.0/24 {
+ # restrict;
+ # exact;
+ # }
+ # area-range 10.200.16.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 1000;
+ # }
+ # interface so-0/0/0.0 {
+ # passive;
+ # bandwidth-based-metrics {
+ # bandwidth 1g metric 5;
+ # bandwidth 10g metric 40;
+ # }
+ # metric 5;
+ # priority 3;
+ # retransmit-interval 2;
+ # hello-interval 2;
+ # dead-interval 4;
+ # poll-interval 2;
+ # }
+ # }
+
+ - name: Override runnig OSPFv2 config with provided config
+ junipernetworks.junos.junos_ospfv2:
+ config:
+ - reference_bandwidth: 10g
+ areas:
+ - area_id: 0.0.0.110
+ area_ranges:
+ - address: 20.200.17.0/24
+ exact: true
+ restrict: true
+ override_metric: 2000
+ - address: 20.200.15.0/24
+ exact: true
+ restrict: true
+ override_metric: 2000
+ stub:
+ default_metric: 200
+ set: true
+ interfaces:
+ - name: so-0/0/0.0
+ priority: 3
+ metric: 5
+ flood_reduction: false
+ passive: true
+ bandwidth_based_metrics:
+ - bandwidth: 1g
+ metric: 5
+ - bandwidth: 10g
+ metric: 40
+ state: overridden
+
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # area_range: '[''10.200.17.0/24'', ''10.200.16.0/24'']'
+ # area_ranges:
+ # - address: 10.200.17.0/24
+ # exact: true
+ # restrict: true
+ # - address: 10.200.16.0/24
+ # exact: true
+ # override_metric: 1000
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # timers:
+ # dead_interval: 4
+ # hello_interval: 2
+ # poll_interval: 2
+ # retransmit_interval: 2
+ # stub:
+ # default_metric: 100
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf><nc:area delete="delete">0.0.0.100</nc:area></nc:ospf><nc:ospf>
+ # <nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:area><nc:name>0.0.0.110</nc:name>
+ # <nc:area-range><nc:name>20.200.17.0/24</nc:name><nc:exact/><nc:restrict/>
+ # <nc:override-metric>2000</nc:override-metric></nc:area-range><nc:area-range>
+ # <nc:name>20.200.15.0/24</nc:name><nc:exact/><nc:restrict/><nc:override-metric>2000</nc:override-metric>
+ # </nc:area-range><nc:interface><nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority>
+ # <nc:metric>5</nc:metric><nc:passive/><nc:bandwidth-based-metrics><nc:bandwidth><nc:name>1g</nc:name>
+ # <nc:metric>5</nc:metric></nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name><nc:metric>40</nc:metric>
+ # </nc:bandwidth></nc:bandwidth-based-metrics></nc:interface><nc:stub>
+ # <nc:default-metric>200</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>
+ #
+ # after:
+ # - areas:
+ # - area_id: 0.0.0.110
+ # area_range: '[''20.200.17.0/24'', ''20.200.15.0/24'']'
+ # area_ranges:
+ # - address: 20.200.17.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # - address: 20.200.15.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # stub:
+ # default_metric: 200
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+
# After state
# -----------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
+ # area 0.0.0.110 {
+ # stub default-metric 200;
+ # area-range 20.200.17.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # area-range 20.200.15.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # interface so-0/0/0.0 {
+ # passive;
+ # bandwidth-based-metrics {
+ # bandwidth 1g metric 5;
+ # bandwidth 10g metric 40;
+ # }
+ # metric 5;
+ # priority 3;
+ # }
+ # }
+ # Using deleted
+ #
+ # Before state
+ # ------------
+ #
+ # admin# show protocols ospf
+ # reference-bandwidth 10g;
+ # no-rfc-1583;
+ # area 0.0.0.110 {
+ # stub default-metric 200;
+ # area-range 20.200.17.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # area-range 20.200.15.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # interface so-0/0/0.0 {
+ # passive;
+ # bandwidth-based-metrics {
+ # bandwidth 1g metric 5;
+ # bandwidth 10g metric 40;
+ # }
+ # metric 5;
+ # priority 3;
+ # }
+ # }
+
+ - name: Delete OSPFv2 running config.
+ junipernetworks.junos.junos_ospfv2:
+ config:
+ state: deleted
+
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # - areas:
+ # - area_id: 0.0.0.110
+ # area_range: '[''20.200.17.0/24'', ''20.200.15.0/24'']'
+ # area_ranges:
+ # - address: 20.200.17.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # - address: 20.200.15.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # stub:
+ # default_metric: 200
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf><nc:area delete="delete">0.0.0.100</nc:area><nc:reference-bandwidth delete="delete"/>
+ # <nc:no-rfc-1583 delete="delete"/></nc:ospf></nc:protocols>
+ #
+ # after: []
+ #
+ #
+ # After state
+ # -----------
+ #
+ # admin# show protocols ospf
+
+ # Using gathered
+ #
+ # Before state
+ # ------------
+ #
+ # admin# show protocols ospf
+ # reference-bandwidth 10g;
+ # no-rfc-1583;
# area 0.0.0.100 {
# stub default-metric 100;
- # area-range 10.200.16.0/24;
+ # area-range 10.200.17.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
+ # area-range 10.200.15.0/24 {
+ # restrict;
+ # exact;
+ # override-metric 2000;
+ # }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
@@ -827,6 +1657,211 @@ Examples
# }
# }
+ - name: Gather Junos OSPFv2 running-configuration
+ junipernetworks.junos.junos_ospfv2:
+ config:
+ state: gathered
+ #
+ #
+ # Task Output:
+ # ------------
+ #
+ # gathered:
+ #
+ # - areas:
+ # - area_id: 0.0.0.100
+ # area_range: '[''10.200.17.0/24'', ''10.200.15.0/24'']'
+ # area_ranges:
+ # - address: 10.200.17.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # - address: 10.200.15.0/24
+ # exact: true
+ # override_metric: 2000
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # timers:
+ # dead_interval: 4
+ # hello_interval: 2
+ # poll_interval: 2
+ # retransmit_interval: 2
+ # stub:
+ # default_metric: 100
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ # <?xml version="1.0" encoding="UTF-8"?>
+ # <rpc-reply message-id="urn:uuid:0cadb4e8-5bba-47f4-986e-72906227007f">
+ # <configuration changed-seconds="1590139550" changed-localtime="2020-05-22 09:25:50 UTC">
+ # <version>18.4R1-S2.4</version>
+ # <protocols>
+ # <ospf>
+ # <reference-bandwidth>10g</reference-bandwidth>
+ # <no-rfc-1583/>
+ # <area>
+ # <name>0.0.0.100</name>
+ # <stub>
+ # <default-metric>100</default-metric>
+ # </stub>
+ # <area-range>
+ # <name>10.200.16.0/24</name>
+ # <exact/>
+ # <override-metric>10000</override-metric>
+ # </area-range>
+ # <area-range>
+ # <name>10.200.11.0/24</name>
+ # <restrict/>
+ # <exact/>
+ # </area-range>
+ # <interface>
+ # <name>so-0/0/0.0</name>
+ # <passive>
+ # </passive>
+ # <bandwidth-based-metrics>
+ # <bandwidth>
+ # <name>1g</name>
+ # <metric>5</metric>
+ # </bandwidth>
+ # <bandwidth>
+ # <name>10g</name>
+ # <metric>40</metric>
+ # </bandwidth>
+ # </bandwidth-based-metrics>
+ # <metric>5</metric>
+ # <priority>3</priority>
+ # <retransmit-interval>2</retransmit-interval>
+ # <hello-interval>2</hello-interval>
+ # <dead-interval>4</dead-interval>
+ # <poll-interval>2</poll-interval>
+ # </interface>
+ # </area>
+ # </ospf>
+ # </protocols>
+ # <routing-options>
+ # <static>
+ # <route>
+ # <name>172.16.17.0/24</name>
+ # <discard />
+ # </route>
+ # </static>
+ # <router-id>10.200.16.75</router-id>
+ # <autonomous-system>
+ # <as-number>65432</as-number>
+ # </autonomous-system>
+ # </routing-options>
+ # </configuration>
+ # </rpc-reply>
+
+
+ - name: Parsed the ospfv2 config into structured ansible resource facts.
+ junipernetworks.junos.junos_ospfv2:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+ #
+ # Task Output:
+ # ------------
+ #
+ # parsed:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # area_range: '[''10.200.16.0/24'', ''10.200.11.0/24'']'
+ # area_ranges:
+ # - address: 10.200.16.0/24
+ # exact: true
+ # override_metric: 10000
+ # - address: 10.200.11.0/24
+ # exact: true
+ # restrict: true
+ # interfaces:
+ # - bandwidth_based_metrics:
+ # - bandwidth: 1g
+ # metric: 5
+ # - bandwidth: 10g
+ # metric: 40
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # timers:
+ # dead_interval: 4
+ # hello_interval: 2
+ # poll_interval: 2
+ # retransmit_interval: 2
+ # stub:
+ # default_metric: 100
+ # set: true
+ # reference_bandwidth: 10g
+ # rfc1583compatibility: false
+ # router_id: 10.200.16.75
+
+ # Using rendered
+ #
+ - name: Render the commands for provided configuration
+ junipernetworks.junos.junos_ospfv2:
+ config:
+ - reference_bandwidth: 10g
+ areas:
+ - area_id: 0.0.0.100
+ area_ranges:
+ - address: 10.200.17.0/24
+ exact: true
+ restrict: true
+ override_metric: 2000
+ - address: 10.200.15.0/24
+ exact: true
+ restrict: true
+ override_metric: 2000
+ stub:
+ default_metric: 100
+ set: true
+ interfaces:
+ - name: so-0/0/0.0
+ priority: 3
+ metric: 5
+ flood_reduction: false
+ passive: true
+ bandwidth_based_metrics:
+ - bandwidth: 1g
+ metric: 5
+ - bandwidth: 10g
+ metric: 40
+ timers:
+ dead_interval: 4
+ hello_interval: 2
+ poll_interval: 2
+ retransmit_interval: 2
+ rfc1583compatibility: false
+ state: rendered
+
+ # Task Output:
+ # ------------
+ #
+ # rendered: "<nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf><nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:no-rfc-1583/><nc:area><nc:name>0.0.0.100</nc:name>
+ # <nc:area-range><nc:name>10.200.17.0/24</nc:name><nc:exact/><nc:restrict/><nc:override-metric>2000</nc:override-metric>
+ # </nc:area-range><nc:area-range><nc:name>10.200.15.0/24</nc:name><nc:exact/><nc:restrict/>
+ # <nc:override-metric>2000</nc:override-metric></nc:area-range><nc:interface><nc:name>so-0/0/0.0</nc:name>
+ # <nc:priority>3</nc:priority><nc:metric>5</nc:metric><nc:passive/><nc:bandwidth-based-metrics><nc:bandwidth>
+ # <nc:name>1g</nc:name><nc:metric>5</nc:metric></nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name>
+ # <nc:metric>40</nc:metric></nc:bandwidth></nc:bandwidth-based-metrics><nc:dead-interval>4</nc:dead-interval>
+ # <nc:hello-interval>2</nc:hello-interval><nc:poll-interval>2</nc:poll-interval>
+ # <nc:retransmit-interval>2</nc:retransmit-interval></nc:interface><nc:stub>
+ # <nc:default-metric>100</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>"
+
Return Values
@@ -852,7 +1887,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
</td>
<td>when changed</td>
<td>
- <div>The resulting configuration model invocation.</div>
+ <div>The resulting configuration module invocation.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
@@ -870,7 +1905,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
</td>
<td>always</td>
<td>
- <div>The configuration prior to the model invocation.</div>
+ <div>The configuration prior to the module invocation.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
@@ -891,7 +1926,58 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div>The set of commands pushed to the remote device.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
- <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;command 1&#x27;, &#x27;command 2&#x27;, &#x27;command 3&#x27;]</div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&lt; nc:ospf&gt;&lt;nc:area delete=&quot;delete&quot;&gt;0.0.0.100&lt;/nc:area&gt;&lt;nc:reference-bandwidth delete=&quot;delete&quot;/&gt; &lt;nc:no-rfc-1583 delete=&quot;delete&quot;/&gt;&lt;/nc:ospf&gt;&lt;/nc:protocols&gt;&#x27;, &#x27;xml 2&#x27;, &#x27;xml 3&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
</td>
</tr>
</table>
@@ -906,3 +1992,4 @@ Authors
~~~~~~~
- Daniel Mellado (@dmellado)
+- Rohit Thakur (@rohitthakur2590)
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv3_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv3_module.rst
index fa38facb1..82a4fef10 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv3_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ospfv3_module.rst
@@ -719,7 +719,7 @@ Parameters
</td>
<td>
<div>This option is used only with state <em>parsed</em>.</div>
- <div>The value of this option should be the output received from the Junos device by executing the command B(show protocols ospf.</div>
+ <div>The value of this option should be the output received from the Junos device by executing the command <b>show protocols ospf</b>.</div>
<div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result</div>
</td>
</tr>
@@ -776,57 +776,148 @@ Examples
- name: Merge Junos OSPFv3 config
junipernetworks.junos.junos_ospfv3:
config:
- - areas:
- - area_id: 0.0.0.100
- stub:
- default_metric: 200
- set: true
- interfaces:
- - name: so-0/0/0.0
- priority: 3
- metric: 5
+ - router_id: 10.200.16.75
+ areas:
+ - area_id: 0.0.0.100
+ interfaces:
+ - metric: 5
+ name: so-0/0/0.0
+ priority: 3
+ - metric: 6
+ name: so-0/0/1.0
+ priority: 2
+ stub:
+ default_metric: 200
+ set: true
state: merged
+ # Task Output:
+ # ------------
+ #
+ # before: []
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf3><nc:area><nc:name>0.0.0.100</nc:name><nc:interface><nc:name>so-0/0/0.0</nc:name>
+ # <nc:priority>3</nc:priority><nc:metric>5</nc:metric></nc:interface><nc:interface>
+ # <nc:name>so-0/0/1.0</nc:name><nc:priority>2</nc:priority><nc:metric>6</nc:metric>
+ # </nc:interface><nc:stub><nc:default-metric>200</nc:default-metric></nc:stub></nc:area></nc:ospf3></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:router-id>10.200.16.75</nc:router-id></nc:routing-options>
+ #
+ # after:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # interfaces:
+ # - metric: 5
+ # name: so-0/0/0.0
+ # priority: 3
+ # - metric: 6
+ # name: so-0/0/1.0
+ # priority: 2
+ # stub:
+ # default_metric: 200
+ # set: true
+ # router_id: 10.200.16.75
+
# After state
# -----------
#
- # adimn# show protocols ospf3
+ # admin# show protocols ospf3
# area 0.0.0.100 {
# stub default-metric 200;
# interface so-0/0/0.0 {
# metric 5;
# priority 3;
# }
+ # interface so-0/0/1.0 {
+ # metric 6;
+ # priority 2;
+ # }
# }
+ #
# Using replaced
#
# Before state
# ------------
#
- # adimn# show protocols ospf3
+ # admin# show protocols ospf3
+ # admin# show protocols ospf3
# area 0.0.0.100 {
# stub default-metric 200;
# interface so-0/0/0.0 {
# metric 5;
# priority 3;
# }
+ # interface so-0/0/1.0 {
+ # metric 6;
+ # priority 2;
+ # }
# }
- - name: Replace Junos OSPFv3 config
+
+ - name: Replace existing Junos OSPFv3 config with provided config
junipernetworks.junos.junos_ospfv3:
- config:
- - areas:
- - area_id: 0.0.0.100
- interfaces:
- - name: so-0/0/0.0
- state: replaced
+ config:
+ - router_id: 10.200.16.75
+ areas:
+ - area_id: 0.0.0.100
+ interfaces:
+ - name: so-0/0/0.0
+ state: replaced
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # interfaces:
+ # - metric: 5
+ # name: so-0/0/0.0
+ # priority: 3
+ # - metric: 6
+ # name: so-0/0/1.0
+ # priority: 2
+ # stub:
+ # default_metric: 200
+ # set: true
+ # router_id: 10.200.16.75
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf3><nc:area><nc:name>0.0.0.100</nc:name><nc:interface delete="delete">
+ # <nc:name>so-0/0/0.0</nc:name></nc:interface></nc:area></nc:ospf3><nc:ospf3>
+ # <nc:area><nc:name>0.0.0.100</nc:name><nc:interface><nc:name>so-0/0/0.0</nc:name>
+ # </nc:interface></nc:area></nc:ospf3></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:router-id>10.200.16.75</nc:router-id><nc:router-id>10.200.16.75</nc:router-id></nc:routing-options>
+ #
+ # after:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # interfaces:
+ # - metric: 6
+ # name: so-0/0/1.0
+ # priority: 2
+ # - name: so-0/0/0.0
+ # stub:
+ # default_metric: 200
+ # set: true
+ # router_id: 10.200.16.75
+ #
# After state
# -----------
#
# admin# show protocols ospf3
# area 0.0.0.100 {
+ # stub default-metric 200;
+ # interface so-0/0/1.0 {
+ # metric 6;
+ # priority 2;
+ # }
# interface so-0/0/0.0;
# }
+ #
# Using overridden
#
# Before state
@@ -834,27 +925,80 @@ Examples
#
# admin# show protocols ospf3
# area 0.0.0.100 {
+ # stub default-metric 200;
+ # interface so-0/0/1.0 {
+ # metric 6;
+ # priority 2;
+ # }
# interface so-0/0/0.0;
# }
- - name: Override Junos OSPFv3 config
+
+ - name: Override runnig OSPFv3 config with provided config
junipernetworks.junos.junos_ospfv3:
- config:
- - areas:
- - area_id: 0.0.0.100
- stub:
- default_metric: 200
- set: true
- interfaces:
- - name: so-0/0/0.0
- priority: 3
- metric: 5
- flood_reduction: true
- passive: true
- - area_id: 0.0.0.200
- interfaces:
- - name: ge-1/1/0.0
- - name: ge-2/2/0.0
- state: overridden
+ config:
+ - router_id: 10.200.16.75
+ areas:
+ - area_id: 0.0.0.100
+ stub:
+ default_metric: 200
+ set: true
+ interfaces:
+ - name: so-0/0/0.0
+ priority: 3
+ metric: 5
+ flood_reduction: true
+ passive: true
+ - area_id: 0.0.0.200
+ interfaces:
+ - name: ge-1/1/0.0
+ - name: ge-2/2/0.0
+ state: overridden
+
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # interfaces:
+ # - metric: 6
+ # name: so-0/0/1.0
+ # priority: 2
+ # - name: so-0/0/0.0
+ # stub:
+ # default_metric: 200
+ # set: true
+ # router_id: 10.200.16.75
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf3 delete="delete"/><nc:ospf3><nc:area><nc:name>0.0.0.100</nc:name>
+ # <nc:interface><nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority><nc:flood-reduction/>
+ # <nc:metric>5</nc:metric><nc:passive/></nc:interface>
+ # <nc:stub><nc:default-metric>200</nc:default-metric></nc:stub></nc:area>
+ # <nc:area><nc:name>0.0.0.200</nc:name><nc:interface><nc:name>ge-1/1/0.0</nc:name>
+ # </nc:interface><nc:interface><nc:name>ge-2/2/0.0</nc:name></nc:interface></nc:area>
+ # </nc:ospf3></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:router-id delete="delete"/><nc:router-id>10.200.16.75</nc:router-id></nc:routing-options>
+ #
+ # after:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # interfaces:
+ # - flood_reduction: true
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # stub:
+ # default_metric: 200
+ # set: true
+ # - area_id: 0.0.0.200
+ # interfaces:
+ # - name: ge-1/1/0.0
+ # - name: ge-2/2/0.0
+ # router_id: 10.200.16.75
# After state
# -----------
@@ -873,274 +1017,202 @@ Examples
# interface ge-1/1/0.0;
# interface ge-2/2/0.0;
# }
- #
# Using deleted
#
# Before state
# ------------
#
- # adimn# show protocols ospf3
+ # admin# show protocols ospf3
# area 0.0.0.100 {
# stub default-metric 200;
# interface so-0/0/0.0 {
+ # passive;
# metric 5;
# priority 3;
+ # flood-reduction;
# }
# }
+ # area 0.0.0.200 {
+ # interface ge-1/1/0.0;
+ # interface ge-2/2/0.0;
+ # }
- - name: Delete Junos OSPFv3 config
+ - name: Delete OSPFv3 running config.
junipernetworks.junos.junos_ospfv3:
config:
- - areas:
- - area_id: 0.0.0.100
- interfaces:
- - name: so-0/0/0.0
state: deleted
+ # Task Output:
+ # ------------
+ #
+ # before:
+ # - areas:
+ # - area_id: 0.0.0.100
+ # interfaces:
+ # - flood_reduction: true
+ # metric: 5
+ # name: so-0/0/0.0
+ # passive: true
+ # priority: 3
+ # stub:
+ # default_metric: 200
+ # set: true
+ # - area_id: 0.0.0.200
+ # interfaces:
+ # - name: ge-1/1/0.0
+ # - name: ge-2/2/0.0
+ # router_id: 10.200.16.75
+ #
+ # commands:
+ # - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf3 delete="delete"/></nc:protocols>
+ # - <nc:routing-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:router-id delete="delete"/></nc:routing-options>
+ #
+ # after: []
+ #
+ #
# After state
# -----------
#
# admin# show protocols ospf3
+
# Using gathered
#
# Before state
# ------------
#
- # adimn# show protocols ospf3
+ # admin# show protocols ospf3
# area 0.0.0.100 {
# stub default-metric 200;
# interface so-0/0/0.0 {
- # passive;
# metric 5;
# priority 3;
- # flood-reduction;
# }
- # }
- # area 0.0.0.200 {
- # interface ge-1/1/0.0;
- # interface ge-2/2/0.0;
- # }
+ # interface so-0/0/1.0 {
+ # metric 6;
+ # priority 2;
+ # }
- - name: Gather Junos OSPFv3 config
+ - name: Gather Junos OSPFv3 running-configuration
junipernetworks.junos.junos_ospfv3:
config:
state: gathered
#
#
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- # "gathered": {
- # "areas": [
- # {
- # "area_id": "0.0.0.100",
- # "interfaces": [
- # {
- # "flood_reduction": true,
- # "metric": 5,
- # "name": "so-0/0/0.0",
- # "passive": true,
- # "priority": 3
- # }
- # ],
- # "stub": {
- # "default_metric": 200,
- # "set": true
- # }
- # },
- # {
- # "area_id": "0.0.0.200",
- # "interfaces": [
- # {
- # "name": "ge-1/1/0.0"
- # },
- # {
- # "name": "ge-2/2/0.0"
- # }
- # ]
- # }
- # ],
- # }
- #
- # Using rendered
+ # Task Output:
+ # ------------
#
+ # gathered:
#
- - name: Render the commands for provided configuration
- junipernetworks.junos.junos_ospfv3:
- config:
- - areas:
- - area_id: 0.0.0.100
- stub:
- default_metric: 200
- set: true
- interfaces:
- - name: so-0/0/0.0
- priority: 3
- metric: 5
- flood_reduction: true
- passive: true
- - area_id: 0.0.0.200
- interfaces:
- - name: ge-1/1/0.0
- - name: ge-2/2/0.0
- state: rendered
+ # - areas:
+ # - area_id: 0.0.0.100
+ # interfaces:
+ # - metric: 5
+ # name: so-0/0/0.0
+ # priority: 3
+ # - metric: 6
+ # name: so-0/0/1.0
+ # priority: 2
+ # stub:
+ # default_metric: 200
+ # set: true
+ # router_id: 10.200.16.75
- #
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- #
- # "rendered": "
- # <nc:protocols
- # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # <nc:ospf3>
- # <nc:area>
- # <nc:name>0.0.0.100</nc:name>
- # <nc:interface>
- # <nc:name>so-0/0/0.0</nc:name>
- # <nc:priority>3</nc:priority>
- # <nc:flood-reduction/>
- # <nc:metric>5</nc:metric>
- # <nc:passive/>
- # </nc:interface>
- # <nc:stub>
- # <nc:default-metric>200</nc:default-metric>
- # </nc:stub>
- # </nc:area>
- # <nc:area>
- # <nc:name>0.0.0.200</nc:name>
- # <nc:interface>
- # <nc:name>ge-1/1/0.0</nc:name>
- # </nc:interface>
- # <nc:interface>
- # <nc:name>ge-2/2/0.0</nc:name>
- # </nc:interface>
- # </nc:area>
- # </nc:ospf3>
- # </nc:protocols>"
- #
# Using parsed
# parsed.cfg
# ------------
- # <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.4R1/junos">
- # <data>
- # <configuration xmlns="http://xml.juniper.net/xnm/1.1/xnm"
- # junos:commit-seconds="1601355317" junos:commit-localtime="2020-09-29 04:55:17 UTC" junos:commit-user="rohit">
- # <version>18.4R1-S2.4</version>
- # <interfaces>
- # <interface>
- # <name>ge-0/0/0</name>
- # <description>Configured by Ansi-Team</description>
- # </interface>
- # <interface>
- # <name>gr-0/0/0</name>
- # <description>Configured Manually</description>
- # </interface>
- # <interface>
- # <name>fxp0</name>
- # <unit>
- # <name>0</name>
- # <family>
- # <inet>
- # <dhcp>
- # </dhcp>
- # </inet>
- # </family>
- # </unit>
- # </interface>
- # </interfaces>
- # <protocols>
- # <ospf3>
- # <area>
- # <name>0.0.0.100</name>
- # <stub>
- # <default-metric>200</default-metric>
- # </stub>
- # <interface>
- # <name>so-0/0/0.0</name>
- # <passive>
- # </passive>
- # <metric>5</metric>
- # <priority>3</priority>
- # <flood-reduction/>
- # </interface>
- # </area>
- # <area>
- # <name>0.0.0.200</name>
- # <interface>
- # <name>ge-1/1/0.0</name>
- # </interface>
- # <interface>
- # <name>ge-2/2/0.0</name>
- # </interface>
- # </area>
- # </ospf3>
- # </protocols>
- # <routing-options>
- # <router-id>10.200.16.75</router-id>
- # </routing-options>
- # </configuration>
- # <database-status-information>
- # <database-status>
- # <user>rohit</user>
- # <terminal>pts/0</terminal>
- # <pid>38210</pid>
- # <start-time junos:seconds="1601354977">2020-09-29 04:49:37 UTC</start-time>
- # <idle-time junos:seconds="546">00:09:06</idle-time>
- # <edit-path>[edit]</edit-path>
- # </database-status>
- # </database-status-information>
- # </data>
+ # <?xml version="1.0" encoding="UTF-8"?>
+ # <rpc-reply message-id="urn:uuid:0cadb4e8-5bba-47f4-986e-72906227007f">
+ # <configuration changed-seconds="1590139550" changed-localtime="2020-05-22 09:25:50 UTC">
+ # <protocols>
+ # <ospf3>
+ # <area>
+ # <name>0.0.0.100</name>
+ # <stub>
+ # <default-metric>200</default-metric>
+ # </stub>
+ # <interface>
+ # <name>so-0/0/0.0</name>
+ # <passive></passive>
+ # <metric>5</metric>
+ # <priority>3</priority>
+ # <flood-reduction/>
+ # </interface>
+ # </area>
+ # <area>
+ # <name>0.0.0.200</name>
+ # <interface>
+ # <name>ge-1/1/0.0</name>
+ # </interface>
+ # <interface>
+ # <name>ge-2/2/0.0</name>
+ # </interface>
+ # </area>
+ # </ospf3>
+ # </protocols>
+ # <routing-options>
+ # <router-id>10.200.16.75</router-id>
+ # </routing-options>
+ # </configuration>
# </rpc-reply>
- - name: Parsed the device configuration to get output commands
+
+ - name: Parsed the ospfv3 config into structured ansible resource facts.
junipernetworks.junos.junos_ospfv3:
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
#
+ # Task Output:
+ # ------------
#
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
+ # parsed:
+ # - router_id: 10.200.16.75
+ # areas:
+ # - area_id: 0.0.0.100
+ # stub:
+ # default_metric: 200
+ # set: true
+ # interfaces:
+ # - name: so-0/0/0.0
+ # priority: 3
+ # metric: 5
+ # flood_reduction: true
+ # passive: true
+ # - area_id: 0.0.0.200
+ # interfaces:
+ # - name: ge-1/1/0.0
+ # - name: ge-2/2/0.0
+
+ # Using rendered
#
- # "parsed": [
- # {
- # "areas": [
- # {
- # "area_id": "0.0.0.100",
- # "interfaces": [
- # {
- # "flood_reduction": true,
- # "metric": 5,
- # "name": "so-0/0/0.0",
- # "passive": true,
- # "priority": 3
- # }
- # ],
- # "stub": {
- # "default_metric": 200,
- # "set": true
- # }
- # },
- # {
- # "area_id": "0.0.0.200",
- # "interfaces": [
- # {
- # "name": "ge-1/1/0.0"
- # },
- # {
- # "name": "ge-2/2/0.0"
- # }
- # ]
- # }
- # ],
- # }
- # ]
+ - name: Render the commands for provided configuration
+ junipernetworks.junos.junos_ospfv3:
+ config:
+ - router_id: 10.200.16.75
+ areas:
+ - area_id: 0.0.0.100
+ interfaces:
+ - metric: 5
+ name: so-0/0/0.0
+ priority: 3
+ - metric: 6
+ name: so-0/0/1.0
+ priority: 2
+ stub:
+ default_metric: 200
+ set: true
+ state: rendered
+
+ # Task Output:
+ # ------------
#
+ # rendered: "<nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # <nc:ospf3><nc:area><nc:name>0.0.0.100</nc:name><nc:interface>
+ # <nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority>
+ # <nc:metric>5</nc:metric></nc:interface><nc:interface><nc:name>so-0/0/1.0</nc:name>
+ # <nc:priority>2</nc:priority><nc:metric>6</nc:metric></nc:interface><nc:stub>
+ # <nc:default-metric>200</nc:default-metric></nc:stub></nc:area></nc:ospf3></nc:protocols>"
@@ -1167,7 +1239,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
</td>
<td>when changed</td>
<td>
- <div>The resulting configuration model invocation.</div>
+ <div>The resulting configuration module invocation.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
@@ -1185,7 +1257,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
</td>
<td>always</td>
<td>
- <div>The configuration prior to the model invocation.</div>
+ <div>The configuration prior to the module invocation.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
@@ -1206,7 +1278,58 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div>The set of commands pushed to the remote device.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
- <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;nc:ospf3 delete=&quot;delete&quot;/&gt; &lt;nc:ospf3&gt; &lt;nc:area&gt; &lt;nc:name&gt;0.0.0.100&lt;/nc:name&gt; &lt;nc:interface&gt; &lt;nc:name&gt;so-0/0/0.0&lt;/nc:name&gt; &lt;nc:priority&gt;3&lt;/nc:priority&gt; &lt;nc:flood-reduction/&gt; &lt;nc:metric&gt;5&lt;/nc:metric&gt; &lt;nc:passive/&gt; &lt;/nc:interface&gt; &lt;nc:stub&gt; &lt;nc:default-metric&gt;200&lt;/nc:default-metric&gt; &lt;/nc:stub&gt; &lt;/nc:area&gt; &lt;nc:area&gt; &lt;nc:name&gt;0.0.0.200&lt;/nc:name&gt; &lt;nc:interface&gt; &lt;nc:name&gt;ge-1/1/0.0&lt;/nc:name&gt; &lt;/nc:interface&gt; &lt;nc:interface&gt; &lt;nc:name&gt;ge-2/2/0.0&lt;/nc:name&gt; &lt;/nc:interface&gt; &lt;/nc:area&gt; &lt;/nc:ospf3&gt; &lt;/nc:protocols&gt;&quot;, &quot; &lt;nc:routing-options xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;nc:router-id delete=&quot;delete&quot;/&gt; &lt;nc:router-id&gt;10.200.16.75&lt;/nc:router-id&gt; &lt;/nc:routing-options&gt;&#x27;, &#x27;xml 2&#x27;, &#x27;xml 3&#x27;]</div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&lt; nc:ospf3&gt;&lt;nc:area&gt;&lt;nc:name&gt;0.0.0.100&lt;/nc:name&gt;&lt;nc:interface&gt;&#x27;, &#x27;xml 2&#x27;, &#x27;xml 3&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
</td>
</tr>
</table>
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_package_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_package_module.rst
index 3fc1afcc5..228875575 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_package_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_package_module.rst
@@ -36,12 +36,12 @@ Parameters
<table border=0 cellpadding=0 class="documentation-table">
<tr>
- <th colspan="1">Parameter</th>
+ <th colspan="2">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
<th width="100%">Comments</th>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>force</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -60,7 +60,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>force_host</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -79,7 +79,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>issu</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -98,7 +98,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>no_copy</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -117,8 +117,144 @@ Parameters
</td>
</tr>
<tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code> or <code>connection: netconf</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_junos.html'>Junos OS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. The port value will default to the well known SSH port of 22 (for <code>transport=cli</code>) or port 830 (for <code>transport=netconf</code>) device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>cli</li>
+ <li><div style="color: blue"><b>netconf</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
<b>reboot</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
@@ -136,7 +272,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>src</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -153,7 +289,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ssh_config</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -168,7 +304,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ssh_private_key_file</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -183,7 +319,26 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unlink</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>The <em>unlink</em> argument is responsible for instructing the remote device to remove the installation packages after installation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>validate</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -202,7 +357,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>version</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -249,7 +404,7 @@ Examples
- name: install local package on remote device without rebooting
junipernetworks.junos.junos_package:
src: junos-vsrx-12.1X46-D10.2-domestic.tgz
- reboot: no
+ reboot: false
- name: install local package on remote device with jumpost
junipernetworks.junos.junos_package:
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ping_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ping_module.rst
index f484231b6..0c32f602d 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ping_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_ping_module.rst
@@ -250,8 +250,8 @@ Examples
- name: Test reachability to 10.50.50.50 using do-not-fragment and rapid
junipernetworks.junos.junos_ping:
dest: 10.50.50.50
- df_bit: True
- rapid: True
+ df_bit: true
+ rapid: true
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_prefix_lists_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_prefix_lists_module.rst
index 2609c521f..383e7d87d 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_prefix_lists_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_prefix_lists_module.rst
@@ -196,45 +196,35 @@ Examples
- 172.16.7.32
- 172.16.9.32
state: merged
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- # "before": []
- # "commands": [
- # "<nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # "<nc:prefix-list><nc:name>Internal</nc:name><nc:prefix-list-item><nc:name>172.16.1.32</nc:name>"
- # "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.3.32</nc:name>"
- # "</nc:prefix-list-item></nc:prefix-list><nc:prefix-list><nc:name>Test1</nc:name>"
- # "<nc:dynamic-db/></nc:prefix-list><nc:prefix-list><nc:name>Test2</nc:name>"
- # "<nc:prefix-list-item><nc:name>172.16.2.32</nc:name></nc:prefix-list-item>"
- # "<nc:prefix-list-item><nc:name>172.16.7.32</nc:name></nc:prefix-list-item>"
- # "<nc:prefix-list-item><nc:name>172.16.9.32</nc:name></nc:prefix-list-item>"
- # "</nc:prefix-list></nc:policy-options>"
- # ]
- #
- # "after": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # },
- # {
- # "dynamic_db": true,
- # "name": "Test1"
- # },
- # {
- # "address_prefixes": [
- # "172.16.2.32/32",
- # "172.16.7.32/32",
- # "172.16.9.32/32"
- # ],
- # "name": "Test2"
- # }
- # ]
+
+ # Task Output
+ # -------------
+ #
+ # before: []
+ # commands:
+ # - <nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # - "<nc:prefix-list><nc:name>Internal</nc:name><nc:prefix-list-item><nc:name>172.16.1.32</nc:name>"
+ # - "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.3.32</nc:name>"
+ # - "</nc:prefix-list-item></nc:prefix-list><nc:prefix-list><nc:name>Test1</nc:name>"
+ # - "<nc:dynamic-db/></nc:prefix-list><nc:prefix-list><nc:name>Test2</nc:name>"
+ # - "<nc:prefix-list-item><nc:name>172.16.2.32</nc:name></nc:prefix-list-item>"
+ # - "<nc:prefix-list-item><nc:name>172.16.7.32</nc:name></nc:prefix-list-item>"
+ # - "<nc:prefix-list-item><nc:name>172.16.9.32</nc:name></nc:prefix-list-item>"
+ # - "</nc:prefix-list></nc:policy-options>"
+ # after:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+ # - dynamic_db: true
+ # name: Test1
+ # - address_prefixes:
+ # - 172.16.2.32/32
+ # - 172.16.7.32/32
+ # - 172.16.9.32/32
+ # name: Test2
+
+
# After state
# -----------
#
@@ -251,7 +241,8 @@ Examples
# 172.16.7.32/32;
# 172.16.9.32/32;
# }
- #
+
+
# Using gathered
#
# Before state
@@ -274,36 +265,28 @@ Examples
- name: Gather Junos prefix-lists
junipernetworks.junos.junos_prefix_lists:
state: gathered
+
+
+ # Task Output
+ # -------------
#
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- # "gathered": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # },
- # {
- # "dynamic_db": true,
- # "name": "Test1"
- # },
- # {
- # "address_prefixes": [
- # "172.16.2.32/32",
- # "172.16.7.32/32",
- # "172.16.9.32/32"
- # ],
- # "name": "Test2"
- # }
- # ]
- #
+ # gathered:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+ # - dynamic_db: true
+ # name: Test1
+ # - address_prefixes:
+ # - 172.16.2.32/32
+ # - 172.16.7.32/32
+ # - 172.16.9.32/32
+ # name: Test2
+
+
# Using replaced
- #
+
+
# Before state
# ------------
#
@@ -320,70 +303,54 @@ Examples
# 172.16.7.32/32;
# 172.16.9.32/32;
# }
+
+
- name: Replace existing Junos prefix-lists configuration with provided config
junipernetworks.junos.junos_prefix_lists:
- config:
- - name: Test2
- address_prefixes:
- - 172.16.4.32
- - 172.16.8.32
- - 172.16.9.32"
- state: replaced
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- # "before": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # },
- # {
- # "dynamic_db": true,
- # "name": "Test1"
- # },
- # {
- # "address_prefixes": [
- # "172.16.2.32/32",
- # "172.16.7.32/32",
- # "172.16.9.32/32"
- # ],
- # "name": "Test2"
- # }
- # ]
- # "commands": [
- # "<nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # "<nc:prefix-list delete="delete"><nc:name>Test2</nc:name></nc:prefix-list>"
- # "<nc:prefix-list><nc:name>Test2</nc:name><nc:prefix-list-item><nc:name>172.16.4.32</nc:name>"
- # "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.8.32</nc:name>"
- # "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.9.32</nc:name>"
- # "</nc:prefix-list-item></nc:prefix-list></nc:policy-options>"
- # ]
- #
- # "after": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # },
- # {
- # "dynamic_db": true,
- # "name": "Test1"
- # },
- # {
- # "address_prefixes": [
- # "172.16.4.32/32",
- # "172.16.8.32/32",
- # "172.16.9.32/32"
- # ],
- # "name": "Test2"
- # }
- # ]
+ config:
+ - name: Test2
+ address_prefixes:
+ - 172.16.4.32
+ - 172.16.8.32
+ - 172.16.9.32"
+ state: replaced
+
+
+ # Task Output
+ # -------------
+ #
+ # before:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+ # - dynamic_db: true
+ # name: Test1
+ # - address_prefixes:
+ # - 172.16.2.32/32
+ # - 172.16.7.32/32
+ # - 172.16.9.32/32
+ # name: Test2
+ # commands:
+ # - <nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # - <nc:prefix-list delete="delete"><nc:name>Test2</nc:name></nc:prefix-list>
+ # - "<nc:prefix-list><nc:name>Test2</nc:name><nc:prefix-list-item><nc:name>172.16.4.32</nc:name>"
+ # - "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.8.32</nc:name>"
+ # - "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.9.32</nc:name>"
+ # - "</nc:prefix-list-item></nc:prefix-list></nc:policy-options>"
+ # after:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+ # - dynamic_db: true
+ # name: Test1
+ # - address_prefixes:
+ # - 172.16.4.32/32
+ # - 172.16.8.32/32
+ # - 172.16.9.32/32
+ # name: Test2
+
# After state
# -----------
#
@@ -400,8 +367,10 @@ Examples
# 172.16.8.32/32;
# 172.16.9.32/32;
# }
+
+
# Using overridden
- #
+
# Before state
# ------------
#
@@ -418,62 +387,50 @@ Examples
# 172.16.8.32/32;
# 172.16.9.32/32;
# }
+
+
- name: Override Junos prefix-lists configuration with provided configuration
junipernetworks.junos.junos_prefix_lists:
- config:
- - name: Test2
- address_prefixes:
- - 172.16.4.32/28
- - 172.16.8.32/28
- - 172.16.9.32/28
- state: overridden
-
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- # "before": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # },
- # {
- # "dynamic_db": true,
- # "name": "Test1"
- # },
- # {
- # "address_prefixes": [
- # "172.16.4.32/32",
- # "172.16.8.32/32",
- # "172.16.9.32/32"
- # ],
- # "name": "Test2"
- # }
- # ]
- # "commands": [
- # "<nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # "<nc:prefix-list delete="delete"><nc:name>Internal</nc:name>"
- # "</nc:prefix-list><nc:prefix-list delete="delete"><nc:name>Test1</nc:name>"
- # "</nc:prefix-list><nc:prefix-list delete="delete"><nc:name>Test2</nc:name>"
- # "</nc:prefix-list><nc:prefix-list><nc:name>Test2</nc:name><nc:prefix-list-item>"
- # "<nc:name>172.16.4.32/28</nc:name></nc:prefix-list-item><nc:prefix-list-item>"
- # "<nc:name>172.16.8.32/28</nc:name></nc:prefix-list-item><nc:prefix-list-item>"
- # "<nc:name>172.16.9.32/28</nc:name></nc:prefix-list-item></nc:prefix-list></nc:policy-options>"
- # ]
- #
- # "after": [
- # {
- # "address_prefixes": [
- # "172.16.4.32/28",
- # "172.16.8.32/28",
- # "172.16.9.32/28"
- # ],
- # "name": "Test2"
- # }
- # ]
+ config:
+ - name: Test2
+ address_prefixes:
+ - 172.16.4.32/28
+ - 172.16.8.32/28
+ - 172.16.9.32/28
+ state: overridden
+
+
+ # Task Output
+ # -------------
+ #
+ # before:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+ # - dynamic_db: true
+ # name: Test1
+ # - address_prefixes:
+ # - 172.16.4.32/32
+ # - 172.16.8.32/32
+ # - 172.16.9.32/32
+ # name: Test2
+ # commands:
+ # - <nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # - <nc:prefix-list delete="delete"><nc:name>Internal</nc:name>
+ # - </nc:prefix-list><nc:prefix-list delete="delete"><nc:name>Test1</nc:name>
+ # - </nc:prefix-list><nc:prefix-list delete="delete"><nc:name>Test2</nc:name>
+ # - "</nc:prefix-list><nc:prefix-list><nc:name>Test2</nc:name><nc:prefix-list-item>"
+ # - "<nc:name>172.16.4.32/28</nc:name></nc:prefix-list-item><nc:prefix-list-item>"
+ # - "<nc:name>172.16.8.32/28</nc:name></nc:prefix-list-item><nc:prefix-list-item>"
+ # - "<nc:name>172.16.9.32/28</nc:name></nc:prefix-list-item></nc:prefix-list></nc:policy-options>"
+ # after:
+ # - address_prefixes:
+ # - 172.16.4.32/28
+ # - 172.16.8.32/28
+ # - 172.16.9.32/28
+ # name: Test2
+
# After state
# -----------
#
@@ -483,8 +440,11 @@ Examples
# 172.16.8.32/28;
# 172.16.9.32/28;
# }
+
+
# Using deleted
- #
+
+
# Before state
# ------------
#
@@ -502,52 +462,41 @@ Examples
# 172.16.9.32/32;
# }
+
- name: Delete provided prefix-lists
junipernetworks.junos.junos_prefix_lists:
- config:
- - name: "Test1"
- - name: "Test2"
- state: deleted
- # ------------------------
- # Module Execution Results
- # ------------------------
- #
- # "before": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # },
- # {
- # "dynamic_db": true,
- # "name": "Test1"
- # },
- # {
- # "address_prefixes": [
- # "172.16.2.32/32",
- # "172.16.7.32/32",
- # "172.16.9.32/32"
- # ],
- # "name": "Test2"
- # }
- # ]
- # "commands": [
- # "<nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # "<nc:prefix-list delete="delete"><nc:name>Test1</nc:name></nc:prefix-list>"
- # "<nc:prefix-list delete="delete"><nc:name>Test2</nc:name></nc:prefix-list></nc:policy-options>"
- # ]
- #
- # "after": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # }
- # ]
+ config:
+ - name: "Test1"
+ - name: "Test2"
+ state: deleted
+
+
+ # Task Output
+ # -------------
+ #
+ # before:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+ # - dynamic_db: true
+ # name: Test1
+ # - address_prefixes:
+ # - 172.16.2.32/32
+ # - 172.16.7.32/32
+ # - 172.16.9.32/32
+ # name: Test2
+ # commands:
+ # - <nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # - <nc:prefix-list delete="delete"><nc:name>Test1</nc:name></nc:prefix-list>
+ # - <nc:prefix-list delete="delete"><nc:name>Test2</nc:name></nc:prefix-list></nc:policy-options>
+ # after:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+
+
# After state
# -----------
#
@@ -557,8 +506,11 @@ Examples
# 172.16.3.32/32;
# }
#
+
+
# Using deleted without specifying config
- #
+
+
# Before state
# ------------
#
@@ -576,40 +528,33 @@ Examples
# 172.16.9.32/32;
# }
+
- name: Delete complete Junos prefix-lists configuration
junipernetworks.junos.junos_prefix_lists:
- state: deleted
+ state: deleted
+
+
+ # Task Output
+ # -------------
+ #
+ # before:
+ # - address_prefixes:
+ # - 172.16.1.32/32
+ # - 172.16.3.32/32
+ # name: Internal
+ # - dynamic_db: true
+ # name: Test1
+ # - address_prefixes:
+ # - 172.16.2.32/32
+ # - 172.16.7.32/32
+ # - 172.16.9.32/32
+ # name: Test2
+ # commands:
+ # - <nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # - <nc:prefix-list delete="delete"/></nc:policy-options>
+ # after: []
+
- # ------------------------
- # Module Execution Results
- # ------------------------
- #
- # "before": [
- # {
- # "address_prefixes": [
- # "172.16.1.32/32",
- # "172.16.3.32/32"
- # ],
- # "name": "Internal"
- # },
- # {
- # "dynamic_db": true,
- # "name": "Test1"
- # },
- # {
- # "address_prefixes": [
- # "172.16.2.32/32",
- # "172.16.7.32/32",
- # "172.16.9.32/32"
- # ],
- # "name": "Test2"
- # }
- # ]
- # "commands": ["<nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # "<nc:prefix-list delete="delete"/></nc:policy-options>"
- # ]
- #
- # "after": []
# After state
# -----------
#
@@ -617,8 +562,10 @@ Examples
#
# [edit]
- #
+
# Using parsed
+
+
# parsed.cfg
# ------------
# <?xml version="1.0" encoding="UTF-8"?>
@@ -642,34 +589,28 @@ Examples
# </policy-options>
# </configuration>
# </rpc-reply>
+
+
- name: Parse running prefix-lists configuration
junipernetworks.junos.junos_prefix_lists:
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
- #
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- #
- # "parsed": [
- # {
- # "name": "64510"
- # },
- # {
- # "address_prefixes": [
- # "172.16.1.16/28",
- # "172.16.1.32/28"
- # ],
- # "dynamic_db": true,
- # "name": "64500"
- # }
- # ]
- #
- #
+
+
+ # Task Output
+ # -------------
+ # parsed:
+ # - name: '64510'
+ # - address_prefixes:
+ # - 172.16.1.16/28
+ # - 172.16.1.32/28
+ # dynamic_db: true
+ # name: '64500'
+
+
# Using rendered
- #
+
+
- name: Render the xml for provided configuration
junipernetworks.junos.junos_prefix_lists:
config:
@@ -685,91 +626,22 @@ Examples
- 172.16.7.32
- 172.16.9.32
state: rendered
- #
- #
- # -------------------------
- # Module Execution Result
- # -------------------------
- #
- #
- # "rendered": "<nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
- # "<nc:prefix-list><nc:name>Internal</nc:name><nc:prefix-list-item><nc:name>172.16.1.32</nc:name>"
- # "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.3.32</nc:name></nc:prefix-list-item>"
- # "</nc:prefix-list><nc:prefix-list><nc:name>Test1</nc:name><nc:dynamic-db/></nc:prefix-list>"
- # "<nc:prefix-list><nc:name>Test2</nc:name><nc:prefix-list-item><nc:name>172.16.2.32</nc:name>"
- # "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.7.32</nc:name></nc:prefix-list-item>"
- # "<nc:prefix-list-item><nc:name>172.16.9.32</nc:name></nc:prefix-list-item>"
- # "</nc:prefix-list></nc:policy-options>"
-
-Return Values
--------------
-Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+ # Task Output
+ # -------------
+ # rendered:
+ # - <nc:policy-options xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ # - "<nc:prefix-list><nc:name>Internal</nc:name><nc:prefix-list-item><nc:name>172.16.1.32</nc:name>"
+ # - "</nc:prefix-list-item><nc:prefix-list-item><nc:name>172.16.3.32</nc:name>"
+ # - "</nc:prefix-list-item></nc:prefix-list><nc:prefix-list><nc:name>Test1</nc:name>"
+ # - "<nc:dynamic-db/></nc:prefix-list><nc:prefix-list><nc:name>Test2</nc:name>"
+ # - "<nc:prefix-list-item><nc:name>172.16.2.32</nc:name></nc:prefix-list-item>"
+ # - "<nc:prefix-list-item><nc:name>172.16.7.32</nc:name></nc:prefix-list-item>"
+ # - "<nc:prefix-list-item><nc:name>172.16.9.32</nc:name></nc:prefix-list-item>"
+ # - "</nc:prefix-list></nc:policy-options>"
-.. raw:: html
- <table border=0 cellpadding=0 class="documentation-table">
- <tr>
- <th colspan="1">Key</th>
- <th>Returned</th>
- <th width="100%">Description</th>
- </tr>
- <tr>
- <td colspan="1">
- <div class="ansibleOptionAnchor" id="return-"></div>
- <b>after</b>
- <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
- <div style="font-size: small">
- <span style="color: purple">list</span>
- </div>
- </td>
- <td>when changed</td>
- <td>
- <div>The resulting configuration model invocation.</div>
- <br/>
- <div style="font-size: smaller"><b>Sample:</b></div>
- <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
- of the parameters above.</div>
- </td>
- </tr>
- <tr>
- <td colspan="1">
- <div class="ansibleOptionAnchor" id="return-"></div>
- <b>before</b>
- <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
- <div style="font-size: small">
- <span style="color: purple">list</span>
- </div>
- </td>
- <td>always</td>
- <td>
- <div>The configuration prior to the model invocation.</div>
- <br/>
- <div style="font-size: smaller"><b>Sample:</b></div>
- <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
- of the parameters above.</div>
- </td>
- </tr>
- <tr>
- <td colspan="1">
- <div class="ansibleOptionAnchor" id="return-"></div>
- <b>commands</b>
- <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
- <div style="font-size: small">
- <span style="color: purple">list</span>
- </div>
- </td>
- <td>always</td>
- <td>
- <div>The set of commands pushed to the remote device.</div>
- <br/>
- <div style="font-size: smaller"><b>Sample:</b></div>
- <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:policy-options xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &quot;&lt;nc:prefix-list delete=&quot;delete&quot;/&gt;&lt;/nc:policy-options&gt;&quot;&#x27;, &#x27;xml 2&#x27;, &#x27;command 3&#x27;]</div>
- </td>
- </tr>
- </table>
- <br/><br/>
Status
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_routing_instances_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_routing_instances_module.rst
index 9b76b6d47..939482c20 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_routing_instances_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_routing_instances_module.rst
@@ -674,21 +674,21 @@ Examples
- name: Replace existing Junos routing instance config with provided config
junipernetworks.junos.junos_routing_instances:
- config:
- address_family:
- - name: "test"
- type: "vrf"
- route_distinguisher: "10.57.255.1:37"
- vrf_imports:
- - "test-policy"
- vrf_exports:
- - "test-policy"
- interfaces:
- - name: "sp-0/0/0.0"
- - name: "gr-0/0/0.0"
- connector_id_advertise: false
- description: "Configured by Ansible Content Team"
- state: replaced
+ config:
+ address_family:
+ - name: "test"
+ type: "vrf"
+ route_distinguisher: "10.57.255.1:37"
+ vrf_imports:
+ - "test-policy"
+ vrf_exports:
+ - "test-policy"
+ interfaces:
+ - name: "sp-0/0/0.0"
+ - name: "gr-0/0/0.0"
+ connector_id_advertise: false
+ description: "Configured by Ansible Content Team"
+ state: replaced
# After state
# -----------
@@ -730,25 +730,25 @@ Examples
- name: Override Junos routing-instances configuration
junipernetworks.junos.junos_routing_instances:
- config:
- - name: "test"
- type: "vrf"
- route_distinguisher: "10.58.255.1:37"
- vrf_imports:
- - "test-policy"
- vrf_exports:
- - "test-policy"
- - "test-policy-1"
- interfaces:
- - name: "sp-0/0/0.0"
- - name: "gr-0/0/0.0"
- connector_id_advertise: true
- - name: "forwardinst"
- type: "forwarding"
- description: "Configured by Ansible Content Team"
- - name: "vtest1"
- type: "virtual-router"
- state: overridden
+ config:
+ - name: "test"
+ type: "vrf"
+ route_distinguisher: "10.58.255.1:37"
+ vrf_imports:
+ - "test-policy"
+ vrf_exports:
+ - "test-policy"
+ - "test-policy-1"
+ interfaces:
+ - name: "sp-0/0/0.0"
+ - name: "gr-0/0/0.0"
+ connector_id_advertise: true
+ - name: "forwardinst"
+ type: "forwarding"
+ description: "Configured by Ansible Content Team"
+ - name: "vtest1"
+ type: "virtual-router"
+ state: overridden
# After state
# -----------
@@ -794,9 +794,9 @@ Examples
- name: Delete provided junos routing-instamce
junipernetworks.junos.junos_routing_instances:
- config:
- - name: "test"
- state: deleted
+ config:
+ - name: "test"
+ state: deleted
# After state
# -----------
@@ -832,8 +832,8 @@ Examples
- name: Delete complete Junos routing-instances config
junipernetworks.junos.junos_routing_instances:
- config:
- state: deleted
+ config:
+ state: deleted
# After state
# -----------
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_scp_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_scp_module.rst
index 96f38d085..389939e19 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_scp_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_scp_module.rst
@@ -14,6 +14,13 @@ Version added: 1.0.0
:local:
:depth: 1
+DEPRECATED
+----------
+:Removed in collection release after 2025-01-01
+:Why: Updated modules released with more functionality
+:Alternative: Use :ref:`ansible.netcommon.net_get <ansible.netcommon.net_get_module>`, :ref:`ansible.netcommon.net_put <ansible.netcommon.net_put_module>` instead.
+
+
Synopsis
--------
@@ -36,12 +43,12 @@ Parameters
<table border=0 cellpadding=0 class="documentation-table">
<tr>
- <th colspan="1">Parameter</th>
+ <th colspan="2">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
<th width="100%">Comments</th>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dest</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -57,8 +64,144 @@ Parameters
</td>
</tr>
<tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code> or <code>connection: netconf</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_junos.html'>Junos OS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. The port value will default to the well known SSH port of 22 (for <code>transport=cli</code>) or port 830 (for <code>transport=netconf</code>) device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>cli</li>
+ <li><div style="color: blue"><b>netconf</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
<b>recursive</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
@@ -76,7 +219,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>remote_src</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -95,7 +238,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>src</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -112,7 +255,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ssh_config</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -127,7 +270,7 @@ Parameters
</td>
</tr>
<tr>
- <td colspan="1">
+ <td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ssh_private_key_file</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
@@ -223,6 +366,10 @@ Status
------
+- This module will be removed in a release after 2025-01-01. *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
Authors
~~~~~~~
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_policies_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_policies_module.rst
index a8751992b..34e35428e 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_policies_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_policies_module.rst
@@ -7225,18 +7225,18 @@ Examples
- junipernetworks.junos.junos_security_policies:
config:
global:
- policies:
- - description: test update
- match:
- application:
- any: true
- destination_address:
- any_ipv6: true
- source_address:
- any: true
- name: test_glob_3
- then:
- deny: true
+ policies:
+ - description: test update
+ match:
+ application:
+ any: true
+ destination_address:
+ any_ipv6: true
+ source_address:
+ any: true
+ name: test_glob_3
+ then:
+ deny: true
state: rendered
#
# -------------------------
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_zones_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_zones_module.rst
index 25bf73d6b..cf06a1f42 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_zones_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_security_zones_module.rst
@@ -1141,72 +1141,72 @@ Examples
description: test description
host_inbound_traffic:
protocols:
- - name: all
- - name: bgp
- except: true
+ - name: all
+ - name: bgp
+ except: true
system_services:
- - name: all
- - except: true
- name: dhcp
+ - name: all
+ - except: true
+ name: dhcp
interfaces:
- ge-0/0/1.0
- ge-0/0/2.0
screen: test_screen
security_zones:
- - address_book:
- address_sets:
- - addresses:
- - test_adr1
- - test_adr2
- name: test_adrset1
- - addresses:
- - test_adr3
- - test_adr4
- name: test_adrset2
- - address_sets:
- - test_adrset1
- - test_adrset2
+ - address_book:
+ address_sets:
+ - addresses:
+ - test_adr1
+ - test_adr2
+ name: test_adrset1
+ - addresses:
+ - test_adr3
+ - test_adr4
+ name: test_adrset2
+ - address_sets:
+ - test_adrset1
+ - test_adrset2
+ addresses:
+ - test_adr5
+ description: test description
+ name: test_adrset3
addresses:
- - test_adr5
- description: test description
- name: test_adrset3
- addresses:
- - description: test desc
- ip_prefix: 10.0.0.0/24
- name: test_adr1
- - dns_name:
- ipv6_only: true
- name: 1.1.1.1
- name: test_adr2
- - name: test_adr3
- range_address:
- from: 10.2.0.1
- to: 10.2.0.2
- - name: test_adr4
- wildcard_address: 10.3.0.1/24
- - description: test desc
- ip_prefix: 10.1.0.0/24
- name: test_adr5
- advance_policy_based_routing_profile: test_profile
- application_tracking: true
- description: test description
- enable_reverse_reroute: true
- host_inbound_traffic:
- protocols:
- - name: all
- - except: true
- name: bgp
- system_services:
- - name: all
- - except: true
- name: dhcp
- interfaces:
- - ge-0/0/3.0
- - ge-0/0/4.0
- name: test_sec_zone1
- screen: test_screen
- source_identity_log: true
- tcp_rst: true
+ - description: test desc
+ ip_prefix: 10.0.0.0/24
+ name: test_adr1
+ - dns_name:
+ ipv6_only: true
+ name: 1.1.1.1
+ name: test_adr2
+ - name: test_adr3
+ range_address:
+ from: 10.2.0.1
+ to: 10.2.0.2
+ - name: test_adr4
+ wildcard_address: 10.3.0.1/24
+ - description: test desc
+ ip_prefix: 10.1.0.0/24
+ name: test_adr5
+ advance_policy_based_routing_profile: test_profile
+ application_tracking: true
+ description: test description
+ enable_reverse_reroute: true
+ host_inbound_traffic:
+ protocols:
+ - name: all
+ - except: true
+ name: bgp
+ system_services:
+ - name: all
+ - except: true
+ name: dhcp
+ interfaces:
+ - ge-0/0/3.0
+ - ge-0/0/4.0
+ name: test_sec_zone1
+ screen: test_screen
+ source_identity_log: true
+ tcp_rst: true
state: merged
#
# -------------------------
@@ -1565,16 +1565,16 @@ Examples
description: test description
host_inbound_traffic:
protocols:
- - name: all
- - name: bgp
- except: true
+ - name: all
+ - name: bgp
+ except: true
system_services:
- - name: all
- - except: true
- name: dhcp
- interfaces:
- - ge-0/0/1.0
- - ge-0/0/2.0
+ - name: all
+ - except: true
+ name: dhcp
+ interfaces:
+ - ge-0/0/1.0
+ - ge-0/0/2.0
screen: test_screen
state: replaced
#
@@ -1880,13 +1880,13 @@ Examples
description: test description
host_inbound_traffic:
protocols:
- - name: all
- - name: bgp
- except: true
+ - name: all
+ - name: bgp
+ except: true
system_services:
- - name: all
- - except: true
- name: dhcp
+ - name: all
+ - except: true
+ name: dhcp
interfaces:
- ge-0/0/1.0
- ge-0/0/2.0
@@ -2413,72 +2413,72 @@ Examples
description: test description
host_inbound_traffic:
protocols:
- - name: all
- - name: bgp
- except: true
+ - name: all
+ - name: bgp
+ except: true
system_services:
- - name: all
- - except: true
- name: dhcp
+ - name: all
+ - except: true
+ name: dhcp
interfaces:
- ge-0/0/1.0
- ge-0/0/2.0
screen: test_screen
security_zones:
- - address_book:
- address_sets:
- - addresses:
- - test_adr1
- - test_adr2
- name: test_adrset1
- - addresses:
- - test_adr3
- - test_adr4
- name: test_adrset2
- - address_sets:
- - test_adrset1
- - test_adrset2
+ - address_book:
+ address_sets:
+ - addresses:
+ - test_adr1
+ - test_adr2
+ name: test_adrset1
+ - addresses:
+ - test_adr3
+ - test_adr4
+ name: test_adrset2
+ - address_sets:
+ - test_adrset1
+ - test_adrset2
+ - addresses:
+ - test_adr5
+ description: test description
+ name: test_adrset3
addresses:
- - test_adr5
- description: test description
- name: test_adrset3
- addresses:
- - description: test desc
- ip_prefix: 10.0.0.0/24
- name: test_adr1
- - dns_name:
- ipv6_only: true
- name: 1.1.1.1
- name: test_adr2
- - name: test_adr3
- range_address:
- from: 10.2.0.1
- to: 10.2.0.2
- - name: test_adr4
- wildcard_address: 10.3.0.1/24
- - description: test desc
- ip_prefix: 10.1.0.0/24
- name: test_adr5
- advance_policy_based_routing_profile: test_profile
- application_tracking: true
- description: test description
- enable_reverse_reroute: true
- host_inbound_traffic:
- protocols:
- - name: all
- - except: true
- name: bgp
- system_services:
- - name: all
- - except: true
- name: dhcp
- interfaces:
- - ge-0/0/3.0
- - ge-0/0/4.0
- name: test_sec_zone1
- screen: test_screen
- source_identity_log: true
- tcp_rst: true
+ - description: test desc
+ ip_prefix: 10.0.0.0/24
+ name: test_adr1
+ - dns_name:
+ ipv6_only: true
+ name: 1.1.1.1
+ name: test_adr2
+ - name: test_adr3
+ range_address:
+ from: 10.2.0.1
+ to: 10.2.0.2
+ - name: test_adr4
+ wildcard_address: 10.3.0.1/24
+ - description: test desc
+ ip_prefix: 10.1.0.0/24
+ name: test_adr5
+ advance_policy_based_routing_profile: test_profile
+ application_tracking: true
+ description: test description
+ enable_reverse_reroute: true
+ host_inbound_traffic:
+ protocols:
+ - name: all
+ - except: true
+ name: bgp
+ system_services:
+ - name: all
+ - except: true
+ name: dhcp
+ interfaces:
+ - ge-0/0/3.0
+ - ge-0/0/4.0
+ name: test_sec_zone1
+ screen: test_screen
+ source_identity_log: true
+ tcp_rst: true
state: rendered
#
# -------------------------
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_snmp_server_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_snmp_server_module.rst
index eac23b97a..35996ebff 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_snmp_server_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_snmp_server_module.rst
@@ -5414,15 +5414,15 @@ Examples
set: true
host_name_resolution: true
client_lists: # ATTR-----2
- - name: cl1
- addresses:
- - address: "192.16.1.0/24"
- - address: "192.16.2.0/24"
- - address: "11.11.11.11"
- restrict: true
- - name: cl2
- addresses:
- - address: "192.16.4.0/24"
+ - name: cl1
+ addresses:
+ - address: "192.16.1.0/24"
+ - address: "192.16.2.0/24"
+ - address: "11.11.11.11"
+ restrict: true
+ - name: cl2
+ addresses:
+ - address: "192.16.4.0/24"
routing_instance_access: # ATTR-----3
set: true
access_lists:
@@ -5549,16 +5549,16 @@ Examples
config:
contact: "ansiblesupport11@redhat.com"
customization:
- ether_stats_ifd_only: True
+ ether_stats_ifd_only: true
description: "Local SNMP Server"
engine_id:
local: "local1"
- use_default_ip_address: True
- use_mac_address: True
- filter_duplicates: True
+ use_default_ip_address: true
+ use_mac_address: true
+ filter_duplicates: true
filter_interfaces:
- set: True
- all_internal_interfaces: True
+ set: true
+ all_internal_interfaces: true
interfaces:
- "eth1"
- "eth2"
@@ -5699,20 +5699,20 @@ Examples
config:
contact: "ansiblesupport11@redhat.com"
customization:
- ether_stats_ifd_only: True
+ ether_stats_ifd_only: true
description: "Local SNMP Server"
engine_id:
local: "local1"
- use_default_ip_address: True
- use_mac_address: True
- filter_duplicates: True
+ use_default_ip_address: true
+ use_mac_address: true
+ filter_duplicates: true
filter_interfaces:
- set: True
- all_internal_interfaces: True
+ set: true
+ all_internal_interfaces: true
interfaces:
- "eth1"
- "eth2"
- state: overridden
+ state: overridden
#
# -------------------------
# Module Execution Result
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_static_routes_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_static_routes_module.rst
index debb94ccd..9d275e414 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_static_routes_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_static_routes_module.rst
@@ -276,27 +276,50 @@ Examples
# static {
# route 192.168.47.0/24 next-hop 172.16.1.2;
# route 192.168.16.0/24 next-hop 172.16.1.2;
- # route 10.200.16.75/24 next-hop 10.200.16.2;
# }
- name: Delete provided configuration (default operation is merge)
junipernetworks.junos.junos_static_routes:
config:
- - address_families:
- - afi: ipv4
- routes:
- - dest: 10.200.16.75/24
- next_hop:
- - forward_router_address: 10.200.16.2
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.168.16.0/24
+ next_hop:
+ - forward_router_address: 172.16.1.2
state: deleted
+ # Task Output
+ # -----------
+ # before:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # commands:
+ # - '<nc:routing-options
+ # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:static><nc:route
+ # delete="delete"><nc:name>192.168.16.0/24</nc:name></nc:route></nc:static></nc:routing-options>'
+ # - '<nc:routing-instances xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>'
+ # after:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+
# After state:
# ------------
#
# admin# show routing-options
# static {
# route 192.168.47.0/24 next-hop 172.16.1.2;
- # route 192.168.16.0/24 next-hop 172.16.1.2;
# }
# Using merged
@@ -307,21 +330,44 @@ Examples
# admin# show routing-options
# static {
# route 192.168.47.0/24 next-hop 172.16.1.2;
- # route 192.168.16.0/24 next-hop 172.16.1.2;
# }
- name: Merge provided configuration with device configuration (default operation
is merge)
junipernetworks.junos.junos_static_routes:
config:
- - address_families:
- - afi: ipv4
- routes:
- - dest: 10.200.16.75/24
- next_hop:
- - forward_router_address: 10.200.16.2
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.168.16.0/24
+ next_hop:
+ - forward_router_address: 172.16.1.2
state: merged
+ # Task Output
+ # -----------
+ # before:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # commands:
+ # - '<nc:routing-options
+ # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:static><nc:route><nc:name>192.168.16.0/24</nc:name>
+ # <nc:next-hop>172.16.1.2</nc:next-hop></nc:route></nc:static></nc:routing-options>'
+ # - '<nc:routing-instances xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>'
+ # after:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
# After state:
# ------------
#
@@ -329,7 +375,6 @@ Examples
# static {
# route 192.168.47.0/24 next-hop 172.16.1.2;
# route 192.168.16.0/24 next-hop 172.16.1.2;
- # route 10.200.16.75/24 next-hop 10.200.16.2;
# }
# Using overridden
@@ -340,27 +385,53 @@ Examples
# admin# show routing-options
# static {
# route 192.168.47.0/24 next-hop 172.16.1.2;
- # route 192.168.16.0/24 next-hop 172.16.0.1;
+ # route 192.168.16.0/24 next-hop 172.16.1.2;
# }
- - name: Override provided configuration with device configuration (default operation
+ - name: Override running configuration with provided configuration (default operation
is merge)
junipernetworks.junos.junos_static_routes:
config:
- - address_families:
- - afi: ipv4
- routes:
- - dest: 10.200.16.75/24
- next_hop:
- - forward_router_address: 10.200.16.2
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.168.16.0/24
+ next_hop:
+ - forward_router_address: 172.16.0.1
state: overridden
+ # Task Output:
+ # ------------
+ # before:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # commands:
+ # - >-
+ # <nc:routing-options
+ # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:static><nc:route
+ # delete="delete"><nc:name>192.168.47.0/24</nc:name></nc:route><nc:route
+ # delete="delete"><nc:name>192.168.16.0/24</nc:name></nc:route></nc:static><nc:static><nc:route><nc:name>192.168.16.0/24</nc:name><nc:next-hop>172.16.0.1</nc:next-hop></nc:route></nc:static></nc:routing-options>
+ # - '<nc:routing-instances xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>'
+ # after:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.0.1
# After state:
# ------------
#
# admin# show routing-options
# static {
- # route 10.200.16.75/24 next-hop 10.200.16.2;
+ # route 192.168.16.0/24 next-hop 172.16.0.1;
# }
# Using replaced
@@ -378,14 +449,43 @@ Examples
is merge)
junipernetworks.junos.junos_static_routes:
config:
- - address_families:
- - afi: ipv4
- routes:
- - dest: 192.168.47.0/24
- next_hop:
- - forward_router_address: 10.200.16.2
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.168.47.0/24
+ next_hop:
+ - forward_router_address: 10.200.16.2
state: replaced
+ # Task Output:
+ # ------------
+ # before:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # commands:
+ # - >-
+ # <nc:routing-options
+ # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:static><nc:route
+ # delete="delete"><nc:name>192.168.47.0/24</nc:name></nc:route></nc:static><nc:static><nc:route><nc:name>192.168.47.0/24</nc:name><nc:next-hop>10.200.16.2</nc:next-hop></nc:route></nc:static></nc:routing-options>
+ # - '<nc:routing-instances xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"/>'
+ # after:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 10.200.16.2
+
# After state:
# ------------
#
@@ -395,6 +495,93 @@ Examples
# route 192.168.16.0/24 next-hop 172.16.1.2;
# }
+ # Using gathered to gather static route facts from the device
+ # Before state
+ # ------------
+ # admin# show routing-options
+ # static {
+ # route 192.168.16.0/24 next-hop 172.16.1.2;
+ # route 192.168.47.0/24 next-hop 10.200.16.2;
+ # }
+ - name: Gather static routes facts from the device using junos_static_routes module
+ junipernetworks.junos.junos_static_routes:
+ state: gathered
+
+ # Task output:
+ # ------------
+ # gathered:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: 172.16.1.2
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 10.200.16.2
+
+ # Using rendered
+
+ - name: Render platform specific commands (without connecting to the device)
+ junipernetworks.junos.junos_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.168.16.0/24
+ next_hop:
+ - forward_router_address: 172.16.1.2
+ state: rendered
+
+ # Task output:
+ # ------------
+ # rendered:
+ # - '<nc:routing-options
+ # xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:static><nc:route><nc:name>192.168.16.0/24</nc:name>
+ # <nc:next-hop>172.16.1.2</nc:next-hop></nc:route></nc:static></nc:routing-options>'
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # <?xml version="1.0" encoding="UTF-8"?>
+ # <rpc-reply message-id="urn:uuid:0cadb4e8-5bba-47f4-986e-72906227007f">
+ # <configuration changed-seconds="1590139550" changed-localtime="2020-05-22 09:25:50 UTC">
+ # <version>18.4R1-S2.4</version>
+ # <routing-options>
+ # <static>
+ # <route>
+ # <name>192.168.16.0/24</name>
+ # <next-hop>172.16.1.2</next-hop>
+ # <next-hop>172.16.1.3</next-hop>
+ # </route>
+ # <route>
+ # <name>192.168.47.0/24</name>
+ # <next-hop>10.200.16.2</next-hop>
+ # </route>
+ # </static>
+ # </routing-options>
+ # </configuration>
+ # </rpc-reply>
+
+ - name: Parsed running config (without connecting to the device)
+ junipernetworks.junos.junos_static_routes:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output:
+ # ------------
+ # parsed:
+ # - address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.168.16.0/24
+ # next_hop:
+ # - forward_router_address: '[''172.16.1.2'', ''172.16.1.3'']'
+ # - dest: 192.168.47.0/24
+ # next_hop:
+ # - forward_router_address: 10.200.16.2
+
Return Values
@@ -462,6 +649,57 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;command 1&#x27;, &#x27;command 2&#x27;, &#x27;command 3&#x27;]</div>
</td>
</tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>gathered</code></td>
+ <td>
+ <div>Facts about the network resource gathered from the remote device as structured data.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>parsed</code></td>
+ <td>
+ <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when <em>state</em> is <code>rendered</code></td>
+ <td>
+ <div>The provided configuration in the task rendered in device-native format (offline).</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;nc:protocols xmlns:nc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt;&#x27;]</div>
+ </td>
+ </tr>
</table>
<br/><br/>
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_system_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_system_module.rst
index 6a4f081c8..c7cdaa0f6 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_system_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_system_module.rst
@@ -167,9 +167,9 @@ Examples
hostname: junos01
domain_name: test.example.com
domain-search:
- - ansible.com
- - redhat.com
- - juniper.net
+ - ansible.com
+ - redhat.com
+ - juniper.net
- name: remove configuration
junipernetworks.junos.junos_system:
@@ -178,8 +178,8 @@ Examples
- name: configure name servers
junipernetworks.junos.junos_system:
name_servers:
- - 8.8.8.8
- - 8.8.4.4
+ - 8.8.8.8
+ - 8.8.4.4
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_user_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_user_module.rst
index 0991c42d3..256362cfc 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_user_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_user_module.rst
@@ -380,8 +380,8 @@ Examples
- name: remove all user accounts except ansible
junipernetworks.junos.junos_user:
aggregate:
- - name: ansible
- purge: yes
+ - name: ansible
+ purge: true
- name: set user password
junipernetworks.junos.junos_user:
@@ -393,14 +393,14 @@ Examples
- name: Create list of users
junipernetworks.junos.junos_user:
aggregate:
- - {name: test_user1, full_name: test_user2, role: operator, state: present}
- - {name: test_user2, full_name: test_user2, role: read-only, state: present}
+ - {name: test_user1, full_name: test_user2, role: operator, state: present}
+ - {name: test_user2, full_name: test_user2, role: read-only, state: present}
- name: Delete list of users
junipernetworks.junos.junos_user:
aggregate:
- - {name: test_user1, full_name: test_user2, role: operator, state: absent}
- - {name: test_user2, full_name: test_user2, role: read-only, state: absent}
+ - {name: test_user1, full_name: test_user2, role: operator, state: absent}
+ - {name: test_user2, full_name: test_user2, role: read-only, state: absent}
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vlans_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vlans_module.rst
index 1958735b4..d8f934c72 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vlans_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vlans_module.rst
@@ -194,11 +194,11 @@ Examples
- name: Merge provided Junos vlans config with running-config
junipernetworks.junos.junos_vlans:
config:
- - name: vlan1
- vlan_id: 1
- - name: vlan2
- vlan_id: 2
- l3_interface: irb.12
+ - name: vlan1
+ vlan_id: 1
+ - name: vlan2
+ vlan_id: 2
+ l3_interface: irb.12
state: merged
#
# -------------------------
@@ -252,12 +252,12 @@ Examples
- name: Replace Junos vlans running-config with the provided config
junipernetworks.junos.junos_vlans:
config:
- - name: vlan1
- vlan_id: 11
- l3_interface: irb.10
+ - name: vlan1
+ vlan_id: 11
+ l3_interface: irb.10
- - name: vlan2
- vlan_id: 2
+ - name: vlan2
+ vlan_id: 2
state: replaced
# -------------------------
# Module Execution Result
@@ -321,9 +321,9 @@ Examples
- name: Override Junos running-config with provided config
junipernetworks.junos.junos_vlans:
config:
- - name: vlan3
- vlan_id: 3
- l3_interface: irb.13
+ - name: vlan3
+ vlan_id: 3
+ l3_interface: irb.13
state: overridden
# -------------------------
# Module Execution Result
@@ -375,7 +375,7 @@ Examples
- name: Delete specific vlan
junipernetworks.junos.junos_vlans:
config:
- - name: vlan3
+ - name: vlan3
state: deleted
# -------------------------
# Module Execution Result
@@ -427,12 +427,12 @@ Examples
- name: Render xml for provided facts.
junipernetworks.junos.junos_vlans:
config:
- - name: vlan1
- vlan_id: 1
+ - name: vlan1
+ vlan_id: 1
- - name: vlan2
- vlan_id: 2
- l3_interface: irb.12
+ - name: vlan2
+ vlan_id: 2
+ l3_interface: irb.12
state: rendered
#
# -------------------------
diff --git a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vrf_module.rst b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vrf_module.rst
index eb366810b..b3cbc3a0d 100644
--- a/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vrf_module.rst
+++ b/ansible_collections/junipernetworks/junos/docs/junipernetworks.junos.junos_vrf_module.rst
@@ -363,8 +363,8 @@ Examples
name: test-1
description: test-vrf-1
interfaces:
- - ge-0/0/3
- - ge-0/0/2
+ - ge-0/0/3
+ - ge-0/0/2
rd: 192.0.2.1:10
target: target:65514:113
state: present
@@ -374,8 +374,8 @@ Examples
name: test-1
description: test-vrf-1
interfaces:
- - ge-0/0/3
- - ge-0/0/2
+ - ge-0/0/3
+ - ge-0/0/2
rd: 192.0.2.1:10
target: target:65514:113
state: absent
@@ -385,8 +385,8 @@ Examples
name: test-1
description: test-vrf-1
interfaces:
- - ge-0/0/3
- - ge-0/0/2
+ - ge-0/0/3
+ - ge-0/0/2
rd: 192.0.2.1:10
target: target:65514:113
active: false
@@ -396,8 +396,8 @@ Examples
name: test-1
description: test-vrf-1
interfaces:
- - ge-0/0/3
- - ge-0/0/2
+ - ge-0/0/3
+ - ge-0/0/2
rd: 192.0.2.1:10
target: target:65514:113
active: true
@@ -405,19 +405,19 @@ Examples
- name: Create vrf using aggregate
junipernetworks.junos.junos_vrf:
aggregate:
- - name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3 - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- - name: test-2
- description: test-vrf-2
- interfaces:
- - ge-0/0/4
- - ge-0/0/5
- rd: 192.0.2.2:10
- target: target:65515:114
+ - name: test-1
+ description: test-vrf-1
+ interfaces:
+ - ge-0/0/3 - ge-0/0/2
+ rd: 192.0.2.1:10
+ target: target:65514:113
+ - name: test-2
+ description: test-vrf-2
+ interfaces:
+ - ge-0/0/4
+ - ge-0/0/5
+ rd: 192.0.2.2:10
+ target: target:65515:114
state: present