mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
ios integration tests to network_cli (#33920)
* Preliminary steps * Fix Python3 network_cli ios * Add connection to debug strings * Fix ios confirm prompt by way of optional newline Also update ios_user delete tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START cli/set_domain_search.yaml"
|
||||
- debug: msg="START cli/set_domain_search.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
ios_config:
|
||||
@@ -8,6 +8,7 @@
|
||||
- no ip domain-list redhat.com
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: configure domain_search
|
||||
ios_system:
|
||||
@@ -15,6 +16,7 @@
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -29,6 +31,7 @@
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -40,6 +43,7 @@
|
||||
domain_search:
|
||||
- ansible.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -52,6 +56,7 @@
|
||||
domain_search:
|
||||
- ansible.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -64,6 +69,7 @@
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -77,6 +83,7 @@
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -89,6 +96,7 @@
|
||||
- ansible.com
|
||||
- eng.ansible.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -104,6 +112,7 @@
|
||||
- ansible.com
|
||||
- eng.ansible.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -118,5 +127,6 @@
|
||||
- no ip domain-list eng.ansible.com
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- debug: msg="END cli/set_domain_search.yaml"
|
||||
- debug: msg="END cli/set_domain_search.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
---
|
||||
- debug: msg="START cli/set_domain_name.yaml"
|
||||
- debug: msg="START cli/set_domain_name.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
ios_config:
|
||||
lines: no ip domain-name
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: configure domain_name
|
||||
ios_system:
|
||||
domain_name: eng.ansible.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -21,6 +23,7 @@
|
||||
ios_system:
|
||||
domain_name: eng.ansible.com
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -32,5 +35,6 @@
|
||||
lines: no ip domain-name
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- debug: msg="END cli/set_domain_name.yaml"
|
||||
- debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
---
|
||||
- debug: msg="START cli/set_hostname.yaml"
|
||||
- debug: msg="START cli/set_hostname.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
ios_config:
|
||||
lines: hostname switch
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: configure hostname
|
||||
ios_system:
|
||||
hostname: foo
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -21,6 +23,7 @@
|
||||
ios_system:
|
||||
hostname: foo
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -32,5 +35,6 @@
|
||||
lines: "hostname {{ inventory_hostname }}"
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- debug: msg="END cli/set_hostname.yaml"
|
||||
- debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START cli/set_lookup_source.yaml"
|
||||
- debug: msg="START cli/set_lookup_source.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
ios_config:
|
||||
@@ -8,11 +8,13 @@
|
||||
- vrf definition ansible
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: configure lookup_source
|
||||
ios_system:
|
||||
lookup_source: Loopback888
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -24,6 +26,7 @@
|
||||
ios_system:
|
||||
lookup_source: Loopback888
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -34,6 +37,7 @@
|
||||
ios_system:
|
||||
lookup_enabled: False
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -45,6 +49,7 @@
|
||||
ios_system:
|
||||
lookup_enabled: True
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -59,6 +64,7 @@
|
||||
# vrf: ansible
|
||||
# authorize: yes
|
||||
# provider: "{{ cli }}"
|
||||
# become: yes
|
||||
# register: result
|
||||
#
|
||||
#- assert:
|
||||
@@ -75,6 +81,7 @@
|
||||
# vrf: ansible
|
||||
# authorize: yes
|
||||
# provider: "{{ cli }}"
|
||||
# become: yes
|
||||
# register: result
|
||||
#
|
||||
#- assert:
|
||||
@@ -88,7 +95,8 @@
|
||||
- no vrf definition ansible
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
ignore_errors: yes
|
||||
# FIXME: Not sure why this is failing with msg": "no vrf definition ansible\r\n% IPv4 and IPv6 addresses from all interfaces in VRF ansible have been removed\r\nfoo(config)#", rc:1
|
||||
|
||||
- debug: msg="END cli/set_lookup_source.yaml"
|
||||
- debug: msg="END cli/set_lookup_source.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START cli/set_name_servers.yaml"
|
||||
- debug: msg="START cli/set_name_servers.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
ios_config:
|
||||
@@ -7,6 +7,7 @@
|
||||
- no ip name-server
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: configure name_servers
|
||||
ios_system:
|
||||
@@ -15,6 +16,7 @@
|
||||
- 2.2.2.2
|
||||
- 3.3.3.3
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -32,6 +34,7 @@
|
||||
- 2.2.2.2
|
||||
- 3.3.3.3
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -73,6 +76,7 @@
|
||||
- 1.1.1.1
|
||||
- 2.2.2.2
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -87,5 +91,6 @@
|
||||
- no ip name-server
|
||||
match: none
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- debug: msg="END cli/set_name_servers.yaml"
|
||||
- debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
Reference in New Issue
Block a user