|
|
@ -10,7 +10,7 @@
|
|
|
|
state: enabled
|
|
|
|
state: enabled
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: create port-channel
|
|
|
|
- name: create port-channel10
|
|
|
|
nxos_config:
|
|
|
|
nxos_config:
|
|
|
|
commands:
|
|
|
|
commands:
|
|
|
|
- interface port-channel10
|
|
|
|
- interface port-channel10
|
|
|
@ -18,6 +18,14 @@
|
|
|
|
match: none
|
|
|
|
match: none
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: create port-channel11
|
|
|
|
|
|
|
|
nxos_config:
|
|
|
|
|
|
|
|
commands:
|
|
|
|
|
|
|
|
- interface port-channel11
|
|
|
|
|
|
|
|
- switchport
|
|
|
|
|
|
|
|
match: none
|
|
|
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: configure vpc
|
|
|
|
- name: configure vpc
|
|
|
|
nxos_vpc:
|
|
|
|
nxos_vpc:
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
@ -33,7 +41,7 @@
|
|
|
|
- name: Configure vpc port channel
|
|
|
|
- name: Configure vpc port channel
|
|
|
|
nxos_vpc_interface: &conf
|
|
|
|
nxos_vpc_interface: &conf
|
|
|
|
portchannel: 10
|
|
|
|
portchannel: 10
|
|
|
|
vpc: 100
|
|
|
|
vpc: 10
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
@ -49,10 +57,40 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure vpc port channel
|
|
|
|
|
|
|
|
nxos_vpc_interface: &conf1
|
|
|
|
|
|
|
|
portchannel: 11
|
|
|
|
|
|
|
|
peer_link: True
|
|
|
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Conf Idempotence"
|
|
|
|
|
|
|
|
nxos_vpc_interface: *conf1
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure vpc port channel
|
|
|
|
|
|
|
|
nxos_vpc_interface: &conf2
|
|
|
|
|
|
|
|
portchannel: 11
|
|
|
|
|
|
|
|
peer_link: False
|
|
|
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Conf Idempotence"
|
|
|
|
|
|
|
|
nxos_vpc_interface: *conf2
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
- name: remove vpc port channel
|
|
|
|
- name: remove vpc port channel
|
|
|
|
nxos_vpc_interface: &remove
|
|
|
|
nxos_vpc_interface: &remove
|
|
|
|
portchannel: 10
|
|
|
|
portchannel: 10
|
|
|
|
vpc: 100
|
|
|
|
vpc: 10
|
|
|
|
state: absent
|
|
|
|
state: absent
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
@ -82,7 +120,7 @@
|
|
|
|
- name: remove vpc port channel
|
|
|
|
- name: remove vpc port channel
|
|
|
|
nxos_vpc_interface:
|
|
|
|
nxos_vpc_interface:
|
|
|
|
portchannel: 10
|
|
|
|
portchannel: 10
|
|
|
|
vpc: 100
|
|
|
|
vpc: 10
|
|
|
|
state: absent
|
|
|
|
state: absent
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
ignore_errors: yes
|
|
|
@ -91,6 +129,7 @@
|
|
|
|
nxos_config:
|
|
|
|
nxos_config:
|
|
|
|
commands:
|
|
|
|
commands:
|
|
|
|
- no interface port-channel10
|
|
|
|
- no interface port-channel10
|
|
|
|
|
|
|
|
- no interface port-channel11
|
|
|
|
match: none
|
|
|
|
match: none
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
ignore_errors: yes
|
|
|
|