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.
42 lines
852 B
YAML
42 lines
852 B
YAML
5 years ago
|
---
|
||
|
- name: Setup - Enable feature netconf
|
||
|
nxos_feature:
|
||
|
feature: netconf
|
||
|
state: enabled
|
||
|
vars: &ssh_credentials
|
||
|
ansible_connection: network_cli
|
||
|
ansible_ssh_port: 22
|
||
|
register: result
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- debug: msg='Netconf feature is not supported on this platform!'
|
||
|
when: result.failed
|
||
|
|
||
|
- name: Setup - Remove Vlan
|
||
|
nxos_config:
|
||
|
lines:
|
||
|
- no vlan 42
|
||
|
ignore_errors: yes
|
||
|
when: not result.failed
|
||
|
|
||
|
- block:
|
||
|
- name: Run netconf tests
|
||
|
include: netconf.yaml
|
||
|
when: not result.failed
|
||
|
|
||
|
always:
|
||
|
- name: Disable feature netconf
|
||
|
nxos_feature:
|
||
|
feature: netconf
|
||
|
state: disabled
|
||
|
vars: *ssh_credentials
|
||
|
when: not result.failed
|
||
|
|
||
|
- name: Cleanup - Remove vlan
|
||
|
nxos_config:
|
||
|
lines:
|
||
|
- no vlan 42
|
||
|
vars: *ssh_credentials
|
||
|
ignore_errors: yes
|
||
|
when: not result.failed
|