From cc5f329d332f9b756e6b942339e305f1fff67ffb Mon Sep 17 00:00:00 2001 From: Jaron Rolfe Date: Thu, 19 Oct 2017 21:43:37 -0400 Subject: [PATCH] Explanation for image removal block and idiomatic handling of var that enables it --- installer/image_push/tasks/main.yml | 5 ++++- installer/inventory | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/installer/image_push/tasks/main.yml b/installer/image_push/tasks/main.yml index 111f7e0cd2..a81bdf6644 100644 --- a/installer/image_push/tasks/main.yml +++ b/installer/image_push/tasks/main.yml @@ -1,5 +1,8 @@ --- - name: Remove local images to ensure proper push behavior + # TODO: this code will not be necessary if and when docker_image can be configured to push if the image + # Already exists locally + # Pull request: https://github.com/ansible/ansible/pull/31863 block: - name: Remove web image docker_image: @@ -13,7 +16,7 @@ tag: "{{ awx_version }}" state: absent delegate_to: localhost - when: docker_remove_local_images + when: docker_remove_local_images|default(False) - name: Tag and Push Container Images block: diff --git a/installer/inventory b/installer/inventory index 3e2b987f7a..e09e91f362 100644 --- a/installer/inventory +++ b/installer/inventory @@ -42,7 +42,7 @@ host_port=80 # Docker_image will not attempt to push to remote if the image already exists locally # Set this to true to delete images from docker on the build host so that they are pushed to the remote repository -docker_remove_local_images=False +# docker_remove_local_images=False # Set pg_hostname if you have an external postgres server, otherwise # a new postgres service will be created