2016-10-28 18:50:29 +00:00
|
|
|
---
|
2017-12-19 20:49:49 +00:00
|
|
|
- debug: msg="START cli/src_basic.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
|
|
|
|
|
|
|
- name: configure device with config
|
|
|
|
eos_config:
|
|
|
|
src: basic/config.j2
|
|
|
|
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"
|
|
|
|
# https://github.com/ansible/ansible-modules-core/issues/4807
|
2017-02-25 21:40:13 +00:00
|
|
|
- "result.updates is defined"
|
2016-10-28 18:50:29 +00:00
|
|
|
|
|
|
|
- name: check device with config
|
|
|
|
eos_config:
|
|
|
|
src: basic/config.j2
|
2017-02-25 21:40:13 +00:00
|
|
|
defaults: yes
|
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 == false"
|
|
|
|
# https://github.com/ansible/ansible-modules-core/issues/4807
|
|
|
|
- "result.updates is not defined"
|
|
|
|
|
2017-12-19 20:49:49 +00:00
|
|
|
- debug: msg="END cli/src_basic.yaml on connection={{ ansible_connection }}"
|