summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Case <kcase@redhat.com>2023-03-28 09:32:38 -0400
committerGitHub <noreply@github.com>2023-03-28 09:32:38 -0400
commit2653fa8d08af498677604927399451415b25884e (patch)
tree51695189c6cebf3308a3d063b6df42c41fed2832
parentd181df0cc702cbafb8a9cd640b2eeb6cc3b9a962 (diff)
downloadvyos-ansible-collection-2653fa8d08af498677604927399451415b25884e.tar.gz
vyos-ansible-collection-2653fa8d08af498677604927399451415b25884e.zip
Always clear config before setting base config in tests. (#306)
* Always clear config before setting base config in tests. * Clear bond before removing
-rw-r--r--.gitignore3
-rw-r--r--tests/integration/targets/vyos_bgp_address_family/tests/cli/_populate.yaml4
-rw-r--r--tests/integration/targets/vyos_bgp_address_family/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_bgp_address_family/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_bgp_address_family/tests/cli/overridden.yaml2
-rw-r--r--tests/integration/targets/vyos_bgp_address_family/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/_populate.yaml4
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml2
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_global/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_global/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_global/tests/cli/parsed.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_global/tests/cli/rendered.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_global/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_interfaces/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_afi.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_all.yaml2
-rw-r--r--tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_single.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/rendered.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml6
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml4
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml4
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml2
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml2
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml11
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_config.yaml11
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml6
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml6
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml6
-rw-r--r--tests/integration/targets/vyos_lldp_global/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_global/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_global/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_logging_global/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_logging_global/tests/cli/deleted.yaml3
-rw-r--r--tests/integration/targets/vyos_logging_global/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_logging_global/tests/cli/overridden.yaml2
-rw-r--r--tests/integration/targets/vyos_logging_global/tests/cli/rendered.yaml2
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml4
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml2
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv2/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv2/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv2/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv3/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv3/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml2
-rw-r--r--tests/integration/targets/vyos_ospfv3/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_route_maps/tests/cli/_populate.yaml4
-rw-r--r--tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_route_maps/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_route_maps/tests/cli/overridden.yaml2
-rw-r--r--tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml2
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/overridden.yaml2
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/parsed.yaml2
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/rendered.yaml2
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/replaced.yaml2
87 files changed, 74 insertions, 160 deletions
diff --git a/.gitignore b/.gitignore
index f1ecdf3..4e50e63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+/tests/output/
+/changelogs/.plugin-cache.yaml
+
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
diff --git a/tests/integration/targets/vyos_bgp_address_family/tests/cli/_populate.yaml b/tests/integration/targets/vyos_bgp_address_family/tests/cli/_populate.yaml
index 3aca916..ecbcc70 100644
--- a/tests/integration/targets/vyos_bgp_address_family/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_bgp_address_family/tests/cli/_populate.yaml
@@ -1,5 +1,7 @@
---
-- name: setup
+- ansible.builtin.include_tasks: _remove_config.yaml
+
+- name: Setup
vyos.vyos.vyos_config:
lines:
- set policy access-list 20 description 'acl20'
diff --git a/tests/integration/targets/vyos_bgp_address_family/tests/cli/deleted.yaml b/tests/integration/targets/vyos_bgp_address_family/tests/cli/deleted.yaml
index 64f6f34..5d60f36 100644
--- a/tests/integration/targets/vyos_bgp_address_family/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_bgp_address_family/tests/cli/deleted.yaml
@@ -4,8 +4,6 @@
START vyos_bgp_address_family deleted integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_bgp_address_family/tests/cli/gathered.yaml b/tests/integration/targets/vyos_bgp_address_family/tests/cli/gathered.yaml
index f05094f..a8f428f 100644
--- a/tests/integration/targets/vyos_bgp_address_family/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_bgp_address_family/tests/cli/gathered.yaml
@@ -4,8 +4,6 @@
START vyos_bgp_address_family gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_bgp_address_family/tests/cli/overridden.yaml b/tests/integration/targets/vyos_bgp_address_family/tests/cli/overridden.yaml
index fdbc00b..9414494 100644
--- a/tests/integration/targets/vyos_bgp_address_family/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_bgp_address_family/tests/cli/overridden.yaml
@@ -4,8 +4,6 @@
START vyos_bgp_address_family overridden integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_bgp_address_family/tests/cli/replaced.yaml b/tests/integration/targets/vyos_bgp_address_family/tests/cli/replaced.yaml
index d782582..0a2ccd9 100644
--- a/tests/integration/targets/vyos_bgp_address_family/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_bgp_address_family/tests/cli/replaced.yaml
@@ -4,8 +4,6 @@
START vyos_bgp_address_family replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/_populate.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/_populate.yaml
index ec237d9..0f281c9 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/_populate.yaml
@@ -1,5 +1,7 @@
---
-- name: setup
+- ansible.builtin.include_tasks: _remove_config.yaml
+
+- name: Setup
vyos.vyos.vyos_config:
lines:
- set policy access-list 20 description 'acl20'
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml
index 8df1677..00a799e 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml
@@ -3,8 +3,6 @@
msg: START vyos_bgp_global deleted integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml
index 742951f..e5eca7a 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_bgp_global gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml
index 0af8775..239f748 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml
@@ -3,8 +3,6 @@
msg: START vyos_bgp_global purged integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml
index aeb4aa7..99ea04d 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml
@@ -3,8 +3,6 @@
msg: START vyos_bgp_global replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/_populate.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/_populate.yaml
index 27d1aa2..d79f477 100644
--- a/tests/integration/targets/vyos_firewall_global/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_firewall_global/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/deleted.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/deleted.yaml
index 31620f4..df9be56 100644
--- a/tests/integration/targets/vyos_firewall_global/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_firewall_global/tests/cli/deleted.yaml
@@ -1,7 +1,7 @@
---
- debug:
msg:
- Start vyos_firewall_global deleted integration tests ansible_connection={{
+ START vyos_firewall_global deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate.yaml
diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml
index a333803..e2b60fc 100644
--- a/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_firewall_global gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/parsed.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/parsed.yaml
index 82b7330..54885ce 100644
--- a/tests/integration/targets/vyos_firewall_global/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_firewall_global/tests/cli/parsed.yaml
@@ -4,8 +4,6 @@
START vyos_firewall_global parsed integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/rendered.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/rendered.yaml
index 16d585e..951abe1 100644
--- a/tests/integration/targets/vyos_firewall_global/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_firewall_global/tests/cli/rendered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_firewall_global rendered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/replaced.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/replaced.yaml
index e213bdf..6b0ee82 100644
--- a/tests/integration/targets/vyos_firewall_global/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_firewall_global/tests/cli/replaced.yaml
@@ -3,8 +3,6 @@
msg: START vyos_firewall_global replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_populate.yaml
index 8b3dacd..3dee476 100644
--- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted.yaml
index f1a0a4d..eb9bded 100644
--- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted.yaml
@@ -1,7 +1,7 @@
---
- debug:
msg:
- Start vyos_firewall_interfaces deleted integration tests ansible_connection={{
+ START vyos_firewall_interfaces deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate_rule_sets.yaml
diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_afi.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_afi.yaml
index b33aea8..8a31b2a 100644
--- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_afi.yaml
+++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_afi.yaml
@@ -1,7 +1,7 @@
---
- debug:
msg:
- Start vyos_firewall_interfaces deleted integration tests ansible_connection={{
+ START vyos_firewall_interfaces deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate_rule_sets.yaml
diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_all.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_all.yaml
index 1293f6a..a3515b0 100644
--- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_all.yaml
+++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_all.yaml
@@ -1,7 +1,7 @@
---
- debug:
msg:
- Start vyos_firewall_interfaces deleted integration tests ansible_connection={{
+ START vyos_firewall_interfaces deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate_rule_sets.yaml
diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_single.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_single.yaml
index eb42c02..d62e27f 100644
--- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_single.yaml
+++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/deleted_single.yaml
@@ -1,7 +1,7 @@
---
- debug:
msg:
- Start vyos_firewall_interfaces deleted integration tests ansible_connection={{
+ START vyos_firewall_interfaces deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate_rule_sets.yaml
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml
index 702930c..ee0b775 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml
index 85bf4d3..f8057c8 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml
@@ -4,8 +4,6 @@
START vyos_interfaces gathered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml
index d4052c8..66588cd 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml
@@ -4,8 +4,6 @@
START vyos_interfaces overridden integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/rendered.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/rendered.yaml
index e8f3591..41d10d0 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/rendered.yaml
@@ -4,8 +4,6 @@
START vyos_interfaces rendered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml
index daf8045..a22a4c7 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml
@@ -4,8 +4,6 @@
START vyos_interfaces replaced integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml
index d5d8620..2a766d5 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml
index 25ce28e..9242fb5 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml
@@ -1,14 +1,12 @@
---
- debug:
msg:
- Start vyos_interfaces deleted integration tests ansible_connection={{ ansible_connection
+ START vyos_interfaces deleted integration tests ansible_connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
+- include_tasks: _populate.yaml
- block:
- - include_tasks: _populate.yaml
-
- name: Delete attributes of given interfaces
register: result
vyos.vyos.vyos_l3_interfaces: &id001
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml
index ce8faba..f18f7d3 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml
@@ -4,8 +4,6 @@
START vyos_l3_interfaces gathered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml
index dc6f0ce..c12e2ae 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml
@@ -4,11 +4,9 @@
START vyos_l3_interfaces merged integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
+- include_tasks: _populate.yaml
- block:
- - include_tasks: _populate.yaml
-
- name: Overrides all device configuration with provided configuration
register: result
vyos.vyos.vyos_l3_interfaces: &id001
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml
index 7bbf53c..2a606c3 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml
@@ -4,8 +4,6 @@
START vyos_l3_interfaces rendered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml
index c102602..26fe4f8 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml
@@ -4,11 +4,9 @@
START vyos_l3_interfaces replaced integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
+- include_tasks: _populate.yaml
- block:
- - include_tasks: _populate.yaml
-
- name: Replace device configurations of listed interfaces with provided configurations
register: result
vyos.vyos.vyos_l3_interfaces: &id001
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml
index bee2a09..963ab55 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml
@@ -2,8 +2,6 @@
- debug:
msg: START l3_interfaces rendered on connection={{ ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml
index 00b7e6e..fa191ed 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_bond.yaml
+
- name: Add Bond
vars:
lines: "set interfaces bonding bond0\nset interfaces bonding bond1\n"
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml
index 4ad0b85..d519d28 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _add_bond.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml
index dfc9920..017c56a 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml
@@ -1,4 +1,15 @@
---
+- name: Remove Config
+ vars:
+ lines:
+ "delete interfaces bonding bond0 hash-policy\ndelete interfaces ethernet\
+ \ eth1 bond-group bond0\ndelete interfaces bonding bond0 mode\ndelete interfaces\
+ \ bonding bond0 primary\ndelete interfaces bonding bond1 hash-policy\ndelete\
+ \ interfaces ethernet eth2 bond-group bond1\ndelete interfaces bonding bond1\
+ \ mode\ndelete interfaces bonding bond1 primary\n"
+ ansible.netcommon.cli_config:
+ config: "{{ lines }}"
+
- name: Remove Bond
vars:
lines: "delete interfaces bonding bond0\ndelete interfaces bonding bond1\n"
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_config.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index 11432ea..0000000
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- name: Remove Config
- vars:
- lines:
- "delete interfaces bonding bond0 hash-policy\ndelete interfaces ethernet\
- \ eth1 bond-group bond0\ndelete interfaces bonding bond0 mode\ndelete interfaces\
- \ bonding bond0 primary\ndelete interfaces bonding bond1 hash-policy\ndelete\
- \ interfaces ethernet eth2 bond-group bond1\ndelete interfaces bonding bond1\
- \ mode\ndelete interfaces bonding bond1 primary\n"
- ansible.netcommon.cli_config:
- config: "{{ lines }}"
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml
index 56f1ed6..ae15884 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml
@@ -1,7 +1,7 @@
---
- debug:
msg:
- Start vyos_lag_interfaces deleted integration tests ansible_connection={{
+ START vyos_lag_interfaces deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate.yaml
@@ -48,4 +48,4 @@
- "{{ deleted['after'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml
index 3e6d8e1..caa8f30 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml
@@ -4,8 +4,6 @@
START vyos_lag_interfaces gathered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
@@ -22,4 +20,4 @@
\ }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml
index 4af04ff..8e6c764 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml
@@ -4,10 +4,6 @@
START vyos_lag_interfaces merged integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _remove_bond.yaml
-
- include_tasks: _add_bond.yaml
- block:
@@ -65,4 +61,4 @@
- "{{ merged['after'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml
index 9682fd7..93aa7d9 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml
@@ -3,10 +3,6 @@
msg: START vyos_lag_interfaces overridden integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _remove_bond.yaml
-
- include_tasks: _populate.yaml
- block:
@@ -54,4 +50,4 @@
- "{{ overridden['after'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
index ce2df0d..412dcaf 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
@@ -4,8 +4,6 @@
START vyos_lag_interfaces parsed integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
@@ -30,4 +28,4 @@
\ |length == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml
index 781100f..ad05199 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml
@@ -4,8 +4,6 @@
START vyos_lag_interfaces rendered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
@@ -34,4 +32,4 @@
\ |length == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml
index c8b711b..2e6de6c 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml
@@ -4,8 +4,6 @@
START vyos_lag_interfaces replaced integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
@@ -54,4 +52,4 @@
- "{{ replaced['after'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml
index f5f6098..0e7c178 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml
@@ -3,8 +3,6 @@
msg: START vyos_lag_interfaces round trip integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _remove_bond.yaml
- block:
@@ -69,4 +67,4 @@
"{{ base_config['after'] | symmetric_difference(revert['after']) |length\
\ == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml
index 005aa85..876563c 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml
@@ -2,10 +2,6 @@
- debug:
msg: START lag_interfaces merged on connection={{ ansible_connection }}
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _remove_bond.yaml
-
- include_tasks: _add_bond.yaml
- block:
@@ -63,4 +59,4 @@
- "{{ merged['after'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/_populate.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/_populate.yaml
index 24c114d..eb0f21e 100644
--- a/tests/integration/targets/vyos_lldp_global/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_lldp_global/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/deleted.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/deleted.yaml
index c086e2b..0d36e5f 100644
--- a/tests/integration/targets/vyos_lldp_global/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_lldp_global/tests/cli/deleted.yaml
@@ -1,6 +1,6 @@
---
- debug:
- msg: Start vyos_lldp_global deleted integration tests ansible_connection={{
+ msg: START vyos_lldp_global deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate.yaml
diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml
index 7e09b6b..46e5b36 100644
--- a/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_lldp_global gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml
index dc7b7b1..85a35f6 100644
--- a/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml
@@ -4,8 +4,6 @@
START vyos_lldp_global merged integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/replaced.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/replaced.yaml
index 6859dc8..55874b7 100644
--- a/tests/integration/targets/vyos_lldp_global/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_lldp_global/tests/cli/replaced.yaml
@@ -4,8 +4,6 @@
START vyos_lldp_global replaced integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_populate.yaml
index 406d30b..2c6782b 100644
--- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/deleted.yaml
index c5b30af..776fa22 100644
--- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/deleted.yaml
@@ -1,7 +1,7 @@
---
- debug:
msg:
- Start vyos_lldp_interfaces deleted integration tests ansible_connection={{
+ START vyos_lldp_interfaces deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate.yaml
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml
index 8a59955..216f2d1 100644
--- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml
@@ -4,8 +4,6 @@
START vyos_lldp_interfaces gathered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/replaced.yaml
index e76e3b2..46c91cf 100644
--- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/replaced.yaml
@@ -3,8 +3,6 @@
msg: START vyos_lldp_interfaces replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_logging_global/tests/cli/_populate.yaml b/tests/integration/targets/vyos_logging_global/tests/cli/_populate.yaml
index 2f3828f..516df94 100644
--- a/tests/integration/targets/vyos_logging_global/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_logging_global/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: POPULATE Apply the provided configuration
register: result
vyos.vyos.vyos_logging_global:
diff --git a/tests/integration/targets/vyos_logging_global/tests/cli/deleted.yaml b/tests/integration/targets/vyos_logging_global/tests/cli/deleted.yaml
index 2a0a355..cd89ac5 100644
--- a/tests/integration/targets/vyos_logging_global/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_logging_global/tests/cli/deleted.yaml
@@ -1,9 +1,8 @@
---
- debug:
- msg: Start Deleted integration state for vyos_logging ansible_connection={{
+ msg: START Deleted integration state for vyos_logging ansible_connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_logging_global/tests/cli/gathered.yaml b/tests/integration/targets/vyos_logging_global/tests/cli/gathered.yaml
index af1fa52..a4b26d4 100644
--- a/tests/integration/targets/vyos_logging_global/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_logging_global/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_logging_global gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_logging_global/tests/cli/overridden.yaml b/tests/integration/targets/vyos_logging_global/tests/cli/overridden.yaml
index e5eea38..c532b5a 100644
--- a/tests/integration/targets/vyos_logging_global/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_logging_global/tests/cli/overridden.yaml
@@ -3,8 +3,6 @@
msg: START vyos_logging_global overridden integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_logging_global/tests/cli/rendered.yaml b/tests/integration/targets/vyos_logging_global/tests/cli/rendered.yaml
index 01caca5..7858b9f 100644
--- a/tests/integration/targets/vyos_logging_global/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_logging_global/tests/cli/rendered.yaml
@@ -4,8 +4,6 @@
START vyos_logging_global rendered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml
index c4749d3..e30e9fb 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml
@@ -1,5 +1,7 @@
---
-- name: setup
+- ansible.builtin.include_tasks: _remove_config.yaml
+
+- name: Setup
vyos.vyos.vyos_config:
lines:
- set interfaces ethernet eth0 ip ospf cost 50
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml
index 4efca68..679a39b 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml
@@ -3,8 +3,6 @@
msg: START vyos_ospf_interfaces deleted integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml
index 21b6e5a..84c22cb 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_ospf_interfaces gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml
index dae9a6e..2652c40 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml
@@ -4,8 +4,6 @@
START vyos_ospf_interfaces overridden integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml
index 89c8c76..9efcdea 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml
@@ -3,8 +3,6 @@
msg: START vyos_ospf_interfaces replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/_populate.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/_populate.yaml
index a445375..f17c5cb 100644
--- a/tests/integration/targets/vyos_ospfv2/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_ospfv2/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines: "set protocols ospf mpls-te 'enable' \n
diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/deleted.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/deleted.yaml
index 9fc0d70..553bb9f 100644
--- a/tests/integration/targets/vyos_ospfv2/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_ospfv2/tests/cli/deleted.yaml
@@ -1,6 +1,6 @@
---
- debug:
- msg: Start vyos_ospfv2 deleted integration tests ansible_connection={{
+ msg: START vyos_ospfv2 deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate.yaml
diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml
index fed8c98..a8e3149 100644
--- a/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_ospfv2 gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml
index 30df9a4..bc82146 100644
--- a/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml
+++ b/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml
@@ -4,8 +4,6 @@
START vyos_ospfv2 merged integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/replaced.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/replaced.yaml
index e1fc389..b348484 100644
--- a/tests/integration/targets/vyos_ospfv2/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_ospfv2/tests/cli/replaced.yaml
@@ -3,8 +3,6 @@
msg: START vyos_ospfv2 replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/_populate.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/_populate.yaml
index 31f90ef..164fcc0 100644
--- a/tests/integration/targets/vyos_ospfv3/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines: "set protocols ospfv3 area 2 export-list 'export1' \n
diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/deleted.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/deleted.yaml
index e0be4c3..2e55472 100644
--- a/tests/integration/targets/vyos_ospfv3/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tests/cli/deleted.yaml
@@ -1,6 +1,6 @@
---
- debug:
- msg: Start vyos_ospfv3 deleted integration tests ansible_connection={{
+ msg: START vyos_ospfv3 deleted integration tests ansible_connection={{
ansible_connection }}
- include_tasks: _populate.yaml
diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml
index 1be8f8d..3654bbe 100644
--- a/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_ospfv3 gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml
index c6f0e8b..02657c8 100644
--- a/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml
@@ -4,8 +4,6 @@
START vyos_ospfv3 merged integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/replaced.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/replaced.yaml
index 08291ba..e5905f5 100644
--- a/tests/integration/targets/vyos_ospfv3/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tests/cli/replaced.yaml
@@ -3,8 +3,6 @@
msg: START vyos_ospfv3 replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/_populate.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/_populate.yaml
index 9ef975f..98e0161 100644
--- a/tests/integration/targets/vyos_route_maps/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_route_maps/tests/cli/_populate.yaml
@@ -1,5 +1,7 @@
---
-- name: setup
+- ansible.builtin.include_tasks: _remove_config.yaml
+
+- name: Setup
vyos.vyos.vyos_config:
lines:
- set policy route-map test2 rule 1 action 'permit'
diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml
index fe68d56..84b6446 100644
--- a/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml
@@ -3,8 +3,6 @@
msg: START vyos_route_maps deleted integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/gathered.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/gathered.yaml
index 430b9d5..358f5b1 100644
--- a/tests/integration/targets/vyos_route_maps/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_route_maps/tests/cli/gathered.yaml
@@ -3,8 +3,6 @@
msg: START vyos_route_maps gathered integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/overridden.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/overridden.yaml
index 168ef17..d33a7c4 100644
--- a/tests/integration/targets/vyos_route_maps/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_route_maps/tests/cli/overridden.yaml
@@ -3,8 +3,6 @@
msg: START vyos_route_maps overridden integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml
index fa0380b..57a91fd 100644
--- a/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml
@@ -3,8 +3,6 @@
msg: START vyos_route_maps replaced integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/_populate.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/_populate.yaml
index 4c54ef6..12e4392 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines: "set protocols static route 192.0.2.32/28 next-hop '192.0.2.10'\nset\
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml
index 8435d04..6b34912 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml
@@ -4,8 +4,6 @@
START vyos_static_routes gathered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/overridden.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/overridden.yaml
index d1bedc8..9281306 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/overridden.yaml
@@ -3,8 +3,6 @@
msg: START vyos_static_routes overridden integration tests on connection={{
ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/parsed.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/parsed.yaml
index 06cad97..5776f7f 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/parsed.yaml
@@ -4,8 +4,6 @@
START vyos_static_routes parsed integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/rendered.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/rendered.yaml
index 81e7259..4362d1f 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/rendered.yaml
@@ -4,8 +4,6 @@
START vyos_static_routes rendered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/replaced.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/replaced.yaml
index 50af5ed..28f80fb 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/replaced.yaml
@@ -4,8 +4,6 @@
START vyos_static_routes replaced integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block: