summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application/molecule
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-05 10:10:55 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-05 10:10:55 +0200
commite75226b2645bb4f0ea8382023c73a21235e50a2b (patch)
treeea9bc88f197c4ccc3cc662a66ff790f0c71160d8 /ansible/roles/application/molecule
parent464ac374b9c38d3cb2e1910853b4a890bbacf35c (diff)
Clean application role mocked artifacts directories
Directories created by Molecule tests were left in files tree and not cleaned up. This patch adds a task to shred them after test invocation. Change-Id: If745cfc45de2f73db5be1696a16a185ff2a625bf Issue-ID: OOM-1910 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles/application/molecule')
-rw-r--r--ansible/roles/application/molecule/custom_role/molecule.yml1
-rw-r--r--ansible/roles/application/molecule/default/cleanup.yml6
2 files changed, 7 insertions, 0 deletions
diff --git a/ansible/roles/application/molecule/custom_role/molecule.yml b/ansible/roles/application/molecule/custom_role/molecule.yml
index 5356b197..f9b29d92 100644
--- a/ansible/roles/application/molecule/custom_role/molecule.yml
+++ b/ansible/roles/application/molecule/custom_role/molecule.yml
@@ -34,6 +34,7 @@ provisioner:
playbooks:
prepare: ../default/prepare.yml
converge: ../default/playbook.yml
+ cleanup: ../default/cleanup.yml
scenario:
name: custom_role
test_sequence:
diff --git a/ansible/roles/application/molecule/default/cleanup.yml b/ansible/roles/application/molecule/default/cleanup.yml
new file mode 100644
index 00000000..996acaf1
--- /dev/null
+++ b/ansible/roles/application/molecule/default/cleanup.yml
@@ -0,0 +1,6 @@
+---
+- name: Cleanup infra
+ hosts: all
+ ignore_unreachable: true
+ roles:
+ - cleanup-application