Cleanup modify directory

There is no need to let these directories clutter /tmp, unless the
modify tasks fail, then it should be left to allow debugging.

Change-Id: Ie258a997951cc17cee9d7b6978e7ecf53e3cffb6
This commit is contained in:
Steve Baker 2018-09-05 17:18:05 +12:00
parent 821fcbf6c9
commit 96b3971438
3 changed files with 11 additions and 1 deletions

View File

@ -30,7 +30,7 @@
insertafter: "^FROM "
line: "LABEL modified_append_tag={{ modified_append_tag }}"
- name: Modify image
- name: Modify image from {{ modify_dir_path }}
command: "{{ build_commands[container_build_tool] }} --tag {{ target_image | default(source_image) }}{{ modified_append_tag }} --file Dockerfile.modified --network host ./"
become: true
args:

View File

@ -44,3 +44,8 @@
mode: '0555'
- include_tasks: modify_image.yml
- name: Clean modify directory
file:
state: absent
path: "{{ modify_dir_path }}"

View File

@ -69,3 +69,8 @@
mode: '0555'
- include_tasks: modify_image.yml
- name: Clean modify directory
file:
state: absent
path: "{{ modify_dir_path }}"