Fix eapi tests to use become (#40838)

* Return the expected prompt character based on become status

* Update eos_banner tests for eapi

* Update eos_config tests for eapi

* Update eos_facts tests for eapi

* Update eos_interface tests for eapi

* Update eos_l3_interface tests for eapi

* Update eos_lldp tests for eapi

* Update eos_logging tests for eapi

* Update eos_smoke tests for eapi

* Update eos_system tests for eapi
This commit is contained in:
Nathaniel Case
2018-05-29 14:18:03 -04:00
committed by GitHub
parent 669949e6a3
commit 20f93816d6
59 changed files with 217 additions and 490 deletions

View File

@@ -13,23 +13,20 @@
- name: save config always
eos_config:
eos_config: &always
save_when: always
become: yes
register: result
- assert:
- assert: &changed
that:
- "result.changed == true"
- name: save always again (not idempotent)
eos_config:
save_when: always
- name: save should always run
eos_config: *always
become: yes
register: result
- assert:
that:
- "result.changed == true"
- assert: *changed
- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"

View File

@@ -37,5 +37,4 @@
match: none
become: yes
- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"

View File

@@ -3,7 +3,7 @@
- name: setup
eos_config:
lines: hostname veos01
lines: hostname {{ inventory_hostname_short }}
match: none
become: yes
@@ -30,7 +30,7 @@
- name: teardown
eos_config:
lines: hostname veos01
lines: hostname {{ inventory_hostname_short }}
match: none
become: yes

View File

@@ -5,7 +5,7 @@
eos_config:
lines:
- snmp-server contact ansible
- hostname veos01
- "hostname {{ inventory_hostname_short }}"
match: none
become: yes
@@ -37,7 +37,7 @@
eos_config:
lines:
- no snmp-server contact
- hostname veos01
- hostname {{ inventory_hostname_short }}
match: none
become: yes

View File

@@ -4,8 +4,8 @@
- name: setup
eos_config:
lines:
- snmp-server contact ansible
- hostname veos01
- "snmp-server contact ansible"
- "hostname {{ inventory_hostname_short }}"
match: none
become: yes
@@ -36,8 +36,8 @@
- name: teardown
eos_config:
lines:
- hostname veos01
- no snmp-server contact
- "hostname {{ inventory_hostname_short }}"
match: none
become: yes