|
|
|
@ -41,7 +41,7 @@
|
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
- assert: &unchanged
|
|
|
|
|
that:
|
|
|
|
|
- 'result.changed == false'
|
|
|
|
|
|
|
|
|
@ -74,7 +74,7 @@
|
|
|
|
|
- '"ip address dhcp" in result.commands'
|
|
|
|
|
|
|
|
|
|
- name: Configure interface ipv6 address
|
|
|
|
|
ios_l3_interface:
|
|
|
|
|
ios_l3_interface: &ipv6-1
|
|
|
|
|
name: "{{ test_interface }}"
|
|
|
|
|
ipv6: fd5d:12c9:2201:1::1/64
|
|
|
|
|
state: present
|
|
|
|
@ -88,16 +88,36 @@
|
|
|
|
|
- '"ipv6 address fd5d:12c9:2201:1::1/64" in result.commands'
|
|
|
|
|
|
|
|
|
|
- name: Configure interface ipv6 address (idempotent)
|
|
|
|
|
ios_l3_interface:
|
|
|
|
|
ios_l3_interface: *ipv6-1
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert: *unchanged
|
|
|
|
|
|
|
|
|
|
- name: Configure second ipv6 address on interface
|
|
|
|
|
ios_l3_interface: &ipv6-2
|
|
|
|
|
name: "{{ test_interface }}"
|
|
|
|
|
ipv6: fd5d:12c9:2201:1::1/64
|
|
|
|
|
ipv6: fd5d:12c9:2291:1::1/64
|
|
|
|
|
state: present
|
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
- 'result.changed == false'
|
|
|
|
|
- 'result.changed == true'
|
|
|
|
|
- '"interface {{ test_interface }}" in result.commands'
|
|
|
|
|
- '"ipv6 address fd5d:12c9:2291:1::1/64" in result.commands'
|
|
|
|
|
|
|
|
|
|
- name: Ensure first ipv6 address still associated with interface
|
|
|
|
|
ios_l3_interface: *ipv6-1
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert: *unchanged
|
|
|
|
|
|
|
|
|
|
- name: Ensure second ipv6 address still associated with interface
|
|
|
|
|
ios_l3_interface: *ipv6-2
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert: *unchanged
|
|
|
|
|
|
|
|
|
|
- name: Assign same ipv6 address to other interface (fail)
|
|
|
|
|
ios_l3_interface:
|
|
|
|
@ -181,9 +201,7 @@
|
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
- 'result.changed == false'
|
|
|
|
|
- assert: *unchanged
|
|
|
|
|
|
|
|
|
|
- name: Change ipv4 and ipv6 address using aggregate
|
|
|
|
|
ios_l3_interface:
|
|
|
|
@ -232,8 +250,6 @@
|
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
- 'result.changed == false'
|
|
|
|
|
- assert: *unchanged
|
|
|
|
|
|
|
|
|
|
- debug: msg="END ios_l3_interface cli/basic.yaml on connection={{ ansible_connection }}"
|
|
|
|
|