--- # Creates the c3infodesk-proxy docker image - name: PROXY | Check if the image already exists on the system community.docker.docker_image_info: name: "{{ c3infodesk_printer_docker_img_proxy_name }}" register: result_check_image - name: PROXY | Check image exists answer ansible.builtin.debug: msg: "Image already exists on target" when: result_check_image.images | length > 0 - name: PROXY | Build the docker image ansible.builtin.command: cmd: docker build . -t "{{ c3infodesk_printer_docker_img_proxy_name }}":"{{ c3infodesk_printer_docker_img_proxy_tag }}" -f docker/proxy/Dockerfile args: chdir: "{{ c3infodesk_printer_folder }}" register: build_img_result when: result_check_image.images | length <= 0 changed_when: build_img_result.rc != 0 - name: PROXY | DEBUG -> Output from creating the docker image ansible.builtin.debug: msg: "{{ build_img_result }}" when: - c3infodesk_printer_debug_create_image_cups | bool - build_img_result is defined