Skip to content

Commit

Permalink
add handler to remove outdated image
Browse files Browse the repository at this point in the history
  • Loading branch information
MialLewis committed Dec 15, 2023
1 parent 5afc779 commit 0bbac2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions runner/ansible/roles/runner/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: Remove docker image
community.docker.docker_image:
state: absent
name: vesuvio-runner
8 changes: 2 additions & 6 deletions runner/ansible/roles/runner/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
src: ../docker/runner.Dockerfile
dest: /tmp/runner.Dockerfile
mode: '0755'
notify:
- Remove docker image

- name: Build docker image
community.docker.docker_image:
Expand Down Expand Up @@ -37,9 +39,3 @@
ansible.builtin.file:
path: /tmp/setup.sh
state: absent

- name: Remove dockerfile
ansible.builtin.file:
path: /tmp/runner.Dockerfile
state: absent

0 comments on commit 0bbac2d

Please sign in to comment.