mirror of https://github.com/ansible/ansible.git
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.
40 lines
933 B
YAML
40 lines
933 B
YAML
7 years ago
|
---
|
||
|
- debug: msg="START TRANSPORT:NXAPI nxos_vrf_interface sanity test"
|
||
|
|
||
|
# Select interface for test
|
||
|
- set_fact: intname="{{ nxos_int1 }}"
|
||
|
|
||
|
- block:
|
||
|
- name: put interface in L3
|
||
|
nxos_config:
|
||
|
commands:
|
||
|
- no switchport
|
||
|
parents:
|
||
|
- "interface {{ intname }}"
|
||
|
match: none
|
||
|
provider: "{{ nxapi }}"
|
||
|
|
||
|
- name: Ensure vrf ntc exists on interface
|
||
|
nxos_vrf_interface:
|
||
|
vrf: ntc
|
||
|
interface: "{{ intname }}"
|
||
|
state: present
|
||
|
provider: "{{ nxapi }}"
|
||
|
|
||
|
- name: Ensure ntc VRF does not exist on interface
|
||
|
nxos_vrf_interface:
|
||
|
vrf: ntc
|
||
|
interface: "{{ intname }}"
|
||
|
state: absent
|
||
|
provider: "{{ nxapi }}"
|
||
|
|
||
|
always:
|
||
|
- name: put interface in default mode
|
||
|
nxos_config:
|
||
|
lines: "default interface {{ intname }}"
|
||
|
provider: "{{ nxapi }}"
|
||
|
match: none
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- debug: msg="END TRANSPORT:NXAPI nxos_vrf_interface sanity test"
|