2016-10-28 20:50:29 +02:00
|
|
|
---
|
2017-08-21 17:15:25 +02:00
|
|
|
- debug: msg="START {{ connection.transport }}/save.yaml"
|
2016-10-28 20:50:29 +02:00
|
|
|
|
2017-09-01 11:44:24 +02:00
|
|
|
# Select interface for test
|
|
|
|
- set_fact: intname="{{ nxos_int1 }}"
|
|
|
|
|
2016-10-28 20:50:29 +02:00
|
|
|
- name: setup
|
|
|
|
nxos_config:
|
|
|
|
commands:
|
|
|
|
- no description
|
|
|
|
- no shutdown
|
|
|
|
parents:
|
2017-09-01 11:44:24 +02:00
|
|
|
- "interface {{ intname }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
match: none
|
2017-08-21 17:15:25 +02:00
|
|
|
provider: "{{ connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
|
|
|
|
- name: save config
|
|
|
|
nxos_config:
|
2017-09-01 11:44:24 +02:00
|
|
|
save_when: always
|
|
|
|
timeout: 300
|
2017-08-21 17:15:25 +02:00
|
|
|
provider: "{{ connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: save should always run
|
|
|
|
nxos_config:
|
2017-09-01 11:44:24 +02:00
|
|
|
save_when: always
|
|
|
|
timeout: 300
|
2017-08-21 17:15:25 +02:00
|
|
|
provider: "{{ connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
2017-08-21 17:15:25 +02:00
|
|
|
- debug: msg="END {{ connection.transport }}/save.yaml"
|