@ -4,7 +4,7 @@
- name : setup - remove interface address
- name : setup - remove interface address
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : absent
state : absent
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -12,7 +12,7 @@
- name : Configure interface address
- name : Configure interface address
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : present
state : present
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -27,15 +27,15 @@
- assert:
- assert:
that:
that:
- "result.changed == true"
- "result.changed == true"
- "'<name>1 .1.1 .1/32</name>' in config.xml"
- "'<name>1 92.0.2 .1/32</name>' in config.xml"
- "'<name>fd5d:12c9:2201:1::1/128</name>' in config.xml"
- "'<name>fd5d:12c9:2201:1::1/128</name>' in config.xml"
- result.diff.prepared is search("\+ *address 1 .1.1 .1/32")
- result.diff.prepared is search("\+ *address 1 92.0.2 .1/32")
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
- name : Configure interface address (idempotent)
- name : Configure interface address (idempotent)
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : present
state : present
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -48,7 +48,7 @@
- name : Deactivate interface address
- name : Deactivate interface address
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : present
state : present
active : False
active : False
@ -65,13 +65,13 @@
that:
that:
- "result.changed == true"
- "result.changed == true"
- "'<address inactive=\"inactive\">' in config.xml"
- "'<address inactive=\"inactive\">' in config.xml"
- result.diff.prepared is search("! *inactive[:] address 1 .1.1 .1/32")
- result.diff.prepared is search("! *inactive[:] address 1 92.0.2 .1/32")
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
- name : Activate interface address
- name : Activate interface address
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : present
state : present
active : True
active : True
@ -81,13 +81,13 @@
- assert:
- assert:
that:
that:
- "result.changed == true"
- "result.changed == true"
- result.diff.prepared is search("! *active[:] address 1 .1.1 .1/32")
- result.diff.prepared is search("! *active[:] address 1 92.0.2 .1/32")
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
- name : Delete interface address
- name : Delete interface address
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : absent
state : absent
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -95,13 +95,13 @@
- assert:
- assert:
that:
that:
- result.diff.prepared is search("\- *address 1 .1.1 .1/32")
- result.diff.prepared is search("\- *address 1 92.0.2 .1/32")
- result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
- name : Delete interface address (idempotent)
- name : Delete interface address (idempotent)
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : absent
state : absent
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -114,7 +114,7 @@
- name : Aggregate setup- delete interface ge-0/0/1
- name : Aggregate setup- delete interface ge-0/0/1
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/1
name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
state : absent
state : absent
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -123,7 +123,7 @@
- name : Aggregate setup- delete interface ge-0/0/2
- name : Aggregate setup- delete interface ge-0/0/2
junos_l3_interface:
junos_l3_interface:
name : ge-0/0/2
name : ge-0/0/2
ipv4 : 2.2 .2 .2
ipv4 : 192.0 .2 .2
ipv6 : fd5d:12c9:2201:2::2
ipv6 : fd5d:12c9:2201:2::2
state : absent
state : absent
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -133,10 +133,10 @@
junos_l3_interface:
junos_l3_interface:
aggregate:
aggregate:
- name : ge-0/0/1
- name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
- name : ge-0/0/2
- name : ge-0/0/2
ipv4 : 2.2 .2 .2
ipv4 : 192.0 .2 .2
ipv6 : fd5d:12c9:2201:2::2
ipv6 : fd5d:12c9:2201:2::2
provider : "{{ netconf }}"
provider : "{{ netconf }}"
register : result
register : result
@ -145,11 +145,11 @@
that:
that:
- 'result.changed == true'
- 'result.changed == true'
- "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
- "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
- result.diff.prepared is search("\+ *address 1 .1.1 .1/32")
- result.diff.prepared is search("\+ *address 1 92.0.2 .1/32")
- "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
- "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
- "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
- "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
- result.diff.prepared is search("\+ *address 2.2 .2.2/32")
- result.diff.prepared is search("\+ *address 192.0 .2.2/32")
- "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
- "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:2::2/128")
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:2::2/128")
@ -157,10 +157,10 @@
junos_l3_interface:
junos_l3_interface:
aggregate:
aggregate:
- name : ge-0/0/1
- name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
- name : ge-0/0/2
- name : ge-0/0/2
ipv4 : 2.2 .2 .2
ipv4 : 192.0 .2 .2
ipv6 : fd5d:12c9:2201:2::2
ipv6 : fd5d:12c9:2201:2::2
active : True
active : True
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -174,10 +174,10 @@
junos_l3_interface:
junos_l3_interface:
aggregate:
aggregate:
- name : ge-0/0/1
- name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
- name : ge-0/0/2
- name : ge-0/0/2
ipv4 : 2.2 .2 .2
ipv4 : 192.0 .2 .2
ipv6 : fd5d:12c9:2201:2::2
ipv6 : fd5d:12c9:2201:2::2
active : False
active : False
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -186,19 +186,19 @@
- assert:
- assert:
that:
that:
- 'result.changed == true'
- 'result.changed == true'
- result.diff.prepared is search("! *inactive[:] address 1 .1.1 .1/32")
- result.diff.prepared is search("! *inactive[:] address 1 92.0.2 .1/32")
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("! *inactive[:] address 2.2 .2.2/32")
- result.diff.prepared is search("! *inactive[:] address 192.0 .2.2/32")
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:2::2/128")
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:2::2/128")
- name : Activate l3 interface configuration
- name : Activate l3 interface configuration
junos_l3_interface:
junos_l3_interface:
aggregate:
aggregate:
- name : ge-0/0/1
- name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
- name : ge-0/0/2
- name : ge-0/0/2
ipv4 : 2.2 .2 .2
ipv4 : 192.0 .2 .2
ipv6 : fd5d:12c9:2201:2::2
ipv6 : fd5d:12c9:2201:2::2
active : True
active : True
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -207,19 +207,19 @@
- assert:
- assert:
that:
that:
- 'result.changed == true'
- 'result.changed == true'
- result.diff.prepared is search("! *active[:] address 1 .1.1 .1/32")
- result.diff.prepared is search("! *active[:] address 1 92.0.2 .1/32")
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("! *active[:] address 2.2 .2.2/32")
- result.diff.prepared is search("! *active[:] address 192.0 .2.2/32")
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:2::2/128")
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:2::2/128")
- name : Delete l3 interface configuration
- name : Delete l3 interface configuration
junos_l3_interface:
junos_l3_interface:
aggregate:
aggregate:
- name : ge-0/0/1
- name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
- name : ge-0/0/2
- name : ge-0/0/2
ipv4 : 2.2 .2 .2
ipv4 : 192.0 .2 .2
ipv6 : fd5d:12c9:2201:2::2
ipv6 : fd5d:12c9:2201:2::2
state : absent
state : absent
provider : "{{ netconf }}"
provider : "{{ netconf }}"
@ -229,11 +229,11 @@
that:
that:
- 'result.changed == true'
- 'result.changed == true'
- "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
- "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
- result.diff.prepared is search("\- *address 1 .1.1 .1/32")
- result.diff.prepared is search("\- *address 1 92.0.2 .1/32")
- "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
- "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
- result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
- result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
- "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
- "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
- result.diff.prepared is search("\- *address 2.2 .2.2/32")
- result.diff.prepared is search("\- *address 192.0 .2.2/32")
- "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
- "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
- result.diff.prepared is search("\- *address fd5d:12c9:2201:2::2/128")
- result.diff.prepared is search("\- *address fd5d:12c9:2201:2::2/128")
@ -241,10 +241,10 @@
junos_l3_interface:
junos_l3_interface:
aggregate:
aggregate:
- name : ge-0/0/1
- name : ge-0/0/1
ipv4 : 1 .1.1 .1
ipv4 : 1 92.0.2 .1
ipv6 : fd5d:12c9:2201:1::1
ipv6 : fd5d:12c9:2201:1::1
- name : ge-0/0/2
- name : ge-0/0/2
ipv4 : 2.2 .2 .2
ipv4 : 192.0 .2 .2
ipv6 : fd5d:12c9:2201:2::2
ipv6 : fd5d:12c9:2201:2::2
state : absent
state : absent
provider : "{{ netconf }}"
provider : "{{ netconf }}"