mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
ios test changes (#35510)
* Fix over-byte * Update ios tests to call `provider` To continue to support testing `connection: local` * Fix command dict handling in ios_user * Clean up unit tests, too
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
- no ip domain-list ansible.com
|
||||
- no ip domain-list redhat.com
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: configure domain_search using platform agnostic module
|
||||
net_system:
|
||||
domain_search:
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -32,6 +32,6 @@
|
||||
- no ip domain-list ansible.com
|
||||
- no ip domain-list redhat.com
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END ios cli/net_system.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
- no ip domain-list ansible.com
|
||||
- no ip domain-list redhat.com
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: configure domain_search
|
||||
ios_system:
|
||||
domain_search:
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -28,7 +28,7 @@
|
||||
domain_search:
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -39,7 +39,7 @@
|
||||
ios_system:
|
||||
domain_search:
|
||||
- ansible.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -51,7 +51,7 @@
|
||||
ios_system:
|
||||
domain_search:
|
||||
- ansible.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -63,7 +63,7 @@
|
||||
domain_search:
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -76,7 +76,7 @@
|
||||
domain_search:
|
||||
- ansible.com
|
||||
- redhat.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -88,7 +88,7 @@
|
||||
domain_search:
|
||||
- ansible.com
|
||||
- eng.ansible.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -103,7 +103,7 @@
|
||||
domain_search:
|
||||
- ansible.com
|
||||
- eng.ansible.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -117,6 +117,6 @@
|
||||
- no ip domain-list redhat.com
|
||||
- no ip domain-list eng.ansible.com
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/set_domain_search.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
ios_config:
|
||||
lines: no ip domain-name
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: configure domain_name
|
||||
ios_system:
|
||||
domain_name: eng.ansible.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -20,7 +20,7 @@
|
||||
- name: verify domain_name
|
||||
ios_system:
|
||||
domain_name: eng.ansible.com
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -31,6 +31,6 @@
|
||||
ios_config:
|
||||
lines: no ip domain-name
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
ios_config:
|
||||
lines: hostname switch
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: configure hostname
|
||||
ios_system:
|
||||
hostname: foo
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -20,7 +20,7 @@
|
||||
- name: verify hostname
|
||||
ios_system:
|
||||
hostname: foo
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -31,6 +31,6 @@
|
||||
ios_config:
|
||||
lines: "hostname {{ inventory_hostname }}"
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
- no ip domain lookup source-interface Loopback888
|
||||
- vrf definition ansible
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: configure lookup_source
|
||||
ios_system:
|
||||
lookup_source: Loopback888
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -23,7 +23,7 @@
|
||||
- name: verify lookup_source
|
||||
ios_system:
|
||||
lookup_source: Loopback888
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -33,7 +33,7 @@
|
||||
- name: Disable lookup_source
|
||||
ios_system:
|
||||
lookup_enabled: False
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -44,7 +44,7 @@
|
||||
- name: Disable lookup_source
|
||||
ios_system:
|
||||
lookup_enabled: True
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -57,7 +57,7 @@
|
||||
# lookup_source:
|
||||
# - interface: Loopback10
|
||||
# vrf: ansible
|
||||
# authorize: yes
|
||||
# provider: "{{ cli }}"
|
||||
# provider: "{{ cli }}"
|
||||
# register: result
|
||||
#
|
||||
@@ -73,7 +73,7 @@
|
||||
# lookup_source:
|
||||
# - interface: Management1
|
||||
# vrf: ansible
|
||||
# authorize: yes
|
||||
# provider: "{{ cli }}"
|
||||
# provider: "{{ cli }}"
|
||||
# register: result
|
||||
#
|
||||
@@ -87,7 +87,7 @@
|
||||
- no ip domain lookup source-interface Loopback888
|
||||
- no vrf definition ansible
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
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
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
lines:
|
||||
- no ip name-server
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: configure name_servers
|
||||
ios_system:
|
||||
@@ -14,7 +14,7 @@
|
||||
- 1.1.1.1
|
||||
- 2.2.2.2
|
||||
- 3.3.3.3
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -31,7 +31,7 @@
|
||||
- 1.1.1.1
|
||||
- 2.2.2.2
|
||||
- 3.3.3.3
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -72,7 +72,7 @@
|
||||
name_servers:
|
||||
- 1.1.1.1
|
||||
- 2.2.2.2
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -86,6 +86,6 @@
|
||||
lines:
|
||||
- no ip name-server
|
||||
match: none
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
Reference in New Issue
Block a user