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