diff --git a/runner/ansible/roles/runner/handlers/main.yml b/runner/ansible/roles/runner/handlers/main.yml new file mode 100644 index 00000000..2f20d5d7 --- /dev/null +++ b/runner/ansible/roles/runner/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: Remove docker image + community.docker.docker_image: + state: absent + name: vesuvio-runner diff --git a/runner/ansible/roles/runner/tasks/main.yml b/runner/ansible/roles/runner/tasks/main.yml index d79ab466..9e72d95d 100644 --- a/runner/ansible/roles/runner/tasks/main.yml +++ b/runner/ansible/roles/runner/tasks/main.yml @@ -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: @@ -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 - \ No newline at end of file