Remove provider from ios integration test (#31037)

*  Remove provider from each task as it is not required.
*  Add `authorize: yes` whereever required
This commit is contained in:
Ganesh Nalawade 2017-09-28 15:23:52 +05:30 committed by GitHub
commit 65ab37cbd3
37 changed files with 63 additions and 132 deletions

View file

@ -8,14 +8,12 @@
- no ip domain-list redhat.com
match: none
authorize: yes
provider: "{{ cli }}"
- name: configure domain_search
ios_system:
domain_search:
- ansible.com
- redhat.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -30,7 +28,6 @@
domain_search:
- ansible.com
- redhat.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -42,7 +39,6 @@
ios_system:
domain_search:
- ansible.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -55,7 +51,6 @@
ios_system:
domain_search:
- ansible.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -68,7 +63,6 @@
domain_search:
- ansible.com
- redhat.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -82,7 +76,6 @@
domain_search:
- ansible.com
- redhat.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -95,7 +88,6 @@
domain_search:
- ansible.com
- eng.ansible.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -111,7 +103,6 @@
domain_search:
- ansible.com
- eng.ansible.com
provider: "{{ cli }}"
authorize: yes
register: result
@ -127,6 +118,5 @@
- no ip domain-list eng.ansible.com
match: none
authorize: yes
provider: "{{ cli }}"
- debug: msg="END cli/set_domain_search.yaml"

View file

@ -6,13 +6,11 @@
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:
@ -23,7 +21,6 @@
ios_system:
domain_name: eng.ansible.com
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
@ -35,6 +32,5 @@
lines: no ip domain-name
match: none
authorize: yes
provider: "{{ cli }}"
- debug: msg="END cli/set_domain_name.yaml"

View file

@ -6,13 +6,11 @@
lines: hostname switch
match: none
authorize: yes
provider: "{{ cli }}"
- name: configure hostname
ios_system:
hostname: foo
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
@ -23,7 +21,6 @@
ios_system:
hostname: foo
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
@ -35,6 +32,5 @@
lines: "hostname {{ inventory_hostname }}"
match: none
authorize: yes
provider: "{{ cli }}"
- debug: msg="END cli/set_hostname.yaml"

View file

@ -8,12 +8,10 @@
- vrf definition ansible
match: none
authorize: yes
provider: "{{ cli }}"
- name: configure lookup_source
ios_system:
lookup_source: Loopback10
provider: "{{ cli }}"
authorize: yes
register: result
@ -25,7 +23,6 @@
- name: verify lookup_source
ios_system:
lookup_source: Loopback10
provider: "{{ cli }}"
authorize: yes
register: result
@ -36,7 +33,6 @@
- name: Disable lookup_source
ios_system:
lookup_enabled: False
provider: "{{ cli }}"
authorize: yes
register: result
@ -48,7 +44,6 @@
- name: Disable lookup_source
ios_system:
lookup_enabled: True
provider: "{{ cli }}"
authorize: yes
register: result
@ -93,7 +88,6 @@
- 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

View file

@ -7,7 +7,6 @@
- no ip name-server
match: none
authorize: yes
provider: "{{ cli }}"
- name: configure name_servers
ios_system:
@ -16,7 +15,6 @@
- 2.2.2.2
- 3.3.3.3
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
@ -34,7 +32,6 @@
- 2.2.2.2
- 3.3.3.3
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
@ -76,7 +73,6 @@
- 1.1.1.1
- 2.2.2.2
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
@ -91,6 +87,5 @@
- no ip domain lookup source-interface
match: none
authorize: yes
provider: "{{ cli }}"
- debug: msg="END cli/set_name_servers.yaml"