2017-08-17 10:44:10 +02:00
|
|
|
---
|
2018-01-05 18:39:04 +01:00
|
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_vtp_domain sanity test"
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
when: ansible_connection == "local"
|
2017-08-17 10:44:10 +02:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: enable feature vtp
|
|
|
|
nxos_feature:
|
|
|
|
feature: vtp
|
|
|
|
state: enabled
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
- name: configure vtp domain
|
2017-09-01 11:59:21 +02:00
|
|
|
nxos_vtp_domain: &configure
|
2017-08-17 10:44:10 +02:00
|
|
|
domain: ntc
|
|
|
|
provider: "{{ connection }}"
|
2017-09-01 11:59:21 +02:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &true
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: "Conf Idempotence"
|
|
|
|
nxos_vtp_domain: *configure
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &false
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
2017-08-17 10:44:10 +02:00
|
|
|
|
|
|
|
always:
|
|
|
|
- name: disable feature vtp
|
|
|
|
nxos_feature:
|
|
|
|
feature: vtp
|
|
|
|
state: disabled
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
2018-01-05 18:39:04 +01:00
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_vtp_domain sanity test"
|