You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/nxos_vrrp/tests/nxapi/sanity.yaml

71 lines
1.6 KiB
YAML

---
- debug: msg="START TRANSPORT:NXAPI nxos_vrrp sanity test"
- block:
- name: "Enable interface-vlan"
nxos_feature:
feature: interface-vlan
state: enabled
provider: "{{ nxapi }}"
- name: "Enable vrrp"
nxos_feature:
feature: vrrp
state: enabled
provider: "{{ nxapi }}"
- name: "create int vlan 10"
nxos_config:
commands:
- interface vlan 10
match: none
provider: "{{ nxapi }}"
- name: Ensure vrrp group 100 and vip 10.1.100.1 is on vlan10
nxos_vrrp:
interface: vlan10
group: 100
vip: 10.1.100.1
provider: "{{ nxapi }}"
- name: Ensure removal of the vrrp group config
# vip is required to ensure the user knows what they are removing
nxos_vrrp: &remove
interface: vlan10
group: 100
vip: 10.1.100.1
state: absent
provider: "{{ nxapi }}"
- name: Re-config with more params
nxos_vrrp:
interface: vlan10
group: 100
vip: 10.1.100.1
preempt: false
priority: 130
authentication: AUTHKEY
provider: "{{ nxapi }}"
always:
- name: remove vrrp
nxos_vrrp: *remove
ignore_errors: yes
- name: "Disable interface-vlan"
nxos_config:
commands:
- no feature interface-vlan
provider: "{{ nxapi }}"
match: none
ignore_errors: yes
- name: "Disable vrrp"
nxos_feature:
feature: vrrp
state: disabled
provider: "{{ nxapi }}"
ignore_errors: yes
- debug: msg="END TRANSPORT:NXAPI nxos_vrrp sanity test"