summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_ospfv2/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets/vyos_ospfv2/tasks')
-rw-r--r--tests/integration/targets/vyos_ospfv2/tasks/main.yaml8
-rw-r--r--tests/integration/targets/vyos_ospfv2/tasks/post_tasks.yaml7
-rw-r--r--tests/integration/targets/vyos_ospfv2/tasks/pre_tasks.yaml7
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_ospfv2/tasks/main.yaml b/tests/integration/targets/vyos_ospfv2/tasks/main.yaml
index 9a3359ed..53afd6c2 100644
--- a/tests/integration/targets/vyos_ospfv2/tasks/main.yaml
+++ b/tests/integration/targets/vyos_ospfv2/tasks/main.yaml
@@ -1,4 +1,8 @@
---
+- name: Run preflight setup
+ ansible.builtin.import_tasks: pre_tasks.yaml
+ failed_when: false
+
- name: Run CLI tests
ansible.builtin.include_tasks: cli.yaml
tags:
@@ -9,3 +13,7 @@
when: ansible_version.full is version('2.10.0', '>=')
tags:
- network_cli
+
+- name: Run post-test cleanup tasks
+ ansible.builtin.import_tasks: post_tasks.yaml
+ failed_when: false
diff --git a/tests/integration/targets/vyos_ospfv2/tasks/post_tasks.yaml b/tests/integration/targets/vyos_ospfv2/tasks/post_tasks.yaml
new file mode 100644
index 00000000..e172db2d
--- /dev/null
+++ b/tests/integration/targets/vyos_ospfv2/tasks/post_tasks.yaml
@@ -0,0 +1,7 @@
+---
+- name: Remove pre-requisite configuration
+ vyos.vyos.vyos_config:
+ lines: |-
+ delete policy route-map ingress
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
diff --git a/tests/integration/targets/vyos_ospfv2/tasks/pre_tasks.yaml b/tests/integration/targets/vyos_ospfv2/tasks/pre_tasks.yaml
new file mode 100644
index 00000000..bdca8772
--- /dev/null
+++ b/tests/integration/targets/vyos_ospfv2/tasks/pre_tasks.yaml
@@ -0,0 +1,7 @@
+---
+- name: Add pre-requisite configuration
+ vyos.vyos.vyos_config:
+ lines: |-
+ set policy route-map ingress
+ vars:
+ ansible_connection: ansible.netcommon.network_cli