summaryrefslogtreecommitdiff
path: root/test/integration/targets/ios_config
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/ios_config')
-rw-r--r--test/integration/targets/ios_config/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_config/meta/main.yml2
-rw-r--r--test/integration/targets/ios_config/tasks/cli.yaml17
-rw-r--r--test/integration/targets/ios_config/tasks/cli_config.yaml17
-rw-r--r--test/integration/targets/ios_config/tasks/main.yaml3
-rw-r--r--test/integration/targets/ios_config/templates/basic/base_running_config9
-rw-r--r--test/integration/targets/ios_config/templates/basic/config.j24
-rw-r--r--test/integration/targets/ios_config/templates/basic/configblock.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/configexact1.j26
-rw-r--r--test/integration/targets/ios_config/templates/basic/configexact2.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/configstrict1.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/intended_running_config9
-rw-r--r--test/integration/targets/ios_config/templates/basic/macro.j28
-rw-r--r--test/integration/targets/ios_config/templates/basic/setupblock.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/setupexact.j27
-rw-r--r--test/integration/targets/ios_config/templates/basic/setupstrict.j27
-rw-r--r--test/integration/targets/ios_config/templates/defaults/config.j24
-rw-r--r--test/integration/targets/ios_config/tests/cli/backup.yaml125
-rw-r--r--test/integration/targets/ios_config/tests/cli/defaults.yaml57
-rw-r--r--test/integration/targets/ios_config/tests/cli/diff.yaml33
-rw-r--r--test/integration/targets/ios_config/tests/cli/macro.yaml66
-rw-r--r--test/integration/targets/ios_config/tests/cli/save.yaml49
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_basic.yaml70
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_invalid.yaml18
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_match_none.yaml38
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel.yaml39
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_block.yaml58
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml61
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml57
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml66
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel.yaml33
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_after.yaml40
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_before.yaml40
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml35
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml113
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml45
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml32
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml33
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml24
39 files changed, 0 insertions, 1248 deletions
diff --git a/test/integration/targets/ios_config/defaults/main.yaml b/test/integration/targets/ios_config/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_config/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_config/meta/main.yml b/test/integration/targets/ios_config/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_config/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_config/tasks/cli.yaml b/test/integration/targets/ios_config/tasks/cli.yaml
deleted file mode 100644
index 82d196e4ed..0000000000
--- a/test/integration/targets/ios_config/tasks/cli.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_config/tasks/cli_config.yaml b/test/integration/targets/ios_config/tasks/cli_config.yaml
deleted file mode 100644
index a3c82d6384..0000000000
--- a/test/integration/targets/ios_config/tasks/cli_config.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all cli_config test cases
- find:
- paths: "{{ role_path }}/tests/cli_config"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_config/tasks/main.yaml b/test/integration/targets/ios_config/tasks/main.yaml
deleted file mode 100644
index 5e327e8d52..0000000000
--- a/test/integration/targets/ios_config/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: cli_config.yaml, tags: ['cli_config'] }
diff --git a/test/integration/targets/ios_config/templates/basic/base_running_config b/test/integration/targets/ios_config/templates/basic/base_running_config
deleted file mode 100644
index 37254dc963..0000000000
--- a/test/integration/targets/ios_config/templates/basic/base_running_config
+++ /dev/null
@@ -1,9 +0,0 @@
-version 15.6
-service timestamps debug datetime msec
-service timestamps log datetime msec
-no service password-encryption
-!
-hostname an-ios-01.ansible.com
-!
-boot-start-marker
-boot-end-marker
diff --git a/test/integration/targets/ios_config/templates/basic/config.j2 b/test/integration/targets/ios_config/templates/basic/config.j2
deleted file mode 100644
index 06f9848883..0000000000
--- a/test/integration/targets/ios_config/templates/basic/config.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Loopback999
- description this is a test
- shutdown
-
diff --git a/test/integration/targets/ios_config/templates/basic/configblock.j2 b/test/integration/targets/ios_config/templates/basic/configblock.j2
deleted file mode 100644
index 46150c4d90..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configblock.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/configexact1.j2 b/test/integration/targets/ios_config/templates/basic/configexact1.j2
deleted file mode 100644
index 82ad080c5d..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configexact1.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/configexact2.j2 b/test/integration/targets/ios_config/templates/basic/configexact2.j2
deleted file mode 100644
index 46150c4d90..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configexact2.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/configstrict1.j2 b/test/integration/targets/ios_config/templates/basic/configstrict1.j2
deleted file mode 100644
index 46150c4d90..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configstrict1.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/intended_running_config b/test/integration/targets/ios_config/templates/basic/intended_running_config
deleted file mode 100644
index bdad8d3d8b..0000000000
--- a/test/integration/targets/ios_config/templates/basic/intended_running_config
+++ /dev/null
@@ -1,9 +0,0 @@
-version 15.6
-service timestamps debug datetime msec
-service timestamps log datetime msec
-no service password-encryption
-!
-hostname an-ios-02.ansible.com
-!
-boot-start-marker
-boot-end-marker
diff --git a/test/integration/targets/ios_config/templates/basic/macro.j2 b/test/integration/targets/ios_config/templates/basic/macro.j2
deleted file mode 100644
index 44a7a9bdbd..0000000000
--- a/test/integration/targets/ios_config/templates/basic/macro.j2
+++ /dev/null
@@ -1,8 +0,0 @@
- A12345678 123456789 123456789 123456789 123456789 123456789 123456789
- B12345678 123456789 123456789 123456789 123456789 123456789 123456789
- C12345678 123456789 123456789 123456789 123456789 123456789 123456789
- D12345678 123456789 123456789 123456789 123456789 123456789 123456789
- E12345678 123456789 123456789 123456789 123456789 123456789 123456789
- F12345678 123456789 123456789 123456789 123456789 123456789 123456789
- G12345678 123456789 123456789 123456789 123456789 123456789 123456789
- H12345678 123456789 123456789 123456789 123456789 123456789 123456789
diff --git a/test/integration/targets/ios_config/templates/basic/setupblock.j2 b/test/integration/targets/ios_config/templates/basic/setupblock.j2
deleted file mode 100644
index f57aa49b73..0000000000
--- a/test/integration/targets/ios_config/templates/basic/setupblock.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
diff --git a/test/integration/targets/ios_config/templates/basic/setupexact.j2 b/test/integration/targets/ios_config/templates/basic/setupexact.j2
deleted file mode 100644
index e8791e272e..0000000000
--- a/test/integration/targets/ios_config/templates/basic/setupexact.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
- permit ip host 192.0.2.5 any log
diff --git a/test/integration/targets/ios_config/templates/basic/setupstrict.j2 b/test/integration/targets/ios_config/templates/basic/setupstrict.j2
deleted file mode 100644
index e8791e272e..0000000000
--- a/test/integration/targets/ios_config/templates/basic/setupstrict.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
- permit ip host 192.0.2.5 any log
diff --git a/test/integration/targets/ios_config/templates/defaults/config.j2 b/test/integration/targets/ios_config/templates/defaults/config.j2
deleted file mode 100644
index 1d4d9da8d4..0000000000
--- a/test/integration/targets/ios_config/templates/defaults/config.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Loopback999
- description this is a test
- no shutdown
-
diff --git a/test/integration/targets/ios_config/tests/cli/backup.yaml b/test/integration/targets/ios_config/tests/cli/backup.yaml
deleted file mode 100644
index 0921d0086b..0000000000
--- a/test/integration/targets/ios_config/tests/cli/backup.yaml
+++ /dev/null
@@ -1,125 +0,0 @@
----
-- debug: msg="START cli/cli_backup.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- name: delete backup files
- file:
- path: "{{ item.path }}"
- state: absent
- with_items: "{{backup_files.files|default([])}}"
-
-- name: configure device with config
- ios_config:
- src: basic/config.j2
- backup: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- assert:
- that:
- - "backup_files.files is defined"
-
-- name: delete configurable backup file path
- file:
- path: "{{ item }}"
- state: absent
- with_items:
- - "{{ role_path }}/backup_test_dir/"
- - "{{ role_path }}/backup/backup.cfg"
-
-- name: take configuration backup in custom filename and directory path
- ios_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-1 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom filename
- ios_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-2 exist
- find:
- paths: "{{ role_path }}/backup/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom path and default filename
- ios_config:
- backup: yes
- backup_options:
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-3 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- debug: msg="END cli/cli_backup.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/defaults.yaml b/test/integration/targets/ios_config/tests/cli/defaults.yaml
deleted file mode 100644
index 3792a9eb6a..0000000000
--- a/test/integration/targets/ios_config/tests/cli/defaults.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug: msg="START cli/defaults.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: configure device with defaults included
- ios_config:
- src: defaults/config.j2
- defaults: yes
- register: result
-
-- debug: var=result
-
-- assert:
- that:
- - "result.changed == true"
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check device with defaults included
- ios_config:
- src: defaults/config.j2
- defaults: yes
- register: result
-
-- debug: var=result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.updates is not defined"
-
-- name: Check device is in proper prompt after error
- ios_config:
- lines:
- - mac-address-table notification mac-move
- ignore_errors: yes
-
-- name: show interfaces brief to ensure deivce goes to valid prompt
- ios_command:
- commands:
- - show interfaces
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
-- debug: msg="END cli/defaults.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/diff.yaml b/test/integration/targets/ios_config/tests/cli/diff.yaml
deleted file mode 100644
index dbdd033a89..0000000000
--- a/test/integration/targets/ios_config/tests/cli/diff.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START cli/diff.yaml on connection={{ ansible_connection }}"
-
-- name: Ensure hostname is preset
- ios_system:
- hostname: "{{ shorter_hostname }}"
-
-- name: ios_config diff against retrieved config
- ios_config:
- diff_against: intended
- intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config') }}"
- diff: true
- register: result
-
-- assert:
- that:
- - "'hostname an-ios-02.ansible.com' in result['diff']['after']"
- - "'hostname {{ shorter_hostname }}' in result['diff']['before']"
-
-- name: ios_config diff against provided running_config
- ios_config:
- diff_against: intended
- intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config') }}"
- running_config: "{{ lookup('file', '{{ role_path }}/templates/basic/base_running_config') }}"
- diff: true
- register: result
-
-- assert:
- that:
- - "'hostname an-ios-02.ansible.com' in result['diff']['after']"
- - "'hostname an-ios-01.ansible.com' in result['diff']['before']"
-
-- debug: msg="END cli/diff.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/macro.yaml b/test/integration/targets/ios_config/tests/cli/macro.yaml
deleted file mode 100644
index b526f47dc5..0000000000
--- a/test/integration/targets/ios_config/tests/cli/macro.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-
-- debug: msg="START cli/cli_macro.yaml on connection={{ ansible_connection }}"
-
-- name: "Check for macro support"
- ios_command:
- commands:
- - "show parser macro brief"
- register: supports_macro
- ignore_errors: yes
-
-- name: "ios_config macro integration tests"
- when: supports_macro is succeeded
- block:
-
- - name: "Define macro name"
- set_fact:
- macro_name: 'MACRO_ANSIBLE_TEST'
-
- - name: "setup - remove configuration"
- ios_config:
- lines:
- - 'no macro name {{ macro_name }}'
- - 'do show clock'
- match: none
-
- - name: "configure macro"
- ios_config:
- parents: "macro name {{ macro_name }}"
- # before: [ 'no macro name ...']
- multiline_delimiter: '@'
- after: '@'
- match: line
- replace: block
- lines: "{{ lookup('template', 'basic/macro.j2') }}"
- register: result
-
- - name: "Check if macro has been added"
- assert:
- that:
- - "result.changed == true"
-
- - name: "configure macro again - idempotent check"
- ios_config:
- parents: "macro name {{ macro_name }}"
- multiline_delimiter: '@'
- after: '@'
- match: line
- replace: block
- lines: "{{ lookup('template', 'basic/macro.j2') }}"
- register: result
-
- - name: "macro already/correctly configured ?"
- assert:
- that:
- - "result.changed == false"
-
- always:
- - name: "teardown"
- ios_config:
- lines:
- - "no macro name {{ macro_name }}"
- - 'do show clock'
- match: none
-
-- debug: msg="END cli/cli_macro.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/save.yaml b/test/integration/targets/ios_config/tests/cli/save.yaml
deleted file mode 100644
index bd83961575..0000000000
--- a/test/integration/targets/ios_config/tests/cli/save.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug: msg="START cli/save.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
- save_when: modified
-
-- name: save should always run
- ios_config:
- save_when: always
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: delete config (setup)
- ios_config:
- replace: line
- lines:
- - "no ip http server"
- save_when: modified
- register: result
-
-- name: save should run when changed
- ios_config:
- replace: line
- lines:
- - "ip http server"
- save_when: modified
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- ios_config:
- lines:
- - "no ip http server"
- register: result
-
-- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/src_basic.yaml b/test/integration/targets/ios_config/tests/cli/src_basic.yaml
deleted file mode 100644
index c9381aca86..0000000000
--- a/test/integration/targets/ios_config/tests/cli/src_basic.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug: msg="START cli/src_basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: configure device with config
- ios_config:
- src: basic/config.j2
- register: result
-
-- name: debug, remove me
- debug:
- msg: "{{ result }}"
-- assert:
- that:
- - "result.changed == true"
-# https://github.com/ansible/ansible-modules-core/issues/4807
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check device with config
- ios_config:
- src: basic/config.j2
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-# https://github.com/ansible/ansible-modules-core/issues/4807
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check for empty diff
- ios_config:
- running_config: |
- service timestamps debug datetime msec
- service timestamps log datetime msec
- lines:
- - service timestamps debug datetime msec
- - service timestamps log datetime msec
- check_mode: True
- register: result
-- assert:
- that:
- - "result.updates is undefined"
-
-- name: check for diff with ignore lines for running config
- ios_config:
- running_config: |
- service timestamps debug datetime msec
- service timestamps log datetime msec
- lines:
- - service timestamps debug datetime msec
- - service timestamps log datetime msec
- diff_ignore_lines: service timestamps log datetime msec
- check_mode: True
- register: result
-
-- assert:
- that:
- - "'service timestamps log datetime msec' in result.updates"
-
-- debug: msg="END cli/src_basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/src_invalid.yaml b/test/integration/targets/ios_config/tests/cli/src_invalid.yaml
deleted file mode 100644
index 0744324037..0000000000
--- a/test/integration/targets/ios_config/tests/cli/src_invalid.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- debug: msg="START cli/src_invalid.yaml on connection={{ ansible_connection }}"
-
-
-# Defend https://github.com/ansible/ansible-modules-core/issues/4797
-- name: configure with invalid src
- ios_config:
- src: basic/foobar.j2
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.changed == false"
- - "result.failed == true"
- - "result.msg == 'path specified in src not found'"
-
-- debug: msg="END cli/src_invalid.yaml on connection={{ ansible_connection }}"
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
deleted file mode 100644
index 4300a37d28..0000000000
--- a/test/integration/targets/ios_config/tests/cli/src_match_none.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START cli/src_match_none.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: configure device with config
- ios_config:
- src: basic/config.j2
- match: none
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-# https://github.com/ansible/ansible-modules-core/issues/4807
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check device with config
- ios_config:
- src: basic/config.j2
- register: result
-
-- assert:
- that:
- # Idempotent test
-# https://github.com/ansible/ansible-modules-core/issues/4807
- - "result.changed == false"
- - "result.updates is not defined"
-
-- debug: msg="END cli/src_match_none.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel.yaml b/test/integration/targets/ios_config/tests/cli/sublevel.yaml
deleted file mode 100644
index 7442cd9c2b..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- debug: msg="START cli/sublevel.yaml on connection={{ ansible_connection }}"
-
-- name: setup test
- ios_config:
- lines:
- - 'no ip access-list extended test'
- - 'no ip access-list standard test'
- match: none
-
-- name: configure sub level command
- ios_config:
- lines: ['permit ip any any log']
- parents: ['ip access-list extended test']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip any any log' in result.updates"
-
-- name: configure sub level command idempotent check
- ios_config:
- lines: ['permit ip any any log']
- parents: ['ip access-list extended test']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - 'no ip access-list extended test'
- match: none
-
-- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml
deleted file mode 100644
index 05d14ee77d..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug: msg="START cli/sublevel_block.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- parents: ['ip access-list extended test']
- before: ['no ip access-list extended test']
- after: ['exit']
- match: none
-
-- name: configure sub level command using block resplace
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ['ip access-list extended test']
- replace: block
- after: ['exit']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip host 192.0.2.1 any log' in result.updates"
- - "'permit ip host 192.0.2.2 any log' in result.updates"
- - "'permit ip host 192.0.2.3 any log' in result.updates"
- - "'permit ip host 192.0.2.4 any log' in result.updates"
-
-- name: check sub level command using block replace
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ['ip access-list extended test']
- replace: block
- after: ['exit']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - no ip access-list extended test
- match: none
-
-- debug: msg="END cli/sublevel_block.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
deleted file mode 100644
index 0feb3f99e5..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-- debug: msg="START cli/sublevel_exact.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- - permit ip host 192.0.2.5 any log
- parents: ip access-list extended test
- before: no ip access-list extended test
- after: exit
- match: none
-
-- name: configure sub level command using exact match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ip access-list extended test
- before: no ip access-list extended test
- after: exit
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip host 192.0.2.1 any log' in result.updates"
- - "'permit ip host 192.0.2.2 any log' in result.updates"
- - "'permit ip host 192.0.2.3 any log' in result.updates"
- - "'permit ip host 192.0.2.4 any log' in result.updates"
- - "'permit ip host 192.0.2.5 any log' not in result.updates"
-
-- name: check sub level command using exact match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ip access-list extended test
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - no ip access-list extended test
- match: none
-
-- debug: msg="END cli/sublevel_exact.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
deleted file mode 100644
index ea4cb11b3e..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug: msg="START cli/sublevel_strict.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- - permit ip host 192.0.2.5 any log
- parents: ip access-list extended test
- before: no ip access-list extended test
- match: none
-
-- name: configure sub level command using strict match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ip access-list extended test
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: check sub level command using strict match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.2 any log
- parents: ip access-list extended test
- after: exit
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip host 192.0.2.1 any log' not in result.updates"
- - "'permit ip host 192.0.2.2 any log' in result.updates"
- - "'permit ip host 192.0.2.3 any log' in result.updates"
- - "'permit ip host 192.0.2.4 any log' not in result.updates"
- - "'permit ip host 192.0.2.5 any log' not in result.updates"
-
-- name: teardown
- ios_config:
- lines: no ip access-list extended test
- match: none
-
-- debug: msg="END cli/sublevel_strict.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml
deleted file mode 100644
index f99f77e341..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug: msg="START cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - class-map c1
- - match precedence 7
- - policy-map p1
- - class c1
- before: ['no policy-map p1', 'no class-map c1']
- match: none
-
-- name: configure sub level command using strict match
- ios_config:
- lines:
- - set ip precedence 5
- - police cir percent 10
- parents: ['policy-map p1', 'class c1']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set ip precedence 5' in result.updates"
- - "'police cir percent 10' in result.updates"
-
-- name: change sub level command order and config with strict match
- ios_config:
- lines:
- - police cir percent 10
- - set ip precedence 5
- parents: ['policy-map p1', 'class c1']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set ip precedence 5' in result.updates"
- - "'police cir percent 10' in result.updates"
-
-- name: Config sub level command with strict match (Idempotency)
- ios_config:
- lines:
-#IOS does not change orded of class action if reconfigured
-#so we have to use old order for Idempoteny
- - set ip precedence 5
- - police cir percent 10
- parents: ['policy-map p1', 'class c1']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - no policy-map p1
- - no class-map c1
- match: none
-
-- debug: msg="END cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel.yaml b/test/integration/targets/ios_config/tests/cli/toplevel.yaml
deleted file mode 100644
index 0408c8202a..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START cli/toplevel.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- name: configure top level command
- ios_config:
- lines: ['hostname foo']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
-
-- name: configure top level command idempotent check
- ios_config:
- lines: ['hostname foo']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- debug: msg="END cli/toplevel.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml
deleted file mode 100644
index 26039e06a3..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg="START cli/toplevel_after.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- name: configure top level command with before
- ios_config:
- lines: ['hostname foo']
- after: ['snmp-server contact bar']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
- - "'snmp-server contact bar' in result.updates"
-
-- name: configure top level command with before idempotent check
- ios_config:
- lines: ['hostname foo']
- after: ['snmp-server contact foo']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - "no snmp-server contact"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- debug: msg="END cli/toplevel_after.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml
deleted file mode 100644
index ab210be8c8..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg="START cli/toplevel_before.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- name: configure top level command with before
- ios_config:
- lines: ['hostname foo']
- before: ['snmp-server contact bar']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
- - "'snmp-server contact bar' in result.updates"
-
-- name: configure top level command with before idempotent check
- ios_config:
- lines: ['hostname foo']
- before: ['snmp-server contact foo']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - "no snmp-server contact"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- debug: msg="END cli/toplevel_before.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
deleted file mode 100644
index 06aa838481..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- name: configure top level command
- ios_config:
- lines: ['hostname foo']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
-
-- name: configure top level command idempotent check
- ios_config:
- lines: ['hostname foo']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- debug: msg="END cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml
deleted file mode 100644
index a431c01fde..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml
+++ /dev/null
@@ -1,113 +0,0 @@
-- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
-
-- name: delete configurable backup file path
- file:
- path: "{{ item }}"
- state: absent
- with_items:
- - "{{ role_path }}/backup_test_dir/"
- - "{{ role_path }}/backup/backup.cfg"
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- name: delete backup files
- file:
- path: "{{ item.path }}"
- state: absent
- with_items: "{{backup_files.files|default([])}}"
-
-- name: take config backup
- cli_config:
- backup: yes
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- assert:
- that:
- - "backup_files.files is defined"
-
-- name: take configuration backup in custom filename and directory path
- cli_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-1 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom filename
- cli_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-2 exist
- find:
- paths: "{{ role_path }}/backup/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom path and default filename
- cli_config:
- backup: yes
- backup_options:
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-3 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml
deleted file mode 100644
index 607b3df498..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
----
-- debug: msg="START cli_config/cli_basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- cli_config: &rm
- config: |
- interface loopback999
- no description
- shutdown
- diff_match: none
-
-- name: configure device with config
- cli_config: &conf
- config: "{{ lookup('template', 'basic/config.j2') }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Idempotence
- cli_config: *conf
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: remove config
- cli_config: *rm
-
-- name: configure device with config
- cli_config:
- config: "{{ lookup('template', 'basic/config.j2') }}"
- defaults: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- cli_config: *rm
-
-- debug: msg="END cli_config/cli_basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml
deleted file mode 100644
index f66f83f96d..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- debug: msg="START cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove configuration
- cli_config:
- config: "{{ lookup('template', 'basic/setupblock.j2') }}"
- diff_match: none
-
-- name: block replace
- cli_config: &block
- config: "{{ lookup('template', 'basic/configblock.j2') }}"
- diff_replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: block replace (Idempotence)
- cli_config: *block
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- cli_config:
- config: no ip access-list extended test
- diff_match: none
-
-- debug: msg="END cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml
deleted file mode 100644
index 597afa5099..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START cli_config/cli_exact_match.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove configuration
- cli_config:
- config: "{{ lookup('template', 'basic/setupexact.j2') }}"
- diff_match: none
-
-- name: configure using exact match
- cli_config:
- config: "{{ lookup('template', 'basic/configexact1.j2') }}"
- diff_match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check using exact match
- cli_config:
- config: "{{ lookup('template', 'basic/configexact2.j2') }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- cli_config:
- config: no ip access-list extended test
- diff_match: none
-
-- debug: msg="END cli_config/cli_exact_match.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml
deleted file mode 100644
index 45ba54f1ef..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- debug: msg="START cli_config/cli_strict_match.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove configuration
- cli_config:
- config: "{{ lookup('template', 'basic/setupstrict.j2') }}"
- diff_match: none
-
-- name: configure using strict match
- cli_config:
- config: "{{ lookup('template', 'basic/configstrict1.j2') }}"
- diff_match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- cli_config:
- config: no ip access-list extended test
- diff_match: none
-
-- debug: msg="END cli_config/cli_strict_match.yaml on connection={{ ansible_connection }}"