mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
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:
@@ -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 }}"
|
||||
|
||||
@@ -37,5 +37,4 @@
|
||||
match: none
|
||||
become: yes
|
||||
|
||||
|
||||
- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user