Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker image is not pushed even with force_source if repository is defined #52

Closed
dp450 opened this issue Dec 22, 2020 · 2 comments · Fixed by #53
Closed

docker image is not pushed even with force_source if repository is defined #52

dp450 opened this issue Dec 22, 2020 · 2 comments · Fixed by #53

Comments

@dp450
Copy link

dp450 commented Dec 22, 2020

SUMMARY

module docker_image is not always pushing when expected.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

docker_image

ANSIBLE VERSION
ansible 2.10.4
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.4 (default, Sep 12 2019, 16:13:12) [GCC 6.3.0 20170516]
CONFIGURATION

this was run, the result is empty

<empty result>
OS / ENVIRONMENT

Dockerfile

FROM python:3-slim-stretch

# downloaded from https://galaxy.ansible.com/download/awx-awx-16.0.0.tar.gz
COPY ./src/awx-awx-16.0.0.tar.gz /root/

RUN pip install --upgrade pip && \
        pip install \
        "ansible>=2.8" \
        ansible-tower-cli \
        ansible-lint \
        "docker>=4.4" \
        PyVmomi \
        requests \
        jmespath \
        jinja2 \
        PyOpenSSL \
        --index-url ${PIP_INDEX} && \
        apt update && \
        apt install vim curl git python-minimal jq -y

WORKDIR /app

CMD [ "/bin/bash" ]

python environment inside container

root@8d29d417e8e5:/start-dir# python
Python 3.7.4 (default, Sep 12 2019, 16:13:12)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> installed_packages = pkg_resources.working_set
>>> installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
...    for i in installed_packages])
>>> print(installed_packages_list)
['ansible-base==2.10.4', 'ansible-lint==4.3.7', 'ansible-tower-cli==3.3.9', 'ansible==2.10.4', 'certifi==2020.12.5', 'cffi==1.14.4', 'chardet==3.0.4', 'click==6.7', 'colorama==0.4.4', 'commonmark==0.9.1', 'cryptography==3.3.1', 'docker==4.4.0', 'idna==2.10', 'jinja2==2.11.2', 'jmespath==0.10.0', 'markupsafe==1.1.1', 'packaging==20.8', 'pip==20.3.3', 'pycparser==2.20', 'pygments==2.7.3', 'pyopenssl==20.0.1', 'pyparsing==2.4.7', 'pyvmomi==7.0.1', 'pyyaml==5.3.1', 'requests==2.25.0', 'rich==9.4.0', 'ruamel.yaml.clib==0.2.2', 'ruamel.yaml==0.16.12', 'setuptools==41.2.0', 'six==1.15.0', 'typing-extensions==3.7.4.3', 'urllib3==1.26.2', 'websocket-client==0.57.0', 'wheel==0.33.6']

start docker command to set up environment vars

sudo docker run -it -v "$(pwd):/start-dir" -w /start-dir --name ansible_container --rm -e "PATH=$(dirname "$(which docker)"):/usr/local/bin:/usr/local/lib/python3.7/site-packages:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -e "PYTHONPATH=/usr/local/lib/python3.7/site-packages" private.registry.com/pythonAnsible:3.0.0 bash
STEPS TO REPRODUCE

vars example

vars:
  registry: registry.private.com
  IMAGE_TARGET: company/image_name
  docker_tag: v1.1.1
  docker_build_path: "{{ playbook_dir }}/../image-root-docker"

bad example: (this is not working as expected)

       - name: build and publish docker image
         docker_image:
           name: "{{ registry }}/{{ IMAGE_TARGET }}"
           tag: "{{ docker_tag }}"
           push: yes
           source: build
           force_source: yes
           state: present
           build:
             dockerfile: "{{ docker_build_path }}/Dockerfile_dyn"
             path: "{{ docker_build_path }}"
             nocache: yes
             pull: yes
           repository: "{{ registry }}/{{ IMAGE_TARGET }}"
           validate_certs: yes

expected result, image built and pushed
actual result image built

diff between bad and good

--- a/tests/build_docker_image.yml
+++ b/tests/build_docker_image.yml
@@ -194,8 +194,7 @@

        - name: build and publish docker image
          docker_image:
-            name: "{{ registry }}/{{ IMAGE_TARGET }}"
-            tag: "{{ docker_tag }}"
+            name: "{{ registry }}/{{ IMAGE_TARGET }}:{{ docker_tag }}"
            push: yes
            source: build
            force_source: yes
@@ -205,7 +204,6 @@
              path: "{{ docker_build_path }}"
              nocache: yes
              pull: yes
-            repository: "{{ registry }}/{{ IMAGE_TARGET }}"
            validate_certs: yes

good example: (this does work as expected)

        - name: build and publish docker image
          docker_image:
            name: "{{ registry }}/{{ IMAGE_TARGET }}:{{ docker_tag }}"
            push: yes
            source: build
            force_source: yes
            state: present
            build:
              dockerfile: "{{ docker_build_path }}/Dockerfile_dyn"
              path: "{{ docker_build_path }}"
              nocache: yes
              pull: yes
            validate_certs: yes

expected result, image built and pushed
actual result image built and pushed

expected result, both should build and publish

has something to do with the logic in this file
https://github.com/ansible-collections/community.docker/blame/main/plugins/modules/docker_image.py

EXPECTED RESULTS

bad example:
expected result: image built and pushed

good example:
expected result: image built and pushed

ACTUAL RESULTS

bad example:
actual result: image built

bad example:

[13:15:36] :	 [Step 6/7] ansible-playbook 2.10.4
[13:15:36] :	 [Step 6/7]   config file = /docker_mounted_dir/ansible.cfg
[13:15:36] :	 [Step 6/7]   configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
[13:15:36] :	 [Step 6/7]   ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
[13:15:36] :	 [Step 6/7]   executable location = /usr/local/bin/ansible-playbook
[13:15:36] :	 [Step 6/7]   python version = 3.7.4 (default, Sep 12 2019, 16:13:12) [GCC 6.3.0 20170516]
[13:15:36] :	 [Step 6/7] Using /docker_mounted_dir/ansible.cfg as config file
...
[13:15:36]W:	 [Step 6/7] [WARNING]: No inventory was parsed, only implicit localhost is available
...
[13:15:36]W:	 [Step 6/7] [WARNING]: provided hosts list is empty, only localhost is available. Note that
[13:15:36]W:	 [Step 6/7] the implicit localhost does not match 'all'
[13:15:36] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_login to community.general.docker_login
[13:15:37] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_image to community.general.docker_image
[13:15:37] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_image to community.general.docker_image
[13:15:37] :	 [Step 6/7] Skipping callback 'default', as we already have a stdout callback.
[13:15:37] :	 [Step 6/7] Skipping callback 'minimal', as we already have a stdout callback.
[13:15:37] :	 [Step 6/7] Skipping callback 'oneline', as we already have a stdout callback.
[13:15:37] :	 [Step 6/7] 
[13:15:37] :	 [Step 6/7] PLAYBOOK: build_docker_image.yml ***********************************************
[13:15:37] :	 [Step 6/7] 1 plays in ./tests/build_docker_image.yml
[13:15:37] :	 [Step 6/7] 
[13:15:37] :	 [Step 6/7] PLAY [localhost] ***************************************************************
[13:15:37] :	 [Step 6/7] 
[13:15:37] :	 [Step 6/7] TASK [Gathering Facts] *********************************************************
[13:15:37] :	 [Step 6/7] task path: /docker_mounted_dir/tests/build_docker_image.yml:2
[13:15:37] :	 [Step 6/7] <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
[13:15:37] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
[13:15:37] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1608660937.143772-10-94736961449845 `" && echo ansible-tmp-1608660937.143772-10-94736961449845="` echo /root/.ansible/tmp/ansible-tmp-1608660937.143772-10-94736961449845 `" ) && sleep 0'
[13:15:37] :	 [Step 6/7] Using module file /usr/local/lib/python3.7/site-packages/ansible/modules/setup.py
[13:15:37] :	 [Step 6/7] <127.0.0.1> PUT /root/.ansible/tmp/ansible-local-1ht0zmp4p/tmpxm6m9g3f TO /root/.ansible/tmp/ansible-tmp-1608660937.143772-10-94736961449845/AnsiballZ_setup.py
[13:15:37] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1608660937.143772-10-94736961449845/ /root/.ansible/tmp/ansible-tmp-1608660937.143772-10-94736961449845/AnsiballZ_setup.py && sleep 0'
[13:15:37] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python /root/.ansible/tmp/ansible-tmp-1608660937.143772-10-94736961449845/AnsiballZ_setup.py && sleep 0'
[13:15:37] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1608660937.143772-10-94736961449845/ > /dev/null 2>&1 && sleep 0'
[13:15:37] :	 [Step 6/7] ok: [localhost]
[13:15:37] :	 [Step 6/7] 
...
[13:15:42] :	 [Step 6/7] TASK [build and publish docker image] ******************************************
[13:15:42] :	 [Step 6/7] task path: /docker_mounted_dir/tests/build_docker_image.yml:195
[13:15:42] :	 [Step 6/7] <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
[13:15:42] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
[13:15:42] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1608660942.367413-186-17327328193177 `" && echo ansible-tmp-1608660942.367413-186-17327328193177="` echo /root/.ansible/tmp/ansible-tmp-1608660942.367413-186-17327328193177 `" ) && sleep 0'
[13:15:42] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_image to community.general.docker_image
[13:15:42] :	 [Step 6/7] Using module file /usr/local/lib/python3.7/site-packages/ansible_collections/community/general/plugins/modules/docker_image.py
[13:15:42] :	 [Step 6/7] <127.0.0.1> PUT /root/.ansible/tmp/ansible-local-1ht0zmp4p/tmppz5m6raa TO /root/.ansible/tmp/ansible-tmp-1608660942.367413-186-17327328193177/AnsiballZ_docker_image.py
[13:15:42] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1608660942.367413-186-17327328193177/ /root/.ansible/tmp/ansible-tmp-1608660942.367413-186-17327328193177/AnsiballZ_docker_image.py && sleep 0'
[13:15:42] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python /root/.ansible/tmp/ansible-tmp-1608660942.367413-186-17327328193177/AnsiballZ_docker_image.py && sleep 0'
[13:15:43] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1608660942.367413-186-17327328193177/ > /dev/null 2>&1 && sleep 0'
[13:15:43] :	 [Step 6/7] changed: [localhost] => {
[13:15:43] :	 [Step 6/7]     "actions": [
[13:15:43] :	 [Step 6/7]         "Built image registry.private.com/company/image_name:v1.1.1 from /docker_mounted_dir/tests/../custom-source-image"
[13:15:43] :	 [Step 6/7]     ],
[13:15:43] :	 [Step 6/7]     "changed": true,
[13:15:43] :	 [Step 6/7]     "image": {
[13:15:43] :	 [Step 6/7]         "Architecture": "amd64",
[13:15:43] :	 [Step 6/7]         "Author": "",
[13:15:43] :	 [Step 6/7]         "Comment": "",
[13:15:43] :	 [Step 6/7]         "Config": {
[13:15:43] :	 [Step 6/7]             "AttachStderr": false,
[13:15:43] :	 [Step 6/7]             "AttachStdin": false,
[13:15:43] :	 [Step 6/7]             "AttachStdout": false,
[13:15:43] :	 [Step 6/7]             "Cmd": [
[13:15:43] :	 [Step 6/7]                 "/usr/local/bin/start-envoy.sh"
[13:15:43] :	 [Step 6/7]             ],
[13:15:43] :	 [Step 6/7]             "Domainname": "",
[13:15:43] :	 [Step 6/7]             "Entrypoint": [
[13:15:43] :	 [Step 6/7]                 "/docker-entrypoint.sh"
[13:15:43] :	 [Step 6/7]             ],
[13:15:43] :	 [Step 6/7]             "Env": [
[13:15:43] :	 [Step 6/7]                 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
[13:15:43] :	 [Step 6/7]                 "LANG=C.UTF-8",
[13:15:43] :	 [Step 6/7]                 "CACERTS=/etc/ca-certificates.conf"
[13:15:43] :	 [Step 6/7]             ],
[13:15:43] :	 [Step 6/7]             "ExposedPorts": {
[13:15:43] :	 [Step 6/7]                 "10000/tcp": {},
[13:15:43] :	 [Step 6/7]                 "9443/tcp": {},
[13:15:43] :	 [Step 6/7]                 "9901/tcp": {}
[13:15:43] :	 [Step 6/7]             },
[13:15:43] :	 [Step 6/7]             "Hostname": "",
[13:15:43] :	 [Step 6/7]             "Image": "sha256:609d8150bec5a056f560941c2fc3ae835d0b69698936a809dbb67fef1d7b1421",
[13:15:43] :	 [Step 6/7]             "Labels": null,
[13:15:43] :	 [Step 6/7]             "OnBuild": [],
[13:15:43] :	 [Step 6/7]             "OpenStdin": false,
[13:15:43] :	 [Step 6/7]             "StdinOnce": false,
[13:15:43] :	 [Step 6/7]             "Tty": false,
[13:15:43] :	 [Step 6/7]             "User": "",
[13:15:43] :	 [Step 6/7]             "Volumes": null,
[13:15:43] :	 [Step 6/7]             "WorkingDir": ""
[13:15:43] :	 [Step 6/7]         },
[13:15:43] :	 [Step 6/7]         "Container": "6f848b54aa2d8c45537a7afc60540d70038612786e752117195bc38460915ffe",
[13:15:43] :	 [Step 6/7]         "ContainerConfig": {
[13:15:43] :	 [Step 6/7]             "AttachStderr": false,
[13:15:43] :	 [Step 6/7]             "AttachStdin": false,
[13:15:43] :	 [Step 6/7]             "AttachStdout": false,
[13:15:43] :	 [Step 6/7]             "Cmd": [
[13:15:43] :	 [Step 6/7]                 "/bin/sh",
[13:15:43] :	 [Step 6/7]                 "-c",
[13:15:43] :	 [Step 6/7]                 "#(nop) ",
[13:15:43] :	 [Step 6/7]                 "CMD [\"/usr/local/bin/start-envoy.sh\"]"
[13:15:43] :	 [Step 6/7]             ],
[13:15:43] :	 [Step 6/7]             "Domainname": "",
[13:15:43] :	 [Step 6/7]             "Entrypoint": [
[13:15:43] :	 [Step 6/7]                 "/docker-entrypoint.sh"
[13:15:43] :	 [Step 6/7]             ],
[13:15:43] :	 [Step 6/7]             "Env": [
[13:15:43] :	 [Step 6/7]                 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
[13:15:43] :	 [Step 6/7]                 "LANG=C.UTF-8",
[13:15:43] :	 [Step 6/7]                 "CACERTS=/etc/ca-certificates.conf"
[13:15:43] :	 [Step 6/7]             ],
[13:15:43] :	 [Step 6/7]             "ExposedPorts": {
[13:15:43] :	 [Step 6/7]                 "10000/tcp": {},
[13:15:43] :	 [Step 6/7]                 "9443/tcp": {},
[13:15:43] :	 [Step 6/7]                 "9901/tcp": {}
[13:15:43] :	 [Step 6/7]             },
[13:15:43] :	 [Step 6/7]             "Hostname": "6f848b54aa2d",
[13:15:43] :	 [Step 6/7]             "Image": "sha256:609d8150bec5a056f560941c2fc3ae835d0b69698936a809dbb67fef1d7b1421",
[13:15:43] :	 [Step 6/7]             "Labels": {},
[13:15:43] :	 [Step 6/7]             "OnBuild": [],
[13:15:43] :	 [Step 6/7]             "OpenStdin": false,
[13:15:43] :	 [Step 6/7]             "StdinOnce": false,
[13:15:43] :	 [Step 6/7]             "Tty": false,
[13:15:43] :	 [Step 6/7]             "User": "",
[13:15:43] :	 [Step 6/7]             "Volumes": null,
[13:15:43] :	 [Step 6/7]             "WorkingDir": ""
[13:15:43] :	 [Step 6/7]         },
[13:15:43] :	 [Step 6/7]         "Created": "2020-12-22T18:15:43.719982534Z",
[13:15:43] :	 [Step 6/7]         "DockerVersion": "19.03.13",
[13:15:43] :	 [Step 6/7]         "GraphDriver": {
[13:15:43] :	 [Step 6/7]             "Data": {
[13:15:43] :	 [Step 6/7]                 "LowerDir": "/alm/tools/docker/overlay2/ff6b8ef0bc05e3a57f97461fb01aa153c813013f046b2d7bc7f265262b0e67e7/diff:/alm/tools/docker/overlay2/df6ab44344c8c9e8e5af10b51c168bc953e90e7ced6379dda324b56a08513f5e/diff:/alm/tools/docker/overlay2/dcbee8e28cb8313a4af827d20f89197a43f411b31b043ca2829c6a7f439a9206/diff:/alm/tools/docker/overlay2/e7c25400037450f95819cc9a7b509e27b43990dd425eecb8ce4ec84b7c6a8d47/diff:/alm/tools/docker/overlay2/534d6ed07955c9556c8f999d72cb3a23d4f03642e5fdeadb969bb88ba3522f79/diff:/alm/tools/docker/overlay2/0608f2bda1ffd18a6d57f0eb462b1682fb730fa5bec6b7f4454dc065d93fd7f1/diff:/alm/tools/docker/overlay2/5d61957ef1d4936d5815d3ff2d196f8e8383fb27fbc3586a3533d1a466308a71/diff:/alm/tools/docker/overlay2/39f47d4b9cc8397885fc9b2d14757c5d2afc6313a8a13ce2c5bf4dbb4bf2a689/diff:/alm/tools/docker/overlay2/9c6be78264e631537d4fdd7292834e32b6fb01ed9370419aa321804daddc5cb7/diff:/alm/tools/docker/overlay2/4b7bfa3cf6e8c30d3aab150db33d35592b962aef8a93d6e1b262d2b9051d0c57/diff:/alm/tools/docker/overlay2/4e52ea1b4c3b9ae2be3890ea6b98b17ca23c0c28fc94ad41671afff95a3f42a0/diff:/alm/tools/docker/overlay2/dbaa11dab9f45877ab251139008ecb9246eb889d21162f03ed625046a493edcd/diff:/alm/tools/docker/overlay2/714ee5adfc4107ceed5928deb3fba552dbc7612eaa3d9635dd292ffa0fa7a075/diff:/alm/tools/docker/overlay2/d64cc43bb8547d7c163532f2bfe456130e0cc340fdcf3481814302a0abebc8d6/diff:/alm/tools/docker/overlay2/3ba11b89aa9476d213f3afdb335966ed93df2207a50b6ecefcbd666771064fa4/diff:/alm/tools/docker/overlay2/ebdc9ba024454ca7cdc97991840bd67f9d6daa2831b654f46d4dbb95f6c5e7f4/diff:/alm/tools/docker/overlay2/393cd0f7f28b22344e8a6ce12525af07d530642e82b202922a216dcfb19da5cb/diff:/alm/tools/docker/overlay2/29faf0a4e4c74e31295bf7fe04a51ea27c69f7f7914979baf8a45cc1f2d9bc41/diff:/alm/tools/docker/overlay2/d9deb0e9477c6cd0932df91cab8ba520485f94c3a7b19212ad7c7b86af8834d8/diff:/alm/tools/docker/overlay2/4139ab0a621d5057c5bd3333769778c4a906669af049ea9ea81c6275e5aaad18/diff",
[13:15:43] :	 [Step 6/7]                 "MergedDir": "/alm/tools/docker/overlay2/8db35ca54c702b99dd2a162c1b41f4b40ce601cbb21c904752e5510790bafee3/merged",
[13:15:43] :	 [Step 6/7]                 "UpperDir": "/alm/tools/docker/overlay2/8db35ca54c702b99dd2a162c1b41f4b40ce601cbb21c904752e5510790bafee3/diff",
[13:15:43] :	 [Step 6/7]                 "WorkDir": "/alm/tools/docker/overlay2/8db35ca54c702b99dd2a162c1b41f4b40ce601cbb21c904752e5510790bafee3/work"
[13:15:43] :	 [Step 6/7]             },
[13:15:43] :	 [Step 6/7]             "Name": "overlay2"
[13:15:43] :	 [Step 6/7]         },
[13:15:43] :	 [Step 6/7]         "Id": "sha256:d6e1944ae56d821b898491a20a5d47726d344b8031ded267cfa52922a7c27ab0",
[13:15:43] :	 [Step 6/7]         "Metadata": {
[13:15:43] :	 [Step 6/7]             "LastTagTime": "2020-12-22T18:15:43.74982135Z"
[13:15:43] :	 [Step 6/7]         },
[13:15:43] :	 [Step 6/7]         "Os": "linux",
[13:15:43] :	 [Step 6/7]         "Parent": "sha256:609d8150bec5a056f560941c2fc3ae835d0b69698936a809dbb67fef1d7b1421",
[13:15:43] :	 [Step 6/7]         "RepoDigests": [],
[13:15:43] :	 [Step 6/7]         "RepoTags": [
[13:15:43] :	 [Step 6/7]             "registry.private.com/company/image_name:v1.1.1"
[13:15:43] :	 [Step 6/7]         ],
[13:15:43] :	 [Step 6/7]         "RootFS": {
[13:15:43] :	 [Step 6/7]             "Layers": [
[13:15:43] :	 [Step 6/7]                 "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0",
[13:15:43] :	 [Step 6/7]                 "sha256:72141efcbb0ef4e6479696bc5dcd6e0173930dbae330cd680231dd46268122e6",
[13:15:43] :	 [Step 6/7]                 "sha256:830ad801c9a0d74dfe102cf5956241b431c2dfa238593bc9b6d1f5991563099c",
[13:15:43] :	 [Step 6/7]                 "sha256:d8c75dccc885d121cc10e91303ed494e906563f846c7b2cbc1d400ed202bbbb2",
[13:15:43] :	 [Step 6/7]                 "sha256:fad53aacd01e044cc420caf2f4342700bb6fabf8c242eef8c8c34a0f12a27359",
[13:15:43] :	 [Step 6/7]                 "sha256:345f5d6b2fccf62a4b96a82c2bac5f0cfddbce47e5b55daf5e614ece059ea362",
[13:15:43] :	 [Step 6/7]                 "sha256:564c3f562b445ee51de661cb233e748e9a05dd820b9ee2935b7b40966bd42538",
[13:15:43] :	 [Step 6/7]                 "sha256:5553792118c44a11e420ad5a9f8c29c824331da0930111f3a9c76435acb3da0d",
[13:15:43] :	 [Step 6/7]                 "sha256:274fa95a933ab55a46437d24f187b7aace238b3732e900fe53bca19b352f0a71",
[13:15:43] :	 [Step 6/7]                 "sha256:78e05595a3e0bb84e151f95e5b12f1d260cde27d6f659a113499322d439b465a",
[13:15:43] :	 [Step 6/7]                 "sha256:67bf10cab59d27b7c65c8f1b4e63207fd73a6d51f24d9ce86330f550cc871dcc",
[13:15:43] :	 [Step 6/7]                 "sha256:c744bdcd01cc75336878f719fc508764b42165cb8ff19174fe4dce7bc58defee",
[13:15:43] :	 [Step 6/7]                 "sha256:efc6faabc7c8573c163fecc47774d3776c8c4810e04b688f93b9d878074d3ef4",
[13:15:43] :	 [Step 6/7]                 "sha256:b3002dad897c50818941402e257b54aeda3804ef9957c1cf06a2855f3a9d3342",
[13:15:43] :	 [Step 6/7]                 "sha256:7fa3c3109bb03ddad37b9dd3f242bf6a36b5f29fd1ae55b197699c5bf32fba01",
[13:15:43] :	 [Step 6/7]                 "sha256:a9d8893328e7e139cfc61d7302352da1435df346753f7975a905ae70e69a7144",
[13:15:43] :	 [Step 6/7]                 "sha256:b8dea01946c43693ab7adbbbb76ee135f97429ed85a7d4769df6b58b5d32a823",
[13:15:43] :	 [Step 6/7]                 "sha256:6ca9d80cd624fc7ab1d8800bf675678933eb990140150c8aa772c4bad61a48c1",
[13:15:43] :	 [Step 6/7]                 "sha256:d0ddf726d4323757e968d8a818596c16e7ce92b3a9525c9f2f0f3742406bdf0f",
[13:15:43] :	 [Step 6/7]                 "sha256:20852061749720cff8baeb9f16af378bf2cc9608b196337cf63f12cb4b4e058f",
[13:15:43] :	 [Step 6/7]                 "sha256:1c00749539aee43d66b84182f17c5afb02a29df1b3dfa307633fa9c5b351bf0d"
[13:15:43] :	 [Step 6/7]             ],
[13:15:43] :	 [Step 6/7]             "Type": "layers"
[13:15:43] :	 [Step 6/7]         },
[13:15:43] :	 [Step 6/7]         "Size": 47021769,
[13:15:43] :	 [Step 6/7]         "VirtualSize": 47021769
[13:15:43] :	 [Step 6/7]     },
[13:15:43] :	 [Step 6/7]     "invocation": {
[13:15:43] :	 [Step 6/7]         "module_args": {
[13:15:43] :	 [Step 6/7]             "api_version": "auto",
[13:15:43] :	 [Step 6/7]             "archive_path": null,
[13:15:43] :	 [Step 6/7]             "build": {
[13:15:43] :	 [Step 6/7]                 "args": null,
[13:15:43] :	 [Step 6/7]                 "cache_from": null,
[13:15:43] :	 [Step 6/7]                 "container_limits": null,
[13:15:43] :	 [Step 6/7]                 "dockerfile": "/docker_mounted_dir/tests/../custom-source-image/Dockerfile_dyn",
[13:15:43] :	 [Step 6/7]                 "etc_hosts": null,
[13:15:43] :	 [Step 6/7]                 "http_timeout": null,
[13:15:43] :	 [Step 6/7]                 "network": null,
[13:15:43] :	 [Step 6/7]                 "nocache": true,
[13:15:43] :	 [Step 6/7]                 "path": "/docker_mounted_dir/tests/../custom-source-image",
[13:15:43] :	 [Step 6/7]                 "pull": true,
[13:15:43] :	 [Step 6/7]                 "rm": true,
[13:15:43] :	 [Step 6/7]                 "target": null,
[13:15:43] :	 [Step 6/7]                 "use_config_proxy": null
[13:15:43] :	 [Step 6/7]             },
[13:15:43] :	 [Step 6/7]             "buildargs": null,
[13:15:43] :	 [Step 6/7]             "ca_cert": null,
[13:15:43] :	 [Step 6/7]             "client_cert": null,
[13:15:43] :	 [Step 6/7]             "client_key": null,
[13:15:43] :	 [Step 6/7]             "container_limits": null,
[13:15:43] :	 [Step 6/7]             "debug": false,
[13:15:43] :	 [Step 6/7]             "docker_host": "unix://var/run/docker.sock",
[13:15:43] :	 [Step 6/7]             "dockerfile": null,
[13:15:43] :	 [Step 6/7]             "force": null,
[13:15:43] :	 [Step 6/7]             "force_absent": false,
[13:15:43] :	 [Step 6/7]             "force_source": true,
[13:15:43] :	 [Step 6/7]             "force_tag": false,
[13:15:43] :	 [Step 6/7]             "http_timeout": null,
[13:15:43] :	 [Step 6/7]             "load_path": null,
[13:15:43] :	 [Step 6/7]             "name": "registry.private.com/company/image_name",
[13:15:43] :	 [Step 6/7]             "nocache": false,
[13:15:43] :	 [Step 6/7]             "path": null,
[13:15:43] :	 [Step 6/7]             "pull": null,
[13:15:43] :	 [Step 6/7]             "push": true,
[13:15:43] :	 [Step 6/7]             "repository": "registry.private.com/company/image_name",
[13:15:43] :	 [Step 6/7]             "rm": true,
[13:15:43] :	 [Step 6/7]             "source": "build",
[13:15:43] :	 [Step 6/7]             "ssl_version": null,
[13:15:43] :	 [Step 6/7]             "state": "present",
[13:15:43] :	 [Step 6/7]             "tag": "v1.1.1",
[13:15:43] :	 [Step 6/7]             "timeout": 60,
[13:15:43] :	 [Step 6/7]             "tls": false,
[13:15:43] :	 [Step 6/7]             "tls_hostname": "localhost",
[13:15:43] :	 [Step 6/7]             "use_tls": null,
[13:15:43] :	 [Step 6/7]             "validate_certs": true
[13:15:43] :	 [Step 6/7]         }
[13:15:43] :	 [Step 6/7]     },
[13:15:43] :	 [Step 6/7]     "stdout": "Step 1/3 : FROM registry.private.com/private_repo_name/envoy-alpine:v1.12.0_1.0.6\n\n\nPulling from private_repo_name/envoy-alpine\nDigest: sha256:1c45fabb49eddf860fb03b8eea87999b785585df7c67796d983b5dcc7e55c5de\nStatus: Image is up to date for registry.private.com/private_repo_name/envoy-alpine:v1.12.0_1.0.6\n ---> 77a5b6fce6df\n\nStep 2/3 : ADD src/envoy.yaml /etc/envoy/envoy.yaml\n\n\n ---> 609d8150bec5\n\nStep 3/3 : CMD [\"/usr/local/bin/start-envoy.sh\"]\n\n\n ---> Running in 6f848b54aa2d\n\nRemoving intermediate container 6f848b54aa2d\n\n ---> d6e1944ae56d\n\nSuccessfully built d6e1944ae56d\n\nSuccessfully tagged registry.private.com/company/image_name:v1.1.1\n",
[13:15:43] :	 [Step 6/7]     "stdout_lines": [
[13:15:43] :	 [Step 6/7]         "Step 1/3 : FROM registry.private.com/private_repo_name/envoy-alpine:v1.12.0_1.0.6",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "Pulling from private_repo_name/envoy-alpine",
[13:15:43] :	 [Step 6/7]         "Digest: sha256:1c45fabb49eddf860fb03b8eea87999b785585df7c67796d983b5dcc7e55c5de",
[13:15:43] :	 [Step 6/7]         "Status: Image is up to date for registry.private.com/private_repo_name/envoy-alpine:v1.12.0_1.0.6",
[13:15:43] :	 [Step 6/7]         " ---> 77a5b6fce6df",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "Step 2/3 : ADD src/envoy.yaml /etc/envoy/envoy.yaml",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         " ---> 609d8150bec5",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "Step 3/3 : CMD [\"/usr/local/bin/start-envoy.sh\"]",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         " ---> Running in 6f848b54aa2d",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "Removing intermediate container 6f848b54aa2d",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         " ---> d6e1944ae56d",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "Successfully built d6e1944ae56d",
[13:15:43] :	 [Step 6/7]         "",
[13:15:43] :	 [Step 6/7]         "Successfully tagged registry.private.com/company/image_name:v1.1.1"
[13:15:43] :	 [Step 6/7]     ]
[13:15:43] :	 [Step 6/7] }
[13:15:43] :	 [Step 6/7]
...
[13:15:44] :	 [Step 6/7] META: ran handlers
[13:15:44] :	 [Step 6/7] META: ran handlers
[13:15:44] :	 [Step 6/7] 
[13:15:44] :	 [Step 6/7] PLAY RECAP *********************************************************************
[13:15:44] :	 [Step 6/7] localhost                  : ok=10   changed=4    unreachable=0    failed=0    skipped=6    rescued=0    ignored=0   
[13:15:44] :	 [Step 6/7] 
[13:15:44] :	 [Step 6/7] publish_docker_exit_code=0, 0 can mean it already exists or it was successfully created and published
[13:15:44] :	 [Step 6/7] exit_build_publish_docker_image=0

good example:
actual result: image built and pushed

[13:41:00] :	 [Step 6/7] ansible-playbook 2.10.4
[13:41:00] :	 [Step 6/7]   config file = /docker_mounted_dir/ansible.cfg
[13:41:00] :	 [Step 6/7]   configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
[13:41:00] :	 [Step 6/7]   ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
[13:41:00] :	 [Step 6/7]   executable location = /usr/local/bin/ansible-playbook
[13:41:00] :	 [Step 6/7]   python version = 3.7.4 (default, Sep 12 2019, 16:13:12) [GCC 6.3.0 20170516]
[13:41:00] :	 [Step 6/7] Using /docker_mounted_dir/ansible.cfg as config file
[13:41:00]W:	 [Step 6/7] [WARNING]: Unable to parse /docker_mounted_dir/development as an inventory
[13:41:00]W:	 [Step 6/7] source
[13:41:00]W:	 [Step 6/7] [WARNING]: No inventory was parsed, only implicit localhost is available
...
[13:41:00]W:	 [Step 6/7] [WARNING]: provided hosts list is empty, only localhost is available. Note that
[13:41:00]W:	 [Step 6/7] the implicit localhost does not match 'all'
[13:41:00] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_login to community.general.docker_login
[13:41:01] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_image to community.general.docker_image
[13:41:01] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_image to community.general.docker_image
[13:41:01] :	 [Step 6/7] Skipping callback 'default', as we already have a stdout callback.
[13:41:01] :	 [Step 6/7] Skipping callback 'minimal', as we already have a stdout callback.
[13:41:01] :	 [Step 6/7] Skipping callback 'oneline', as we already have a stdout callback.
[13:41:01] :	 [Step 6/7] 
[13:41:01] :	 [Step 6/7] PLAYBOOK: build_docker_image.yml ***********************************************
[13:41:01] :	 [Step 6/7] 1 plays in ./tests/build_docker_image.yml
[13:41:01] :	 [Step 6/7] 
[13:41:01] :	 [Step 6/7] PLAY [localhost] ***************************************************************
[13:41:01] :	 [Step 6/7] 
[13:41:01] :	 [Step 6/7] TASK [Gathering Facts] *********************************************************
[13:41:01] :	 [Step 6/7] task path: /docker_mounted_dir/tests/build_docker_image.yml:2
[13:41:01] :	 [Step 6/7] <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
[13:41:01] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
[13:41:01] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1608662461.1965337-10-155775219973169 `" && echo ansible-tmp-1608662461.1965337-10-155775219973169="` echo /root/.ansible/tmp/ansible-tmp-1608662461.1965337-10-155775219973169 `" ) && sleep 0'
[13:41:01] :	 [Step 6/7] Using module file /usr/local/lib/python3.7/site-packages/ansible/modules/setup.py
[13:41:01] :	 [Step 6/7] <127.0.0.1> PUT /root/.ansible/tmp/ansible-local-1junil8hs/tmpx_j4_80x TO /root/.ansible/tmp/ansible-tmp-1608662461.1965337-10-155775219973169/AnsiballZ_setup.py
[13:41:01] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1608662461.1965337-10-155775219973169/ /root/.ansible/tmp/ansible-tmp-1608662461.1965337-10-155775219973169/AnsiballZ_setup.py && sleep 0'
[13:41:01] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python /root/.ansible/tmp/ansible-tmp-1608662461.1965337-10-155775219973169/AnsiballZ_setup.py && sleep 0'
[13:41:01] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1608662461.1965337-10-155775219973169/ > /dev/null 2>&1 && sleep 0'
[13:41:02] :	 [Step 6/7] ok: [localhost]
[13:41:02] :	 [Step 6/7] 
...
[13:41:11] :	 [Step 6/7] TASK [build and publish docker image] ******************************************
[13:41:11] :	 [Step 6/7] task path: /docker_mounted_dir/tests/build_docker_image.yml:195
[13:41:11] :	 [Step 6/7] <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
[13:41:11] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
[13:41:11] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1608662471.8859193-186-16764199043245 `" && echo ansible-tmp-1608662471.8859193-186-16764199043245="` echo /root/.ansible/tmp/ansible-tmp-1608662471.8859193-186-16764199043245 `" ) && sleep 0'
[13:41:11] :	 [Step 6/7] redirecting (type: modules) ansible.builtin.docker_image to community.general.docker_image
[13:41:11] :	 [Step 6/7] Using module file /usr/local/lib/python3.7/site-packages/ansible_collections/community/general/plugins/modules/docker_image.py
[13:41:11] :	 [Step 6/7] <127.0.0.1> PUT /root/.ansible/tmp/ansible-local-1junil8hs/tmpaajumm8v TO /root/.ansible/tmp/ansible-tmp-1608662471.8859193-186-16764199043245/AnsiballZ_docker_image.py
[13:41:11] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1608662471.8859193-186-16764199043245/ /root/.ansible/tmp/ansible-tmp-1608662471.8859193-186-16764199043245/AnsiballZ_docker_image.py && sleep 0'
[13:41:11] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python /root/.ansible/tmp/ansible-tmp-1608662471.8859193-186-16764199043245/AnsiballZ_docker_image.py && sleep 0'
[13:41:16] :	 [Step 6/7] <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1608662471.8859193-186-16764199043245/ > /dev/null 2>&1 && sleep 0'
[13:41:16] :	 [Step 6/7] changed: [localhost] => {
[13:41:16] :	 [Step 6/7]     "actions": [
[13:41:16] :	 [Step 6/7]         "Built image registry.private.com/company/image_name:v1.1.1 from /docker_mounted_dir/tests/../envoy-docker",
[13:41:16] :	 [Step 6/7]         "Pushed image registry.private.com/company/image_name to registry.private.com/company/image_name:v1.1.1"
[13:41:16] :	 [Step 6/7]     ],
[13:41:16] :	 [Step 6/7]     "changed": true,
[13:41:16] :	 [Step 6/7]     "image": {
[13:41:16] :	 [Step 6/7]         "Architecture": "amd64",
[13:41:16] :	 [Step 6/7]         "Author": "",
[13:41:16] :	 [Step 6/7]         "Comment": "",
[13:41:16] :	 [Step 6/7]         "Config": {
[13:41:16] :	 [Step 6/7]             "AttachStderr": false,
[13:41:16] :	 [Step 6/7]             "AttachStdin": false,
[13:41:16] :	 [Step 6/7]             "AttachStdout": false,
[13:41:16] :	 [Step 6/7]             "Cmd": [
[13:41:16] :	 [Step 6/7]                 "/usr/local/bin/start-envoy.sh"
[13:41:16] :	 [Step 6/7]             ],
[13:41:16] :	 [Step 6/7]             "Domainname": "",
[13:41:16] :	 [Step 6/7]             "Entrypoint": [
[13:41:16] :	 [Step 6/7]                 "/docker-entrypoint.sh"
[13:41:16] :	 [Step 6/7]             ],
[13:41:16] :	 [Step 6/7]             "Env": [
[13:41:16] :	 [Step 6/7]                 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
[13:41:16] :	 [Step 6/7]                 "LANG=C.UTF-8",
[13:41:16] :	 [Step 6/7]                 "CACERTS=/etc/ca-certificates.conf"
[13:41:16] :	 [Step 6/7]             ],
[13:41:16] :	 [Step 6/7]             "ExposedPorts": {
[13:41:16] :	 [Step 6/7]                 "10000/tcp": {},
[13:41:16] :	 [Step 6/7]                 "9443/tcp": {},
[13:41:16] :	 [Step 6/7]                 "9901/tcp": {}
[13:41:16] :	 [Step 6/7]             },
[13:41:16] :	 [Step 6/7]             "Hostname": "",
[13:41:16] :	 [Step 6/7]             "Image": "sha256:68a21561cf3b82d1b7a9da6adb1aba61f54a2e175f729371c722eac07e909682",
[13:41:16] :	 [Step 6/7]             "Labels": null,
[13:41:16] :	 [Step 6/7]             "OnBuild": [],
[13:41:16] :	 [Step 6/7]             "OpenStdin": false,
[13:41:16] :	 [Step 6/7]             "StdinOnce": false,
[13:41:16] :	 [Step 6/7]             "Tty": false,
[13:41:16] :	 [Step 6/7]             "User": "",
[13:41:16] :	 [Step 6/7]             "Volumes": null,
[13:41:16] :	 [Step 6/7]             "WorkingDir": ""
[13:41:16] :	 [Step 6/7]         },
[13:41:16] :	 [Step 6/7]         "Container": "747be14e1f15897c4dee745e559bd08d2ffc17f1d674b55f8adc92335dff4a44",
[13:41:16] :	 [Step 6/7]         "ContainerConfig": {
[13:41:16] :	 [Step 6/7]             "AttachStderr": false,
[13:41:16] :	 [Step 6/7]             "AttachStdin": false,
[13:41:16] :	 [Step 6/7]             "AttachStdout": false,
[13:41:16] :	 [Step 6/7]             "Cmd": [
[13:41:16] :	 [Step 6/7]                 "/bin/sh",
[13:41:16] :	 [Step 6/7]                 "-c",
[13:41:16] :	 [Step 6/7]                 "#(nop) ",
[13:41:16] :	 [Step 6/7]                 "CMD [\"/usr/local/bin/start-envoy.sh\"]"
[13:41:16] :	 [Step 6/7]             ],
[13:41:16] :	 [Step 6/7]             "Domainname": "",
[13:41:16] :	 [Step 6/7]             "Entrypoint": [
[13:41:16] :	 [Step 6/7]                 "/docker-entrypoint.sh"
[13:41:16] :	 [Step 6/7]             ],
[13:41:16] :	 [Step 6/7]             "Env": [
[13:41:16] :	 [Step 6/7]                 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
[13:41:16] :	 [Step 6/7]                 "LANG=C.UTF-8",
[13:41:16] :	 [Step 6/7]                 "CACERTS=/etc/ca-certificates.conf"
[13:41:16] :	 [Step 6/7]             ],
[13:41:16] :	 [Step 6/7]             "ExposedPorts": {
[13:41:16] :	 [Step 6/7]                 "10000/tcp": {},
[13:41:16] :	 [Step 6/7]                 "9443/tcp": {},
[13:41:16] :	 [Step 6/7]                 "9901/tcp": {}
[13:41:16] :	 [Step 6/7]             },
[13:41:16] :	 [Step 6/7]             "Hostname": "747be14e1f15",
[13:41:16] :	 [Step 6/7]             "Image": "sha256:68a21561cf3b82d1b7a9da6adb1aba61f54a2e175f729371c722eac07e909682",
[13:41:16] :	 [Step 6/7]             "Labels": {},
[13:41:16] :	 [Step 6/7]             "OnBuild": [],
[13:41:16] :	 [Step 6/7]             "OpenStdin": false,
[13:41:16] :	 [Step 6/7]             "StdinOnce": false,
[13:41:16] :	 [Step 6/7]             "Tty": false,
[13:41:16] :	 [Step 6/7]             "User": "",
[13:41:16] :	 [Step 6/7]             "Volumes": null,
[13:41:16] :	 [Step 6/7]             "WorkingDir": ""
[13:41:16] :	 [Step 6/7]         },
[13:41:16] :	 [Step 6/7]         "Created": "2020-12-22T18:41:13.252602766Z",
[13:41:16] :	 [Step 6/7]         "DockerVersion": "19.03.13",
[13:41:16] :	 [Step 6/7]         "GraphDriver": {
[13:41:16] :	 [Step 6/7]             "Data": {
[13:41:16] :	 [Step 6/7]                 "LowerDir": "/alm/tools/docker/overlay2/d7e86b690cce0c809782575c61d6b5427c5c90293ce4d6b5a16781924190a48f/diff:/alm/tools/docker/overlay2/2ce3f46ce2d33e6b71ff5a1b13bdfd603be36413430b15b3b6597db5538b7899/diff:/alm/tools/docker/overlay2/d58b6ddc073ae1c3f7d9ae424094ad5806d3246b64cf3c7a96313097f018ea8b/diff:/alm/tools/docker/overlay2/e5200df6677626ca9641376f153da870ed7233c57d3fb06752ab2456dfdf5780/diff:/alm/tools/docker/overlay2/827b7aea12312d2b214ba31d8260b586570b6dd9235f675308355ae11f23adc6/diff:/alm/tools/docker/overlay2/337efa94ffc839949a303d987eee110fdbcea73d5628d98e4f851cffbbb1b56d/diff:/alm/tools/docker/overlay2/259f4fa8d8cf06db38357830b3455fdd5d4a63ed851b8edc46a7dbf2ababa92e/diff:/alm/tools/docker/overlay2/cab20564f5a2f514f9752de81e640a08ea259d41c17316eeff64202ec3de035c/diff:/alm/tools/docker/overlay2/60fd523c78c297f3b4f440d35670743c2e35ac92ac0ad1c2bbde0fdea10d6f90/diff:/alm/tools/docker/overlay2/5c53cfb88909aea1b6bf3b3d17bb15b25e5bc45b59ced9e2d7b294d1087aa53f/diff:/alm/tools/docker/overlay2/6ff3d8d18cf7806d4e5aa7c9e1ac13048aa75f0b6f1596586bf672c9a0ac4223/diff:/alm/tools/docker/overlay2/3fde585dfa6b25adc5874bc1fa5b2937e844be3fa67203215c2af071e1146116/diff:/alm/tools/docker/overlay2/c85e1b1c80c0acd551f7641fabd5e61acc254d94123f93f9ef36f78ad6aebf6d/diff:/alm/tools/docker/overlay2/2ec447012d6bbb440b2f15a3869074dd503edfc3d9b22e3d8b721ecb85c3c102/diff:/alm/tools/docker/overlay2/80a1965e59fad4ffcfc962f825ae159617ba9789552dd3b56ce6ee4a9136a05b/diff:/alm/tools/docker/overlay2/ef6e14f029f8e8f0998af2a3d28448706839382b0c5419ae97b4a1baf22583e5/diff:/alm/tools/docker/overlay2/c8b0449778a72047dab6a473af8d1e2f7a9faf5cb317b12c0740b1cfe750103c/diff:/alm/tools/docker/overlay2/f8e71c31e714d1696a12b3f3fb84609259482893b8dfc2c4534274c037cecf65/diff:/alm/tools/docker/overlay2/f29764ce5d9fa363b5b41a77231f6f4598d7e1100e109c0123eb83f5af60836f/diff:/alm/tools/docker/overlay2/470d971106f7af57d012dce6f11995d7bce74c86bb5643c2812dcddff1ccec52/diff",
[13:41:16] :	 [Step 6/7]                 "MergedDir": "/alm/tools/docker/overlay2/5051ec72a907ca1322bce11b63d02f500f9baaeff318504ab53f004f1851fba7/merged",
[13:41:16] :	 [Step 6/7]                 "UpperDir": "/alm/tools/docker/overlay2/5051ec72a907ca1322bce11b63d02f500f9baaeff318504ab53f004f1851fba7/diff",
[13:41:16] :	 [Step 6/7]                 "WorkDir": "/alm/tools/docker/overlay2/5051ec72a907ca1322bce11b63d02f500f9baaeff318504ab53f004f1851fba7/work"
[13:41:16] :	 [Step 6/7]             },
[13:41:16] :	 [Step 6/7]             "Name": "overlay2"
[13:41:16] :	 [Step 6/7]         },
[13:41:16] :	 [Step 6/7]         "Id": "sha256:c24335c8cbf6b9ab0c926b04e39dd07eae325154dd7b044bccedfd935257981c",
[13:41:16] :	 [Step 6/7]         "Metadata": {
[13:41:16] :	 [Step 6/7]             "LastTagTime": "2020-12-22T18:41:13.290090938Z"
[13:41:16] :	 [Step 6/7]         },
[13:41:16] :	 [Step 6/7]         "Os": "linux",
[13:41:16] :	 [Step 6/7]         "Parent": "sha256:68a21561cf3b82d1b7a9da6adb1aba61f54a2e175f729371c722eac07e909682",
[13:41:16] :	 [Step 6/7]         "RepoDigests": [
[13:41:16] :	 [Step 6/7]             "registry.private.com/company/image_name@sha256:f4bb1026507829ffb47a926caa0bda62c5ebb80153ec7bd5335ee5be04dde4b9"
[13:41:16] :	 [Step 6/7]         ],
[13:41:16] :	 [Step 6/7]         "RepoTags": [
[13:41:16] :	 [Step 6/7]             "registry.private.com/company/image_name:v1.1.1"
[13:41:16] :	 [Step 6/7]         ],
[13:41:16] :	 [Step 6/7]         "RootFS": {
[13:41:16] :	 [Step 6/7]             "Layers": [
[13:41:16] :	 [Step 6/7]                 "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0",
[13:41:16] :	 [Step 6/7]                 "sha256:72141efcbb0ef4e6479696bc5dcd6e0173930dbae330cd680231dd46268122e6",
[13:41:16] :	 [Step 6/7]                 "sha256:830ad801c9a0d74dfe102cf5956241b431c2dfa238593bc9b6d1f5991563099c",
[13:41:16] :	 [Step 6/7]                 "sha256:d8c75dccc885d121cc10e91303ed494e906563f846c7b2cbc1d400ed202bbbb2",
[13:41:16] :	 [Step 6/7]                 "sha256:fad53aacd01e044cc420caf2f4342700bb6fabf8c242eef8c8c34a0f12a27359",
[13:41:16] :	 [Step 6/7]                 "sha256:345f5d6b2fccf62a4b96a82c2bac5f0cfddbce47e5b55daf5e614ece059ea362",
[13:41:16] :	 [Step 6/7]                 "sha256:564c3f562b445ee51de661cb233e748e9a05dd820b9ee2935b7b40966bd42538",
[13:41:16] :	 [Step 6/7]                 "sha256:5553792118c44a11e420ad5a9f8c29c824331da0930111f3a9c76435acb3da0d",
[13:41:16] :	 [Step 6/7]                 "sha256:274fa95a933ab55a46437d24f187b7aace238b3732e900fe53bca19b352f0a71",
[13:41:16] :	 [Step 6/7]                 "sha256:78e05595a3e0bb84e151f95e5b12f1d260cde27d6f659a113499322d439b465a",
[13:41:16] :	 [Step 6/7]                 "sha256:67bf10cab59d27b7c65c8f1b4e63207fd73a6d51f24d9ce86330f550cc871dcc",
[13:41:16] :	 [Step 6/7]                 "sha256:c744bdcd01cc75336878f719fc508764b42165cb8ff19174fe4dce7bc58defee",
[13:41:16] :	 [Step 6/7]                 "sha256:efc6faabc7c8573c163fecc47774d3776c8c4810e04b688f93b9d878074d3ef4",
[13:41:16] :	 [Step 6/7]                 "sha256:b3002dad897c50818941402e257b54aeda3804ef9957c1cf06a2855f3a9d3342",
[13:41:16] :	 [Step 6/7]                 "sha256:7fa3c3109bb03ddad37b9dd3f242bf6a36b5f29fd1ae55b197699c5bf32fba01",
[13:41:16] :	 [Step 6/7]                 "sha256:a9d8893328e7e139cfc61d7302352da1435df346753f7975a905ae70e69a7144",
[13:41:16] :	 [Step 6/7]                 "sha256:b8dea01946c43693ab7adbbbb76ee135f97429ed85a7d4769df6b58b5d32a823",
[13:41:16] :	 [Step 6/7]                 "sha256:6ca9d80cd624fc7ab1d8800bf675678933eb990140150c8aa772c4bad61a48c1",
[13:41:16] :	 [Step 6/7]                 "sha256:d0ddf726d4323757e968d8a818596c16e7ce92b3a9525c9f2f0f3742406bdf0f",
[13:41:16] :	 [Step 6/7]                 "sha256:20852061749720cff8baeb9f16af378bf2cc9608b196337cf63f12cb4b4e058f",
[13:41:16] :	 [Step 6/7]                 "sha256:2ab57eec64c2fb7170c096fe608d15c3ff0b05a234eeec1105b8fd776c95ac35"
[13:41:16] :	 [Step 6/7]             ],
[13:41:16] :	 [Step 6/7]             "Type": "layers"
[13:41:16] :	 [Step 6/7]         },
[13:41:16] :	 [Step 6/7]         "Size": 47021769,
[13:41:16] :	 [Step 6/7]         "VirtualSize": 47021769,
[13:41:16] :	 [Step 6/7]         "push_status": null
[13:41:16] :	 [Step 6/7]     },
[13:41:16] :	 [Step 6/7]     "invocation": {
[13:41:16] :	 [Step 6/7]         "module_args": {
[13:41:16] :	 [Step 6/7]             "api_version": "auto",
[13:41:16] :	 [Step 6/7]             "archive_path": null,
[13:41:16] :	 [Step 6/7]             "build": {
[13:41:16] :	 [Step 6/7]                 "args": null,
[13:41:16] :	 [Step 6/7]                 "cache_from": null,
[13:41:16] :	 [Step 6/7]                 "container_limits": null,
[13:41:16] :	 [Step 6/7]                 "dockerfile": "/docker_mounted_dir/tests/../envoy-docker/Dockerfile_dyn",
[13:41:16] :	 [Step 6/7]                 "etc_hosts": null,
[13:41:16] :	 [Step 6/7]                 "http_timeout": null,
[13:41:16] :	 [Step 6/7]                 "network": null,
[13:41:16] :	 [Step 6/7]                 "nocache": true,
[13:41:16] :	 [Step 6/7]                 "path": "/docker_mounted_dir/tests/../envoy-docker",
[13:41:16] :	 [Step 6/7]                 "pull": true,
[13:41:16] :	 [Step 6/7]                 "rm": true,
[13:41:16] :	 [Step 6/7]                 "target": null,
[13:41:16] :	 [Step 6/7]                 "use_config_proxy": null
[13:41:16] :	 [Step 6/7]             },
[13:41:16] :	 [Step 6/7]             "buildargs": null,
[13:41:16] :	 [Step 6/7]             "ca_cert": null,
[13:41:16] :	 [Step 6/7]             "client_cert": null,
[13:41:16] :	 [Step 6/7]             "client_key": null,
[13:41:16] :	 [Step 6/7]             "container_limits": null,
[13:41:16] :	 [Step 6/7]             "debug": false,
[13:41:16] :	 [Step 6/7]             "docker_host": "unix://var/run/docker.sock",
[13:41:16] :	 [Step 6/7]             "dockerfile": null,
[13:41:16] :	 [Step 6/7]             "force": null,
[13:41:16] :	 [Step 6/7]             "force_absent": false,
[13:41:16] :	 [Step 6/7]             "force_source": true,
[13:41:16] :	 [Step 6/7]             "force_tag": false,
[13:41:16] :	 [Step 6/7]             "http_timeout": null,
[13:41:16] :	 [Step 6/7]             "load_path": null,
[13:41:16] :	 [Step 6/7]             "name": "registry.private.com/company/image_name:v1.1.1",
[13:41:16] :	 [Step 6/7]             "nocache": false,
[13:41:16] :	 [Step 6/7]             "path": null,
[13:41:16] :	 [Step 6/7]             "pull": null,
[13:41:16] :	 [Step 6/7]             "push": true,
[13:41:16] :	 [Step 6/7]             "repository": null,
[13:41:16] :	 [Step 6/7]             "rm": true,
[13:41:16] :	 [Step 6/7]             "source": "build",
[13:41:16] :	 [Step 6/7]             "ssl_version": null,
[13:41:16] :	 [Step 6/7]             "state": "present",
[13:41:16] :	 [Step 6/7]             "tag": "latest",
[13:41:16] :	 [Step 6/7]             "timeout": 60,
[13:41:16] :	 [Step 6/7]             "tls": false,
[13:41:16] :	 [Step 6/7]             "tls_hostname": "localhost",
[13:41:16] :	 [Step 6/7]             "use_tls": null,
[13:41:16] :	 [Step 6/7]             "validate_certs": true
[13:41:16] :	 [Step 6/7]         }
[13:41:16] :	 [Step 6/7]     },
[13:41:16] :	 [Step 6/7]     "stdout": "Step 1/3 : FROM registry.private.com/eprn/envoy-alpine:v1.12.0_1.0.6\n\n\nPulling from eprn/envoy-alpine\nDigest: sha256:1c45fabb49eddf860fb03b8eea87999b785585df7c67796d983b5dcc7e55c5de\nStatus: Image is up to date for registry.private.com/eprn/envoy-alpine:v1.12.0_1.0.6\n ---> 77a5b6fce6df\n\nStep 2/3 : ADD src/envoy.yaml /etc/envoy/envoy.yaml\n\n\n ---> 68a21561cf3b\n\nStep 3/3 : CMD [\"/usr/local/bin/start-envoy.sh\"]\n\n\n ---> Running in 747be14e1f15\n\nRemoving intermediate container 747be14e1f15\n\n ---> c24335c8cbf6\n\nSuccessfully built c24335c8cbf6\n\nSuccessfully tagged registry.private.com/company/image_name:v1.1.1\n",
[13:41:16] :	 [Step 6/7]     "stdout_lines": [
[13:41:16] :	 [Step 6/7]         "Step 1/3 : FROM registry.private.com/eprn/envoy-alpine:v1.12.0_1.0.6",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "Pulling from eprn/envoy-alpine",
[13:41:16] :	 [Step 6/7]         "Digest: sha256:1c45fabb49eddf860fb03b8eea87999b785585df7c67796d983b5dcc7e55c5de",
[13:41:16] :	 [Step 6/7]         "Status: Image is up to date for registry.private.com/eprn/envoy-alpine:v1.12.0_1.0.6",
[13:41:16] :	 [Step 6/7]         " ---> 77a5b6fce6df",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "Step 2/3 : ADD src/envoy.yaml /etc/envoy/envoy.yaml",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         " ---> 68a21561cf3b",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "Step 3/3 : CMD [\"/usr/local/bin/start-envoy.sh\"]",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         " ---> Running in 747be14e1f15",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "Removing intermediate container 747be14e1f15",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         " ---> c24335c8cbf6",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "Successfully built c24335c8cbf6",
[13:41:16] :	 [Step 6/7]         "",
[13:41:16] :	 [Step 6/7]         "Successfully tagged registry.private.com/company/image_name:v1.1.1"
[13:41:16] :	 [Step 6/7]     ]
[13:41:16] :	 [Step 6/7] }
...
[13:41:17] :	 [Step 6/7] META: ran handlers
[13:41:17] :	 [Step 6/7] META: ran handlers
[13:41:17] :	 [Step 6/7] 
[13:41:17] :	 [Step 6/7] PLAY RECAP *********************************************************************
[13:41:17] :	 [Step 6/7] localhost                  : ok=10   changed=5    unreachable=0    failed=0    skipped=6    rescued=0    ignored=0   
[13:41:17] :	 [Step 6/7] 
[13:41:17] :	 [Step 6/7] publish_docker_exit_code=0, 0 can mean it already exists or it was successfully created and published
[13:41:17] :	 [Step 6/7] exit_build_publish_docker_image=0

@felixfontein
Copy link
Collaborator

If you specify repository, the image will be tagged only if the tagged image does not yet exist locally - and only if it was tagged, the module decides whether to push. If you do not specify repository, it will proceed to the push logic directly.

Since you specify as repository exactly the same as for name in the bad example, the image is created during build, so tag will not run, and thus also not push. If you only specify repository when it is different than name, the module will work as expected.

@felixfontein
Copy link
Collaborator

resolved_by_pr #53.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Feb 25, 2021
v2.9.18
=======

Release Summary
---------------

| Release Date: 2021-02-18
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - The ``pylint`` sanity test is now supported on Python 3.8.
- inventory cache - do not show a warning when the cache file does not (yet) exist.

Security Fixes
--------------

- **security issue** - Mask default and fallback values for ``no_log`` module options (CVE-2021-20228)
- _sf_account_manager - `initiator_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- _sf_account_manager - `target_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_active_directory - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_active_directory - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_filesystems - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_filesystems - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_pool - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_pool - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_snapshots - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_snapshots - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- bitbucket_pipeline_variable - hide user sensitive information which are marked as ``secured`` from logging into the console (ansible-collections/community.general#1635) (CVE-2021-20180).
- ce_vrrp - `auth_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- cp_mgmt_vpn_community_meshed - `shared_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- cp_mgmt_vpn_community_star - `shared_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- docker_swarm - `signing_ca_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_backend_service - `oauth2_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_disk - `disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_disk - `source_image_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_disk - `source_snapshot_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_image - `image_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_image - `source_disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_instance_template - `disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_instance_template - `source_image_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_region_disk - `disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_region_disk - `source_snapshot_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_snapshot - `snapshot_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_snapshot - `source_disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_ssl_certificate - `private_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_vpn_tunnel - `shared_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_sql_instance - `client_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gitlab_runner - `registration_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- iap_start_workflow - `token_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- ibm_sa_host - `iscsi_chap_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_client - `auth_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_client - `registration_access_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_clienttemplate - `auth_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_group - `auth_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- librato_annotation - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- na_elementsw_account - `initiator_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- na_elementsw_account - `target_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- netscaler_lb_monitor - `radkey` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- nios_nsgroup - `tsig_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- nxos_aaa_server - `global_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- nxos_pim_interface - `hello_auth_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_firewall_policy - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_load_balancer - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_monitoring_policy - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_private_network - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_public_ip - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- ovirt - `instance_rootpw` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pagerduty_alert - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pagerduty_alert - `integration_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pagerduty_alert - `service_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pulp_repo - `feed_client_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- rax_clb_ssl - `private_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- snmp_facts - hide user sensitive information such as ``privkey`` and ``authkey`` from logging into the console (ansible-collections/community.general#1621) (CVE-2021-20178).
- spotinst_aws_elastigroup - `multai_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- spotinst_aws_elastigroup - `token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- utm_proxy_auth_profile - `frontend_cookie_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).

Bugfixes
--------

- Fix incorrect variable scoping when using ``import with context`` in Jinja2 templates. (ansible/ansible#72615)
- ansible-test - Temporarily limit ``cryptography`` to versions before 3.4 to enable tests to function.
- ansible-test - The ``--remote`` option has been updated for Python 2.7 to work around breaking changes in the newly released ``get-pip.py`` bootstrapper.
- ansible-test - The ``--remote`` option has been updated to use a versioned ``get-pip.py`` bootstrapper to avoid issues with future releases.
- display correct error information when an error exists in the last line of the file (ansible/ansible#16456)
- facts - properly report virtualization facts for Linux guests running on bhyve (ansible/ansible#73167)
- mysql_user - add ``INVOKE LAMBDA`` privilege support (ansible-collections/community.general#283).
- mysql_user - add ``SHOW_ROUTINE`` privilege support (ansible-collections/community.mysql#86).
- mysql_user - add missed privileges to support (ansible-collections/community.general#617).
- pause - do not warn when running in the background if a timeout is provided (ansible/ansible#73042)
- postgresql_info - fix crash caused by wrong PgSQL version parsing (ansible-collections/community.postgresql#40).
- postgresql_ping - fix crash caused by wrong PgSQL version parsing (ansible-collections/community.postgresql#40).
- postgresql_query - fix datetime.timedelta type handling (ansible-collections/community.postgresql#47).
- postgresql_query - fix decimal handling (ansible-collections/community.postgresql#45).
- postgresql_set - return a message instead of traceback when a passed parameter has not been found (ansible-collections/community.postgresql#41).
- psrp connection plugin - ``to_text(stdout)`` before json.loads in psrp.Connection.put_file in case stdout is bytes.
- win_find - Get-FileStat used [int] instead of [int64] for file size calculations

v2.9.17
=======

Release Summary
---------------

| Release Date: 2021-01-18
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - Added a ``--export`` option to the ``ansible-test coverage combine`` command to facilitate multi-stage aggregation of coverage in CI pipelines.
- ansible-test - added a ``--venv-system-site-packages`` option for use with the ``--venv`` option
- ansible-test - virtualenv helper scripts now prefer ``venv`` on Python 3 over ``virtualenv`` if the ``ANSIBLE_TEST_PREFER_VENV`` environment variable is set
- bigiq_device_info module - add information on BIG-IQ 7.x support

Bugfixes
--------

- Fix bytestring vs string comparison in module_utils.basic.is_special_selinux_path() so that special-cased filesystems which don't support SELinux context attributes still allow files to be manipulated on them. (ansible/ansible#70244)
- Freeform actions did not work with ``ansible.builtin.`` or ``ansible.legacy.`` FQCN (ansible/ansible#72958).
- async - Fix Python 3 interpreter parsing from module by comparing with bytes (ansible/ansible#70690)
- bigiq_device_info module - fix iteration bug in a _transform_name_attribute method
- docker_image - if ``push=true`` is used with ``repository``, and the image does not need to be tagged, still push. This can happen if ``repository`` and ``name`` are equal (ansible-collections/community.docker#52, ansible-collections/community.docker#53).
- docker_image - report error when loading a broken archive that contains no image (ansible-collections/community.docker#46, ansible-collections/community.docker#55).
- docker_image - report error when the loaded archive does not contain the specified image (ansible-collections/community.docker#41, ansible-collections/community.docker#55).
- inventory - pass the vars dictionary to combine_vars instead of an individual key's value (ansible/ansible#72975).
- k8s - add support for python-kubernetes v12 and later - backport of support in community.kubernetes
- paramiko connection plugin - Ensure we only reset the connection when one has been previously established (ansible/ansible#65812)
- systemd - preserve the full unit name when using a templated service and ``systemd`` failed to parse dbus due to a known bug in ``systemd`` (ansible/ansible#72985)

- unsafe_proxy - Ensure that data within a tuple is marked as unsafe (ansible/ansible#65722)
- user - do the right thing when ``password_lock=True`` and ``password`` are used together (ansible/ansible#72992)


v2.9.16
=======

Release Summary
---------------

| Release Date: 2020-12-14
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-doc - provide ``has_action`` field in JSON output for modules. That information is currently only available in the text view (ansible/ansible#72359).
- ansible-galaxy - find any collection dependencies in the globally configured Galaxy servers and not just the server the parent collection is from.

- ansible-test - Added the ``-remote rhel/7.9`` option to run tests on RHEL 7.9
- ansible-test - Fix container hostname/IP discovery for the ``acme`` test plugin.
- ansible-test - centos6 end of life - container image updated to point to vault base repository (ansible/distro-test-containers#54)
- iptables - reorder comment postition to be at the end (ansible/ansible#71444).
- lvol - fix idempotency issue when using lvol with ``%VG`` or ``%PVS`` size options and VG is fully allocated (ansible-collections/community.general#229).

Bugfixes
--------

- Adjust various hard-coded action names to also include their ``ansible.builtin.`` and ``ansible.legacy.`` prefixed version (ansible/ansible#71817, ansible/ansible#71818, ansible/ansible#71824).
- Collection callbacks were ignoring options and rules for stdout and adhoc cases.
- Fix virt module to support list_vms with a status of paused (ansible/ansible#72059)
- Fixed issue when `netstat` is either missing or doesn't have execution permissions leading to incorrect command being executed.
- Try to load action plugin from the same collection as the module (ansible/ansible#66701)
- account for bug in Python 2.6 that occurs during interpreter shutdown to avoid stack trace
- ansible-test - Correctly detect changes in a GitHub pull request when running on Azure Pipelines.
- ansible-test - Skip installing requirements if they are already installed.
- ansible-test - add constraint for ``cffi`` to prevent failure on systems with older versions of ``gcc`` (https://foss.heptapod.net/pypy/cffi/-/issues/480)

- ansible-test - convert target paths to unicode on Python 2 to avoid ``UnicodeDecodeError`` (ansible/ansible#68398, ansible/ansible#72623).
- ansible-test - improve classification of changes to ``.gitignore``, ``COPYING``, ``LICENSE``, ``Makefile``, and all files ending with one of ``.in`, ``.md`, ``.rst``, ``.toml``, ``.txt`` in the collection root directory (ansible/ansible#72353).
- ansible-test now uses GNU tar format instead of the Python default when creating payloads for remote systems
- azure_rm inventory plugin - update to fetch availability zone information of VM in hostvars. (ansible-collections/azure#161)
- dnf - fix filtering to avoid dependncy conflicts (ansible/ansible#72316)
- ec2_group - Fixes error handling during tagging failures (ansible-collections/amazon.aws#210).
- ensure 'local' connection always has the correct default user for actions to consume.
- network_cli - Update paramiko play_context when network_cli's play context is updated so that ssh parameters can be updated as well.
- network_cli connection plugin - Perform privilege escalation before setting terminal.
- pause - Fix indefinite hang when using a pause task on a background process (ansible/ansible#32142)

- remove redundant remote_user setting in play_context for local as plugin already does it, also removes fork/thread issue from use of pwd library.
- set_mode_if_different - handle symlink if it is inside a directory with sticky bit set (ansible/ansible#45198)

- systemd - account for templated unit files using ``@`` when searching for the unit file (ansible/ansible#72347 (comment))

- systemd - follow up fix to ansible/ansible#72338 to use ``list-unit-files`` rather than ``list-units`` in order to show all units files on the system.

- systemd - work around bug with ``systemd`` 245 and 5.8 kernel that does not correctly report service state (ansible/ansible#71528)

- wait_for - catch and ignore errors when getting active connections with psutil (ansible/ansible#72322)

v2.9.15
=======

Release Summary
---------------

| Release Date: 2020-11-02
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - Add a ``--docker-network`` option to choose the network for running containers when using the ``--docker`` option.
- ansible-test - Collections can now specify pip constraints for unit and integration test requirements using ``tests/unit/constraints.txt`` and ``tests/integration/constraints.txt`` respectively.
- dnf - now shows specific package changes (installations/removals) under ``results`` in check_mode. (ansible/ansible#66132)
- module_defaults - add new module s3_metrics_configuration from community.aws to aws module_defaults group (ansible/ansible#72145).
- vmware_guest_custom_attributes - Fixed issue when trying to set a VM custom attribute when there are custom attributes with the same name for other object types (ansible-collections/community.vmware#412).

Breaking Changes / Porting Guide
--------------------------------

- ansible-galaxy login command has been removed (see ansible/ansible#71560)

Bugfixes
--------

- Restore the ability for changed_when/failed_when to function with group_by.
- ansible-test - Always connect additional Docker containers to the network used by the current container (if any).
- ansible-test - Always map ``/var/run/docker.sock`` into test containers created by the ``--docker`` option if the docker host is not ``localhost``.
- ansible-test - Attempt to detect the Docker hostname instead of assuming ``localhost``.
- ansible-test - Correctly detect running in a Docker container on Azure Pipelines.
- ansible-test - Prefer container IP at ``.NetworkSettings.Networks.{NetworkName}.IPAddress`` over ``.NetworkSettings.IPAddress``.
- ansible-test - The ``cs`` and ``openshift`` test plugins now search for containers on the current network instead of assuming the ``bridge`` network.
- ansible-test - Using the ``--remote`` option on Azure Pipelines now works from a job running in a container.
- ansible-test - disable ansible-doc sanity test for vars plugins in collections, which are not supported by Ansible 2.9 (ansible/ansible#72336).
- async_wrapper - Fix race condition when ``~/.ansible_async`` folder tries to be created by multiple async tasks at the same time - ansible/ansible#59306
- dnf - it is now possible to specify both ``security: true`` and ``bugfix: true`` to install updates of both types. Previously, only security would get installed if both were true. (ansible/ansible#70854)
- facts - fix distribution fact for SLES4SAP (ansible/ansible#71559).
- kubectl - follow up fix in _build_exec_cmd API (ansible/ansible#72171).
- nmcli - typecast parameters to string as required (ansible/ansible#59095).
- ovirt_disk - don't move disk when already in storage_domain (oVirt/ovirt-ansible-collection#135).
- postgresql_pg_hba - fix a crash when a new rule with an 'options' field replaces a rule without or vice versa (ansible-collections/community.general#1108).
- postgresql_privs - fix the module mistakes a procedure for a function (ansible-collections/community.general#994)
- powershell - remove getting the PowerShell version from the env var ``POWERSHELL_VERSION``. This feature never worked properly and can cause conflicts with other libraries that use this var
- user - AnsibleModule.run_command returns a tuple of return code, stdout and stderr. The module main function of the user module expects user.create_user to return a tuple of return code, stdout and stderr. Fix the locations where stdout and stderr got reversed.

- user - Local users with an expiry date cannot be created as the ``luseradd`` / ``lusermod`` commands do not support the ``-e`` option. Set the expiry time in this case via ``lchage`` after the user was created / modified. (ansible/ansible#71942)

- zfs - fixed ``invalid character '@' in pool name"`` error when working with snapshots on a root zvol (ansible-collections/community.general#932).

v2.9.14
=======

Release Summary
---------------

| Release Date: 2020-10-05
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - Added CI provider support for Azure Pipelines.
- ansible-test - Added support for Ansible Core CI request signing for Shippable.
- ansible-test - Allow custom ``--remote-stage`` options for development and testing.
- ansible-test - Fix ``ansible-test coverage`` reporting sub-commands (``report``, ``html``, ``xml``) on Python 2.6.
- ansible-test - Refactored CI related logic into a basic provider abstraction.
- ansible-test - Remove the discontinued ``us-east-2`` choice from the ``--remote-aws-region`` option.
- ansible-test - Request remote resources by provider name for all provider types.
- ansible-test - Show a warning when the obsolete ``--remote-aws-region`` option is used.
- ansible-test - Support custom remote endpoints with the ``--remote-endpoint`` option.
- ansible-test - Update built-in service endpoints for the ``--remote`` option.
- ansible-test - Use new endpoint for Parallels based instances with the ``--remote`` option.
- vmware_guest - Support HW version 15 / vSphere 6.7U2 (ansible-collections/community.vmware#99).

Security Fixes
--------------

- kubectl - connection plugin now redact kubectl_token and kubectl_password in console log (ansible-collections/community.kubernetes#65) (CVE-2020-1753).

Bugfixes
--------

- Handle write_files option in cgroup_perf_recap callback plugin (ansible/ansible#64936).
- Prevent templating unused variables for {% include %} (ansible/ansible#68699)
- Provide more information in AnsibleUndefinedVariable (ansible/ansible#55152)
- ansible-doc - do not crash if plugin name cannot be found (ansible/ansible#71965).
- ansible-doc - properly show plugin name when ``name:`` is used instead of ``<plugin_type>:`` (ansible/ansible#71965).
- ansible-test - Change classification using ``--changed`` now consistently handles common configuration files for supported CI providers.
- ansible-test - The ``resource_prefix`` variable provided to tests running on Azure Pipelines is now converted to lowercase to match other CI providers.
- ansible-test - for local change detection, allow to specify branch to compare to with ``--base-branch`` for all types of tests (ansible/ansible#69508).
- docker_login - now correctly reports changed status on logout for Docker versions released after June 2020.
- docker_login - now obeys check_mode for logout
- interfaces_file - escape regular expression characters in old value (ansible-collections/community.general#777).
- ovirt_disk - fix upload when direct upload fails (oVirt/ovirt-ansible-collection#120).
- postgres_user - remove false positive ``no_log`` warning for ``no_password_changes`` option (ansible/ansible#68106).
- psrp - Fix hang when copying an empty file to the remote target
- runas - create a new token when running as ``SYSTEM`` to ensure it has the full privileges assigned to that account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants