diff options
author | Devan Carpenter <git@dvn.me> | 2020-05-13 18:16:53 +0100 |
---|---|---|
committer | Devan Carpenter <git@dvn.me> | 2020-05-13 18:19:25 +0100 |
commit | 69b57fece34a50bb9cf88f45a6be9c81d6edc194 (patch) | |
tree | 7da3d59000c12ba15708b604248c9dfa1e29a3dd /roles/gitlab-runner/templates/cleanup.sh | |
download | ansible-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.sh | 9 |
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. | ||
4 | virsh shutdown "$VM_ID" || true | ||
5 | |||
6 | # Undefine VM. | ||
7 | virsh undefine "$VM_ID" || true | ||
8 | |||
9 | rm -fv /tmp/${VM_ID}_ed25519 /tmp/${VM_ID}_ed25519.pub ${VM_IMAGES_PATH}/${VM_ID}* | ||