dc37b41b72
* [2.5] Update ios tests (#42509) * 192.168.0.1/24 conflicts with management IP * Images don't have the hostnames we expect (cherry picked from commit399d13d
) Co-authored-by: Nathaniel Case <this.is@nathanielca.se> * ios test cleanup pt 2 (#42570) * Remove local from ios_config to avoid needing to add provider * ios_smoke should test all with local to pick up the slack (cherry picked from commit381263ad99
)
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- debug: msg="START cli/diff.yaml on connection={{ ansible_connection }}"
|
|
|
|
- name: Ensure hostname is preset
|
|
ios_system:
|
|
hostname: "{{ shorter_hostname }}"
|
|
|
|
- name: ios_config diff against retrieved config
|
|
ios_config:
|
|
diff_against: intended
|
|
intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config') }}"
|
|
diff: true
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "'hostname an-ios-02.ansible.com' in result['diff']['after']"
|
|
- "'hostname {{ shorter_hostname }}' in result['diff']['before']"
|
|
|
|
- name: ios_config diff against provided running_config
|
|
ios_config:
|
|
diff_against: intended
|
|
intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config') }}"
|
|
running_config: "{{ lookup('file', '{{ role_path }}/templates/basic/base_running_config') }}"
|
|
diff: true
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "'hostname an-ios-02.ansible.com' in result['diff']['after']"
|
|
- "'hostname an-ios-01.ansible.com' in result['diff']['before']"
|
|
|
|
- debug: msg="END cli/diff.yaml on connection={{ ansible_connection }}"
|