2016-10-28 18:50:29 +00:00
|
|
|
---
|
2017-12-19 20:49:49 +00:00
|
|
|
- debug: msg="START cli/save.yaml on connection={{ ansible_connection }}"
|
2016-10-28 18:50:29 +00:00
|
|
|
|
|
|
|
- name: setup
|
|
|
|
eos_config:
|
|
|
|
commands:
|
|
|
|
- no description
|
|
|
|
- no shutdown
|
|
|
|
parents:
|
2017-07-12 07:25:26 +00:00
|
|
|
- interface Ethernet2
|
2016-10-28 18:50:29 +00:00
|
|
|
match: none
|
|
|
|
provider: "{{ cli }}"
|
2017-12-19 20:49:49 +00:00
|
|
|
become: yes
|
2016-10-28 18:50:29 +00:00
|
|
|
|
|
|
|
|
2017-07-12 09:41:45 +00:00
|
|
|
- name: save config always
|
2016-10-28 18:50:29 +00:00
|
|
|
eos_config:
|
2017-07-12 09:41:45 +00:00
|
|
|
save_when: always
|
2016-10-28 18:50:29 +00:00
|
|
|
provider: "{{ cli }}"
|
2017-12-19 20:49:49 +00:00
|
|
|
become: yes
|
2016-10-28 18:50:29 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
2017-07-12 09:41:45 +00:00
|
|
|
- name: save always again (not idempotent)
|
2016-10-28 18:50:29 +00:00
|
|
|
eos_config:
|
2017-07-12 09:41:45 +00:00
|
|
|
save_when: always
|
2016-10-28 18:50:29 +00:00
|
|
|
provider: "{{ cli }}"
|
2017-12-19 20:49:49 +00:00
|
|
|
become: yes
|
2016-10-28 18:50:29 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
2017-12-19 20:49:49 +00:00
|
|
|
- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"
|