1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/nxos_vpc/tests/common/sanity.yaml

82 lines
1.7 KiB
YAML
Raw Normal View History

---
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_vpc sanity test"
- block:
- name: enable feature vpc
nxos_feature:
feature: vpc
state: enabled
provider: "{{ connection }}"
- name: Ensure ntc VRF exists on switch
nxos_vrf:
vrf: ntc
provider: "{{ connection }}"
- name: Configure vpc
nxos_vpc: &conf_vpc
state: present
domain: 100
role_priority: 500
system_priority: 2000
pkl_dest: 192.168.100.4
pkl_src: 10.1.100.20
pkl_vrf: ntc
peer_gw: true
delay_restore: 5
auto_recovery: true
provider: "{{ connection }}"
register: result
- assert: &true
that:
- "result.changed == true"
- name: "Conf Idempotence"
nxos_vpc: *conf_vpc
register: result
- assert: &false
that:
- "result.changed == false"
- name: remove vpc
nxos_vpc: &rem_vpc
state: absent
domain: 100
role_priority: 32667
system_priority: 2000
pkl_dest: 192.168.100.4
pkl_src: 10.1.100.20
pkl_vrf: ntc
peer_gw: true
delay_restore: 5
auto_recovery: false
provider: "{{ connection }}"
register: result
- assert: *true
- name: "Remove Idempotence"
nxos_vpc: *rem_vpc
register: result
- assert: *false
always:
- name: remove vrf
nxos_vrf:
vrf: ntc
state: absent
provider: "{{ connection }}"
ignore_errors: yes
- name: disable feature vpc
nxos_feature:
feature: vpc
state: disabled
provider: "{{ connection }}"
ignore_errors: yes
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_vpc sanity test"