mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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:
parent
2b0e52b15c
commit
65ab37cbd3
37 changed files with 63 additions and 132 deletions
|
@ -5,7 +5,6 @@
|
||||||
banner: login
|
banner: login
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: Set login
|
- name: Set login
|
||||||
ios_banner:
|
ios_banner:
|
||||||
|
@ -16,7 +15,6 @@
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
|
@ -36,7 +34,6 @@
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
ios_banner:
|
ios_banner:
|
||||||
banner: motd
|
banner: motd
|
||||||
state: absent
|
state: absent
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
|
|
||||||
- name: Set motd
|
- name: Set motd
|
||||||
|
@ -16,7 +15,6 @@
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
|
@ -36,7 +34,6 @@
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -7,14 +7,12 @@
|
||||||
over multiple lines
|
over multiple lines
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: remove login
|
- name: remove login
|
||||||
ios_banner:
|
ios_banner:
|
||||||
banner: login
|
banner: login
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
|
@ -30,7 +28,6 @@
|
||||||
banner: login
|
banner: login
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
commands:
|
commands:
|
||||||
- show version
|
- show version
|
||||||
- show interfaces GigabitEthernet 0/0
|
- show interfaces GigabitEthernet 0/0
|
||||||
|
authorize: yes
|
||||||
wait_for:
|
wait_for:
|
||||||
- "result[0] contains 'Description: Foo'"
|
- "result[0] contains 'Description: Foo'"
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
commands:
|
commands:
|
||||||
- show version
|
- show version
|
||||||
- show interface loopback 888
|
- show interface loopback 888
|
||||||
|
authorize: yes
|
||||||
wait_for:
|
wait_for:
|
||||||
- "result[0] contains Cisco"
|
- "result[0] contains Cisco"
|
||||||
- "result[1] contains Loopback888"
|
- "result[1] contains Loopback888"
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
- name: run invalid command
|
- name: run invalid command
|
||||||
ios_command:
|
ios_command:
|
||||||
commands: show foo
|
commands: show foo
|
||||||
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
commands:
|
commands:
|
||||||
- show version
|
- show version
|
||||||
- show foo
|
- show foo
|
||||||
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
ios_command:
|
ios_command:
|
||||||
commands:
|
commands:
|
||||||
- show version
|
- show version
|
||||||
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
commands:
|
commands:
|
||||||
- show version
|
- show version
|
||||||
- show interfaces
|
- show interfaces
|
||||||
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
ios_command:
|
ios_command:
|
||||||
commands:
|
commands:
|
||||||
- show version
|
- show version
|
||||||
|
authorize: yes
|
||||||
wait_for:
|
wait_for:
|
||||||
- "result[0] contains bad_value_string"
|
- "result[0] contains bad_value_string"
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Loopback999
|
- interface Loopback999
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: collect any backup files
|
- name: collect any backup files
|
||||||
find:
|
find:
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
backup: yes
|
backup: yes
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Loopback999
|
- interface Loopback999
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure device with defaults included
|
- name: configure device with defaults included
|
||||||
ios_config:
|
ios_config:
|
||||||
src: defaults/config.j2
|
src: defaults/config.j2
|
||||||
defaults: yes
|
defaults: yes
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug: var=result
|
- debug: var=result
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
src: defaults/config.j2
|
src: defaults/config.j2
|
||||||
defaults: yes
|
defaults: yes
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug: var=result
|
- debug: var=result
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Loopback999
|
- interface Loopback999
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
|
|
||||||
- name: save config
|
- name: save config
|
||||||
ios_config:
|
ios_config:
|
||||||
save: true
|
save: true
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
|
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
- name: save should always run
|
- name: save should always run
|
||||||
ios_config:
|
ios_config:
|
||||||
save: true
|
save: true
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
|
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Loopback999
|
- interface Loopback999
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure device with config
|
- name: configure device with config
|
||||||
ios_config:
|
ios_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: debug, remove me
|
- name: debug, remove me
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
- name: check device with config
|
- name: check device with config
|
||||||
ios_config:
|
ios_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
- name: configure with invalid src
|
- name: configure with invalid src
|
||||||
ios_config:
|
ios_config:
|
||||||
src: basic/foobar.j2
|
src: basic/foobar.j2
|
||||||
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Loopback999
|
- interface Loopback999
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure device with config
|
- name: configure device with config
|
||||||
ios_config:
|
ios_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
- name: check device with config
|
- name: check device with config
|
||||||
ios_config:
|
ios_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
- 'no ip access-list extended test'
|
- 'no ip access-list extended test'
|
||||||
- 'no ip access-list standard test'
|
- 'no ip access-list standard test'
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure sub level command
|
- name: configure sub level command
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['permit ip any any log']
|
lines: ['permit ip any any log']
|
||||||
parents: ['ip access-list extended test']
|
parents: ['ip access-list extended test']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['permit ip any any log']
|
lines: ['permit ip any any log']
|
||||||
parents: ['ip access-list extended test']
|
parents: ['ip access-list extended test']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -38,6 +38,6 @@
|
||||||
lines:
|
lines:
|
||||||
- 'no ip access-list extended test'
|
- 'no ip access-list extended test'
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/sublevel.yaml"
|
- debug: msg="END cli/sublevel.yaml"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
parents: ['ip access-list extended test']
|
parents: ['ip access-list extended test']
|
||||||
before: ['no ip access-list extended test']
|
before: ['no ip access-list extended test']
|
||||||
after: ['exit']
|
after: ['exit']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
match: none
|
match: none
|
||||||
|
|
||||||
- name: configure sub level command using block resplace
|
- name: configure sub level command using block resplace
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
parents: ['ip access-list extended test']
|
parents: ['ip access-list extended test']
|
||||||
replace: block
|
replace: block
|
||||||
after: ['exit']
|
after: ['exit']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
parents: ['ip access-list extended test']
|
parents: ['ip access-list extended test']
|
||||||
replace: block
|
replace: block
|
||||||
after: ['exit']
|
after: ['exit']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -57,6 +57,6 @@
|
||||||
lines:
|
lines:
|
||||||
- no ip access-list extended test
|
- no ip access-list extended test
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/sublevel_block.yaml"
|
- debug: msg="END cli/sublevel_block.yaml"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
before: no ip access-list extended test
|
before: no ip access-list extended test
|
||||||
after: exit
|
after: exit
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure sub level command using exact match
|
- name: configure sub level command using exact match
|
||||||
ios_config:
|
ios_config:
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
before: no ip access-list extended test
|
before: no ip access-list extended test
|
||||||
after: exit
|
after: exit
|
||||||
match: exact
|
match: exact
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
- permit ip host 4.4.4.4 any log
|
- permit ip host 4.4.4.4 any log
|
||||||
parents: ip access-list extended test
|
parents: ip access-list extended test
|
||||||
match: exact
|
match: exact
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -60,6 +60,6 @@
|
||||||
lines:
|
lines:
|
||||||
- no ip access-list extended test
|
- no ip access-list extended test
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/sublevel_exact.yaml"
|
- debug: msg="END cli/sublevel_exact.yaml"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
parents: ip access-list extended test
|
parents: ip access-list extended test
|
||||||
before: no ip access-list extended test
|
before: no ip access-list extended test
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure sub level command using strict match
|
- name: configure sub level command using strict match
|
||||||
ios_config:
|
ios_config:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
- permit ip host 4.4.4.4 any log
|
- permit ip host 4.4.4.4 any log
|
||||||
parents: ip access-list extended test
|
parents: ip access-list extended test
|
||||||
match: strict
|
match: strict
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
parents: ip access-list extended test
|
parents: ip access-list extended test
|
||||||
after: exit
|
after: exit
|
||||||
match: strict
|
match: strict
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -56,6 +56,6 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: no ip access-list extended test
|
lines: no ip access-list extended test
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/sublevel_strict.yaml"
|
- debug: msg="END cli/sublevel_strict.yaml"
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname {{ shorter_hostname }}']
|
lines: ['hostname {{ shorter_hostname }}']
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure top level command
|
- name: configure top level command
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
- name: configure top level command idempotent check
|
- name: configure top level command idempotent check
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -32,6 +32,6 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname {{ shorter_hostname }}']
|
lines: ['hostname {{ shorter_hostname }}']
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/toplevel.yaml"
|
- debug: msg="END cli/toplevel.yaml"
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
- "snmp-server contact ansible"
|
- "snmp-server contact ansible"
|
||||||
- "hostname {{ shorter_hostname }}"
|
- "hostname {{ shorter_hostname }}"
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure top level command with before
|
- name: configure top level command with before
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
after: ['snmp-server contact bar']
|
after: ['snmp-server contact bar']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
after: ['snmp-server contact foo']
|
after: ['snmp-server contact foo']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -39,6 +39,6 @@
|
||||||
- "no snmp-server contact"
|
- "no snmp-server contact"
|
||||||
- "hostname {{ shorter_hostname }}"
|
- "hostname {{ shorter_hostname }}"
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/toplevel_after.yaml"
|
- debug: msg="END cli/toplevel_after.yaml"
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
- "snmp-server contact ansible"
|
- "snmp-server contact ansible"
|
||||||
- "hostname {{ shorter_hostname }}"
|
- "hostname {{ shorter_hostname }}"
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure top level command with before
|
- name: configure top level command with before
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
before: ['snmp-server contact bar']
|
before: ['snmp-server contact bar']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
before: ['snmp-server contact foo']
|
before: ['snmp-server contact foo']
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -39,6 +39,6 @@
|
||||||
- "no snmp-server contact"
|
- "no snmp-server contact"
|
||||||
- "hostname {{ shorter_hostname }}"
|
- "hostname {{ shorter_hostname }}"
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/toplevel_before.yaml"
|
- debug: msg="END cli/toplevel_before.yaml"
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname {{ shorter_hostname }}']
|
lines: ['hostname {{ shorter_hostname }}']
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- name: configure top level command
|
- name: configure top level command
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
match: strict
|
match: strict
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname foo']
|
lines: ['hostname foo']
|
||||||
match: strict
|
match: strict
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,6 +34,6 @@
|
||||||
ios_config:
|
ios_config:
|
||||||
lines: ['hostname {{ shorter_hostname }}']
|
lines: ['hostname {{ shorter_hostname }}']
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
|
|
||||||
- debug: msg="END cli/toplevel_nonidempotent.yaml"
|
- debug: msg="END cli/toplevel_nonidempotent.yaml"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
ios_facts:
|
ios_facts:
|
||||||
gather_subset:
|
gather_subset:
|
||||||
- all
|
- all
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
- name: test getting default facts
|
- name: test getting default facts
|
||||||
ios_facts:
|
ios_facts:
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
ios_facts:
|
ios_facts:
|
||||||
gather_subset:
|
gather_subset:
|
||||||
- "foobar"
|
- "foobar"
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
gather_subset:
|
gather_subset:
|
||||||
- "!hardware"
|
- "!hardware"
|
||||||
- "hardware"
|
- "hardware"
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
ios_facts:
|
ios_facts:
|
||||||
gather_subset:
|
gather_subset:
|
||||||
- "!hardware"
|
- "!hardware"
|
||||||
provider: "{{ cli }}"
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
mtu: 256
|
mtu: 256
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Confgure interface
|
- name: Confgure interface
|
||||||
|
@ -19,7 +18,6 @@
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,7 +32,6 @@
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -49,7 +46,6 @@
|
||||||
mtu: 512
|
mtu: 512
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -69,7 +65,6 @@
|
||||||
mtu: 256
|
mtu: 256
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -86,7 +81,6 @@
|
||||||
name: GigabitEthernet0/2
|
name: GigabitEthernet0/2
|
||||||
enabled: False
|
enabled: False
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -100,7 +94,6 @@
|
||||||
name: GigabitEthernet0/2
|
name: GigabitEthernet0/2
|
||||||
enabled: True
|
enabled: True
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -118,7 +111,6 @@
|
||||||
mtu: 516
|
mtu: 516
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Add interface aggregate
|
- name: Add interface aggregate
|
||||||
|
@ -130,7 +122,6 @@
|
||||||
speed: 100
|
speed: 100
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -156,7 +147,6 @@
|
||||||
speed: 100
|
speed: 100
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -171,7 +161,6 @@
|
||||||
enabled: False
|
enabled: False
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -190,7 +179,6 @@
|
||||||
enabled: True
|
enabled: True
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -216,7 +204,6 @@
|
||||||
- name: Loopback10
|
- name: Loopback10
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -232,7 +219,6 @@
|
||||||
- name: Loopback10
|
- name: Loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -248,7 +234,6 @@
|
||||||
- name: Loopback10
|
- name: Loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: Remove console
|
- name: Remove console
|
||||||
ios_logging:
|
ios_logging:
|
||||||
|
@ -14,7 +13,6 @@
|
||||||
level: warnings
|
level: warnings
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: Remove buffer
|
- name: Remove buffer
|
||||||
ios_logging:
|
ios_logging:
|
||||||
|
@ -22,7 +20,6 @@
|
||||||
size: 8000
|
size: 8000
|
||||||
authorize: yes
|
authorize: yes
|
||||||
state: absent
|
state: absent
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
# start tests
|
# start tests
|
||||||
- name: Set up host logging
|
- name: Set up host logging
|
||||||
|
@ -31,7 +28,6 @@
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -46,7 +42,6 @@
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -59,7 +54,6 @@
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -73,7 +67,6 @@
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -86,7 +79,6 @@
|
||||||
level: warnings
|
level: warnings
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -99,7 +91,6 @@
|
||||||
dest: buffered
|
dest: buffered
|
||||||
size: 8000
|
size: 8000
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -113,7 +104,6 @@
|
||||||
- { dest: console, level: notifications }
|
- { dest: console, level: notifications }
|
||||||
- { dest: buffered, size: 9000 }
|
- { dest: buffered, size: 9000 }
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -129,7 +119,6 @@
|
||||||
- { dest: buffered, size: 9000 }
|
- { dest: buffered, size: 9000 }
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -4,24 +4,28 @@
|
||||||
- name: expected successful ping
|
- name: expected successful ping
|
||||||
ios_ping: &valid_ip
|
ios_ping: &valid_ip
|
||||||
dest: '8.8.8.8'
|
dest: '8.8.8.8'
|
||||||
|
authorize: yes
|
||||||
register: esp
|
register: esp
|
||||||
|
|
||||||
- name: unexpected unsuccessful ping
|
- name: unexpected unsuccessful ping
|
||||||
ios_ping: &invalid_ip
|
ios_ping: &invalid_ip
|
||||||
dest: '10.255.255.250'
|
dest: '10.255.255.250'
|
||||||
timeout: 45
|
timeout: 45
|
||||||
|
authorize: yes
|
||||||
register: uup
|
register: uup
|
||||||
|
|
||||||
- name: unexpected successful ping
|
- name: unexpected successful ping
|
||||||
ios_ping:
|
ios_ping:
|
||||||
<<: *valid_ip
|
<<: *valid_ip
|
||||||
state: 'absent'
|
state: 'absent'
|
||||||
|
authorize: yes
|
||||||
register: usp
|
register: usp
|
||||||
|
|
||||||
- name: expected unsuccessful ping
|
- name: expected unsuccessful ping
|
||||||
ios_ping:
|
ios_ping:
|
||||||
<<: *invalid_ip
|
<<: *invalid_ip
|
||||||
state: 'absent'
|
state: 'absent'
|
||||||
|
authorize: yes
|
||||||
register: eup
|
register: eup
|
||||||
|
|
||||||
- name: assert
|
- name: assert
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
next_hop: 10.0.0.8
|
next_hop: 10.0.0.8
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -21,7 +20,6 @@
|
||||||
next_hop: 10.0.0.8
|
next_hop: 10.0.0.8
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -36,7 +34,6 @@
|
||||||
admin_distance: 2
|
admin_distance: 2
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -52,7 +49,6 @@
|
||||||
admin_distance: 2
|
admin_distance: 2
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -67,7 +63,6 @@
|
||||||
admin_distance: 2
|
admin_distance: 2
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -83,7 +78,6 @@
|
||||||
admin_distance: 2
|
admin_distance: 2
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -97,7 +91,6 @@
|
||||||
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
|
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -113,7 +106,6 @@
|
||||||
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
|
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -129,7 +121,6 @@
|
||||||
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
|
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -8,14 +8,12 @@
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: configure domain_search
|
- name: configure domain_search
|
||||||
ios_system:
|
ios_system:
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -30,7 +28,6 @@
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -42,7 +39,6 @@
|
||||||
ios_system:
|
ios_system:
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -55,7 +51,6 @@
|
||||||
ios_system:
|
ios_system:
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -68,7 +63,6 @@
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -82,7 +76,6 @@
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -95,7 +88,6 @@
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- eng.ansible.com
|
- eng.ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -111,7 +103,6 @@
|
||||||
domain_search:
|
domain_search:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- eng.ansible.com
|
- eng.ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -127,6 +118,5 @@
|
||||||
- no ip domain-list eng.ansible.com
|
- no ip domain-list eng.ansible.com
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- debug: msg="END cli/set_domain_search.yaml"
|
- debug: msg="END cli/set_domain_search.yaml"
|
||||||
|
|
|
@ -6,13 +6,11 @@
|
||||||
lines: no ip domain-name
|
lines: no ip domain-name
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: configure domain_name
|
- name: configure domain_name
|
||||||
ios_system:
|
ios_system:
|
||||||
domain_name: eng.ansible.com
|
domain_name: eng.ansible.com
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -23,7 +21,6 @@
|
||||||
ios_system:
|
ios_system:
|
||||||
domain_name: eng.ansible.com
|
domain_name: eng.ansible.com
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -35,6 +32,5 @@
|
||||||
lines: no ip domain-name
|
lines: no ip domain-name
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- debug: msg="END cli/set_domain_name.yaml"
|
- debug: msg="END cli/set_domain_name.yaml"
|
||||||
|
|
|
@ -6,13 +6,11 @@
|
||||||
lines: hostname switch
|
lines: hostname switch
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: configure hostname
|
- name: configure hostname
|
||||||
ios_system:
|
ios_system:
|
||||||
hostname: foo
|
hostname: foo
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -23,7 +21,6 @@
|
||||||
ios_system:
|
ios_system:
|
||||||
hostname: foo
|
hostname: foo
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -35,6 +32,5 @@
|
||||||
lines: "hostname {{ inventory_hostname }}"
|
lines: "hostname {{ inventory_hostname }}"
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- debug: msg="END cli/set_hostname.yaml"
|
- debug: msg="END cli/set_hostname.yaml"
|
||||||
|
|
|
@ -8,12 +8,10 @@
|
||||||
- vrf definition ansible
|
- vrf definition ansible
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: configure lookup_source
|
- name: configure lookup_source
|
||||||
ios_system:
|
ios_system:
|
||||||
lookup_source: Loopback10
|
lookup_source: Loopback10
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -25,7 +23,6 @@
|
||||||
- name: verify lookup_source
|
- name: verify lookup_source
|
||||||
ios_system:
|
ios_system:
|
||||||
lookup_source: Loopback10
|
lookup_source: Loopback10
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -36,7 +33,6 @@
|
||||||
- name: Disable lookup_source
|
- name: Disable lookup_source
|
||||||
ios_system:
|
ios_system:
|
||||||
lookup_enabled: False
|
lookup_enabled: False
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -48,7 +44,6 @@
|
||||||
- name: Disable lookup_source
|
- name: Disable lookup_source
|
||||||
ios_system:
|
ios_system:
|
||||||
lookup_enabled: True
|
lookup_enabled: True
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -93,7 +88,6 @@
|
||||||
- no vrf definition ansible
|
- no vrf definition ansible
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
ignore_errors: 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
|
# 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
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
- no ip name-server
|
- no ip name-server
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- name: configure name_servers
|
- name: configure name_servers
|
||||||
ios_system:
|
ios_system:
|
||||||
|
@ -16,7 +15,6 @@
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
- 3.3.3.3
|
- 3.3.3.3
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,7 +32,6 @@
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
- 3.3.3.3
|
- 3.3.3.3
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -76,7 +73,6 @@
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -91,6 +87,5 @@
|
||||||
- no ip domain lookup source-interface
|
- no ip domain lookup source-interface
|
||||||
match: none
|
match: none
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
||||||
- debug: msg="END cli/set_name_servers.yaml"
|
- debug: msg="END cli/set_name_servers.yaml"
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
role: network-operator
|
role: network-operator
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
configured_password: pass123
|
configured_password: pass123
|
||||||
|
|
||||||
- name: test login
|
- name: test login
|
||||||
|
@ -34,6 +33,5 @@
|
||||||
ios_user:
|
ios_user:
|
||||||
name: auth_user
|
name: auth_user
|
||||||
state: absent
|
state: absent
|
||||||
provider: "{{ cli }}"
|
|
||||||
authorize: yes
|
authorize: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
- name: ansibletest3
|
- name: ansibletest3
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Create user (SetUp)
|
- name: Create user (SetUp)
|
||||||
|
@ -17,7 +16,6 @@
|
||||||
role: network-operator
|
role: network-operator
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -33,7 +31,6 @@
|
||||||
authorize: yes
|
authorize: yes
|
||||||
state: present
|
state: present
|
||||||
view: network-admin
|
view: network-admin
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -48,7 +45,6 @@
|
||||||
role: network-operator
|
role: network-operator
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -64,7 +60,6 @@
|
||||||
authorize: yes
|
authorize: yes
|
||||||
state: present
|
state: present
|
||||||
view: network-admin
|
view: network-admin
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -80,7 +75,6 @@
|
||||||
- name: ansibletest3
|
- name: ansibletest3
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
Loading…
Reference in a new issue