summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-05 14:14:52 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-05 14:14:52 +0200
commit327223fdf32d20d54fc2d64feca200c1259f0d3f (patch)
tree1c5672f5f8e9a5b5574b6d0852aa99c240500e9b
parentdbc585572785f76814379b1abedaa6ea6d433653 (diff)
Add cleanup stage to 'nginx' role test
Change-Id: Idddc421d33698c08b19cc63f4e203d0964341462 Issue-ID: OOM-1913 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rw-r--r--ansible/roles/nginx/molecule/default/cleanup.yml6
-rw-r--r--ansible/test/play-infrastructure/molecule/default/cleanup.yml6
-rw-r--r--ansible/test/roles/cleanup-nginx/tasks/main.yml6
3 files changed, 18 insertions, 0 deletions
diff --git a/ansible/roles/nginx/molecule/default/cleanup.yml b/ansible/roles/nginx/molecule/default/cleanup.yml
new file mode 100644
index 00000000..9870a553
--- /dev/null
+++ b/ansible/roles/nginx/molecule/default/cleanup.yml
@@ -0,0 +1,6 @@
+---
+- name: Cleanup
+ hosts: all
+ ignore_unreachable: true
+ roles:
+ - cleanup-nginx
diff --git a/ansible/test/play-infrastructure/molecule/default/cleanup.yml b/ansible/test/play-infrastructure/molecule/default/cleanup.yml
new file mode 100644
index 00000000..9870a553
--- /dev/null
+++ b/ansible/test/play-infrastructure/molecule/default/cleanup.yml
@@ -0,0 +1,6 @@
+---
+- name: Cleanup
+ hosts: all
+ ignore_unreachable: true
+ roles:
+ - cleanup-nginx
diff --git a/ansible/test/roles/cleanup-nginx/tasks/main.yml b/ansible/test/roles/cleanup-nginx/tasks/main.yml
new file mode 100644
index 00000000..94517519
--- /dev/null
+++ b/ansible/test/roles/cleanup-nginx/tasks/main.yml
@@ -0,0 +1,6 @@
+---
+- name: Remove saved nginx docker image
+ delegate_to: localhost
+ file:
+ path: /tmp/nginx.tar
+ state: absent