aboutsummaryrefslogtreecommitdiff
path: root/roles/gitlab-runner/templates/cleanup.sh
diff options
context:
space:
mode:
authorDevan Carpenter <git@dvn.me>2020-05-13 18:16:53 +0100
committerDevan Carpenter <git@dvn.me>2020-05-13 18:19:25 +0100
commit69b57fece34a50bb9cf88f45a6be9c81d6edc194 (patch)
tree7da3d59000c12ba15708b604248c9dfa1e29a3dd /roles/gitlab-runner/templates/cleanup.sh
downloadansible-gitlab-runner-69b57fece34a50bb9cf88f45a6be9c81d6edc194.tar.gz
ansible-gitlab-runner-69b57fece34a50bb9cf88f45a6be9c81d6edc194.zip
Initial setup of a gitlab-runner playbook
Diffstat (limited to 'roles/gitlab-runner/templates/cleanup.sh')
-rw-r--r--roles/gitlab-runner/templates/cleanup.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/roles/gitlab-runner/templates/cleanup.sh b/roles/gitlab-runner/templates/cleanup.sh
new file mode 100644
index 0000000..42071b2
--- /dev/null
+++ b/roles/gitlab-runner/templates/cleanup.sh
@@ -0,0 +1,9 @@
1{% include "base.sh" %}
2
3# Destroy VM.
4virsh shutdown "$VM_ID" || true
5
6# Undefine VM.
7virsh undefine "$VM_ID" || true
8
9rm -fv /tmp/${VM_ID}_ed25519 /tmp/${VM_ID}_ed25519.pub ${VM_IMAGES_PATH}/${VM_ID}*