summaryrefslogtreecommitdiff
path: root/test/integration/targets/ios_config
diff options
context:
space:
mode:
authorRicardo Carrillo Cruz <ricardo.carrillo.cruz@gmail.com>2017-09-14 00:00:58 +0200
committerGitHub <noreply@github.com>2017-09-14 00:00:58 +0200
commitdbe9df1289ede19059c693c9ecbd310ab548323c (patch)
treeec344d641fcd68361648e5bdfe7154d25cac2ec7 /test/integration/targets/ios_config
parent2186b04934dd327f9a300d0bda009da949c8d562 (diff)
downloadansible-dbe9df1289ede19059c693c9ecbd310ab548323c.tar.gz
Add CLI provider with authorize yes to ios tests (#30312)
We are getting failures to do lack of elevated privileges.
Diffstat (limited to 'test/integration/targets/ios_config')
-rw-r--r--test/integration/targets/ios_config/tests/cli/backup.yaml2
-rw-r--r--test/integration/targets/ios_config/tests/cli/defaults.yaml3
-rw-r--r--test/integration/targets/ios_config/tests/cli/save.yaml3
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_basic.yaml3
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_match_none.yaml3
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel.yaml4
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_block.yaml4
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml4
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml4
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel.yaml4
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_after.yaml4
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_before.yaml4
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml4
13 files changed, 46 insertions, 0 deletions
diff --git a/test/integration/targets/ios_config/tests/cli/backup.yaml b/test/integration/targets/ios_config/tests/cli/backup.yaml
index 6549e9b319..10b3c6ca6d 100644
--- a/test/integration/targets/ios_config/tests/cli/backup.yaml
+++ b/test/integration/targets/ios_config/tests/cli/backup.yaml
@@ -9,6 +9,7 @@
parents:
- interface Loopback999
match: none
+ provider: "{{ cli }}"
- name: collect any backup files
find:
@@ -27,6 +28,7 @@
ios_config:
src: basic/config.j2
backup: yes
+ provider: "{{ cli }}"
register: result
- assert:
diff --git a/test/integration/targets/ios_config/tests/cli/defaults.yaml b/test/integration/targets/ios_config/tests/cli/defaults.yaml
index aec73f9fe6..d5b87b5a76 100644
--- a/test/integration/targets/ios_config/tests/cli/defaults.yaml
+++ b/test/integration/targets/ios_config/tests/cli/defaults.yaml
@@ -9,11 +9,13 @@
parents:
- interface Loopback999
match: none
+ provider: "{{ cli }}"
- name: configure device with defaults included
ios_config:
src: defaults/config.j2
defaults: yes
+ provider: "{{ cli }}"
register: result
- debug: var=result
@@ -28,6 +30,7 @@
ios_config:
src: defaults/config.j2
defaults: yes
+ provider: "{{ cli }}"
register: result
- debug: var=result
diff --git a/test/integration/targets/ios_config/tests/cli/save.yaml b/test/integration/targets/ios_config/tests/cli/save.yaml
index cad199ca75..a886210e61 100644
--- a/test/integration/targets/ios_config/tests/cli/save.yaml
+++ b/test/integration/targets/ios_config/tests/cli/save.yaml
@@ -9,11 +9,13 @@
parents:
- interface Loopback999
match: none
+ provider: "{{ cli }}"
- name: save config
ios_config:
save: true
+ provider: "{{ cli }}"
register: result
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
ignore_errors: true
@@ -27,6 +29,7 @@
- name: save should always run
ios_config:
save: true
+ provider: "{{ cli }}"
register: result
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
ignore_errors: true
diff --git a/test/integration/targets/ios_config/tests/cli/src_basic.yaml b/test/integration/targets/ios_config/tests/cli/src_basic.yaml
index 84b2a3b533..7a2173ea31 100644
--- a/test/integration/targets/ios_config/tests/cli/src_basic.yaml
+++ b/test/integration/targets/ios_config/tests/cli/src_basic.yaml
@@ -9,10 +9,12 @@
parents:
- interface Loopback999
match: none
+ provider: "{{ cli }}"
- name: configure device with config
ios_config:
src: basic/config.j2
+ provider: "{{ cli }}"
register: result
- name: debug, remove me
@@ -28,6 +30,7 @@
- name: check device with config
ios_config:
src: basic/config.j2
+ provider: "{{ cli }}"
register: result
- assert:
diff --git a/test/integration/targets/ios_config/tests/cli/src_match_none.yaml b/test/integration/targets/ios_config/tests/cli/src_match_none.yaml
index 38e1686bfd..f86ba1da14 100644
--- a/test/integration/targets/ios_config/tests/cli/src_match_none.yaml
+++ b/test/integration/targets/ios_config/tests/cli/src_match_none.yaml
@@ -9,11 +9,13 @@
parents:
- interface Loopback999
match: none
+ provider: "{{ cli }}"
- name: configure device with config
ios_config:
src: basic/config.j2
match: none
+ provider: "{{ cli }}"
register: result
- assert:
@@ -26,6 +28,7 @@
- name: check device with config
ios_config:
src: basic/config.j2
+ provider: "{{ cli }}"
register: result
- assert:
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel.yaml b/test/integration/targets/ios_config/tests/cli/sublevel.yaml
index 662564966b..3e3ddc692d 100644
--- a/test/integration/targets/ios_config/tests/cli/sublevel.yaml
+++ b/test/integration/targets/ios_config/tests/cli/sublevel.yaml
@@ -7,11 +7,13 @@
- 'no ip access-list extended test'
- 'no ip access-list standard test'
match: none
+ provider: "{{ cli }}"
- name: configure sub level command
ios_config:
lines: ['permit ip any any log']
parents: ['ip access-list extended test']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -24,6 +26,7 @@
ios_config:
lines: ['permit ip any any log']
parents: ['ip access-list extended test']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -35,5 +38,6 @@
lines:
- 'no ip access-list extended test'
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/sublevel.yaml"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml
index 6753dba66b..142ed6ee86 100644
--- a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml
+++ b/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml
@@ -10,6 +10,7 @@
parents: ['ip access-list extended test']
before: ['no ip access-list extended test']
after: ['exit']
+ provider: "{{ cli }}"
match: none
- name: configure sub level command using block resplace
@@ -22,6 +23,7 @@
parents: ['ip access-list extended test']
replace: block
after: ['exit']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -43,6 +45,7 @@
parents: ['ip access-list extended test']
replace: block
after: ['exit']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -54,5 +57,6 @@
lines:
- no ip access-list extended test
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/sublevel_block.yaml"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
index baec330300..0ef170ffcb 100644
--- a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
+++ b/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
@@ -13,6 +13,7 @@
before: no ip access-list extended test
after: exit
match: none
+ provider: "{{ cli }}"
- name: configure sub level command using exact match
ios_config:
@@ -25,6 +26,7 @@
before: no ip access-list extended test
after: exit
match: exact
+ provider: "{{ cli }}"
register: result
- assert:
@@ -46,6 +48,7 @@
- permit ip host 4.4.4.4 any log
parents: ip access-list extended test
match: exact
+ provider: "{{ cli }}"
register: result
- assert:
@@ -57,5 +60,6 @@
lines:
- no ip access-list extended test
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/sublevel_exact.yaml"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
index f227ffcc9f..f626b94f2d 100644
--- a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
+++ b/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
@@ -12,6 +12,7 @@
parents: ip access-list extended test
before: no ip access-list extended test
match: none
+ provider: "{{ cli }}"
- name: configure sub level command using strict match
ios_config:
@@ -22,6 +23,7 @@
- permit ip host 4.4.4.4 any log
parents: ip access-list extended test
match: strict
+ provider: "{{ cli }}"
register: result
- assert:
@@ -37,6 +39,7 @@
parents: ip access-list extended test
after: exit
match: strict
+ provider: "{{ cli }}"
register: result
- assert:
@@ -53,5 +56,6 @@
ios_config:
lines: no ip access-list extended test
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/sublevel_strict.yaml"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel.yaml b/test/integration/targets/ios_config/tests/cli/toplevel.yaml
index 9f62d4388e..831d04c351 100644
--- a/test/integration/targets/ios_config/tests/cli/toplevel.yaml
+++ b/test/integration/targets/ios_config/tests/cli/toplevel.yaml
@@ -5,10 +5,12 @@
ios_config:
lines: ['hostname {{ shorter_hostname }}']
match: none
+ provider: "{{ cli }}"
- name: configure top level command
ios_config:
lines: ['hostname foo']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -19,6 +21,7 @@
- name: configure top level command idempotent check
ios_config:
lines: ['hostname foo']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -29,5 +32,6 @@
ios_config:
lines: ['hostname {{ shorter_hostname }}']
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/toplevel.yaml"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml
index a2333531bd..e69fd5e001 100644
--- a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml
+++ b/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml
@@ -7,11 +7,13 @@
- "snmp-server contact ansible"
- "hostname {{ shorter_hostname }}"
match: none
+ provider: "{{ cli }}"
- name: configure top level command with before
ios_config:
lines: ['hostname foo']
after: ['snmp-server contact bar']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -24,6 +26,7 @@
ios_config:
lines: ['hostname foo']
after: ['snmp-server contact foo']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -36,5 +39,6 @@
- "no snmp-server contact"
- "hostname {{ shorter_hostname }}"
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/toplevel_after.yaml"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml
index eff481be2b..1d69097bde 100644
--- a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml
+++ b/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml
@@ -7,11 +7,13 @@
- "snmp-server contact ansible"
- "hostname {{ shorter_hostname }}"
match: none
+ provider: "{{ cli }}"
- name: configure top level command with before
ios_config:
lines: ['hostname foo']
before: ['snmp-server contact bar']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -24,6 +26,7 @@
ios_config:
lines: ['hostname foo']
before: ['snmp-server contact foo']
+ provider: "{{ cli }}"
register: result
- assert:
@@ -36,5 +39,6 @@
- "no snmp-server contact"
- "hostname {{ shorter_hostname }}"
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/toplevel_before.yaml"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
index ce787bbdb4..f6cadbe969 100644
--- a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
+++ b/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
@@ -5,11 +5,13 @@
ios_config:
lines: ['hostname {{ shorter_hostname }}']
match: none
+ provider: "{{ cli }}"
- name: configure top level command
ios_config:
lines: ['hostname foo']
match: strict
+ provider: "{{ cli }}"
register: result
- assert:
@@ -21,6 +23,7 @@
ios_config:
lines: ['hostname foo']
match: strict
+ provider: "{{ cli }}"
register: result
- assert:
@@ -31,5 +34,6 @@
ios_config:
lines: ['hostname {{ shorter_hostname }}']
match: none
+ provider: "{{ cli }}"
- debug: msg="END cli/toplevel_nonidempotent.yaml"