summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/docker
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:22 +0000
commit38b7c80217c4e72b1d8988eb1e60bb6e77334114 (patch)
tree356e9fd3762877d07cde52d21e77070aeff7e789 /ansible_collections/community/docker
parentAdding upstream version 7.7.0+dfsg. (diff)
downloadansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.tar.xz
ansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.zip
Adding upstream version 9.4.0+dfsg.upstream/9.4.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--ansible_collections/community/crypto/CHANGELOG.md.license (renamed from ansible_collections/community/docker/tests/sanity/ignore-2.10.txt.license)0
-rw-r--r--ansible_collections/community/crypto/tests/sanity/ignore-2.17.txt.license (renamed from ansible_collections/community/docker/tests/sanity/ignore-2.9.txt.license)0
-rw-r--r--ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml123
-rw-r--r--ansible_collections/community/docker/.github/workflows/ansible-test.yml74
-rw-r--r--ansible_collections/community/docker/.github/workflows/docs-pr.yml1
-rw-r--r--ansible_collections/community/docker/.github/workflows/docs-push.yml1
-rw-r--r--ansible_collections/community/docker/.github/workflows/ee.yml8
-rw-r--r--ansible_collections/community/docker/.github/workflows/import-galaxy.yml20
-rw-r--r--ansible_collections/community/docker/.github/workflows/reuse.yml11
-rw-r--r--ansible_collections/community/docker/CHANGELOG.md1390
-rw-r--r--ansible_collections/community/docker/CHANGELOG.md.license3
-rw-r--r--ansible_collections/community/docker/CHANGELOG.rst218
-rw-r--r--ansible_collections/community/docker/FILES.json1600
-rw-r--r--ansible_collections/community/docker/LICENSES/Apache-2.0.txt6
-rw-r--r--ansible_collections/community/docker/MANIFEST.json10
-rw-r--r--ansible_collections/community/docker/README.md14
-rw-r--r--ansible_collections/community/docker/changelogs/changelog.yaml421
-rw-r--r--ansible_collections/community/docker/changelogs/config.yaml3
-rw-r--r--ansible_collections/community/docker/docs/docsite/config.yml15
-rw-r--r--ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst216
-rw-r--r--ansible_collections/community/docker/meta/runtime.yml11
-rw-r--r--ansible_collections/community/docker/plugins/action/docker_container_copy_into.py2
-rw-r--r--ansible_collections/community/docker/plugins/connection/docker.py3
-rw-r--r--ansible_collections/community/docker/plugins/connection/docker_api.py3
-rw-r--r--ansible_collections/community/docker/plugins/connection/nsenter.py2
-rw-r--r--ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py63
-rw-r--r--ansible_collections/community/docker/plugins/doc_fragments/docker.py197
-rw-r--r--ansible_collections/community/docker/plugins/inventory/docker_containers.py94
-rw-r--r--ansible_collections/community/docker/plugins/inventory/docker_machine.py71
-rw-r--r--ansible_collections/community/docker/plugins/inventory/docker_swarm.py105
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_api/api/client.py2
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_api/errors.py3
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_api/tls.py5
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py14
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py3
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py16
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_logfmt.py208
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/_platform.py179
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/common.py38
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/common_api.py12
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/common_cli.py339
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/compose_v2.py618
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/image_archive.py117
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/module_container/base.py47
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py98
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/module_container/module.py118
-rw-r--r--ansible_collections/community/docker/plugins/module_utils/util.py25
-rw-r--r--ansible_collections/community/docker/plugins/modules/current_container_facts.py8
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_compose.py82
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_compose_v2.py638
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_compose_v2_pull.py163
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_config.py30
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_container.py369
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py22
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_container_exec.py33
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_container_info.py2
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_host_info.py34
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image.py125
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_build.py316
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_export.py283
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_info.py6
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_load.py9
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_pull.py223
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_push.py197
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_remove.py269
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_image_tag.py273
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_login.py10
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_network.py18
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_network_info.py2
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_node.py20
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_node_info.py12
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_plugin.py12
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_prune.py16
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_secret.py26
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_stack.py259
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_stack_info.py83
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py83
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_swarm.py86
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_swarm_info.py32
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_swarm_service.py91
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py2
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_volume.py16
-rw-r--r--ansible_collections/community/docker/plugins/modules/docker_volume_info.py2
-rw-r--r--ansible_collections/community/docker/tests/galaxy-importer.cfg8
-rw-r--r--ansible_collections/community/docker/tests/integration/requirements.yml3
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml4
-rwxr-xr-xansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml38
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/meta/main.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/main.yml48
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/run-test.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/pull.yml211
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/start-stop.yml262
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/meta/main.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/main.yml48
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/run-test.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/tests/pull.yml192
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml45
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml3
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml289
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml22
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml30
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml353
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml64
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/meta/main.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/main.yml13
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/run-test.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/test.yml59
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/tests/options.yml204
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/ArgsDockerfile13
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/Dockerfile7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/EtcHostsDockerfile7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/MyDockerfile9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/StagedDockerfile11
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_export/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_export/meta/main.yml9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/main.yml13
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/run-test.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/test.yml39
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/tests/basic.yml69
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml29
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml29
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/meta/main.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/main.yml13
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/run-test.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/test.yml39
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/basic.yml196
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml89
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/registry.yml126
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_push/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_push/meta/main.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/main.yml13
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/run-test.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/test.yml39
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/basic.yml60
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/registry.yml82
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_remove/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_remove/meta/main.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_remove/tasks/main.yml296
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_tag/aliases6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_tag/meta/main.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_image_tag/tasks/main.yml402
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml32
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml26
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml18
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml3
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml16
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml18
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/vars/main.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml10
-rwxr-xr-xansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh14
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml4
-rwxr-xr-xansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml4
-rwxr-xr-xansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml5
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml3
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml38
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml3
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/meta/main.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml13
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml14
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml49
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/vars/default.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/default.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/meta/main.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml13
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml14
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/main.yml65
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/nothing.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/vars/default.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/defaults/main.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/setup.yml59
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml6
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/defaults/main.yml15
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/meta/main.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/meta/main.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Alpine.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Alpine.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Archlinux.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Debian.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Debian.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Fedora.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Fedora.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-7.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-7.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-8.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-8.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-9.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-9.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Suse.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/main.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/main.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml79
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml11
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/CentOS-8.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/CentOS-8.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-8.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-8.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-9.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-9.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py2.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py2.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py3.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml)2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-16.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-16.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-18.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-18.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu.yml (renamed from ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu.yml)0
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/default.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml7
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml25
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/aliases5
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/defaults/main.yml12
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/meta/main.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/tasks/main.yml15
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml11
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/default.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases1
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml3
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml2
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/vars/main.yml4
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/aliases5
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/defaults/main.yml10
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml47
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml8
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/Ubuntu-14.yml9
-rw-r--r--ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/default.yml4
-rw-r--r--ansible_collections/community/docker/tests/sanity/extra/action-group.json11
-rw-r--r--ansible_collections/community/docker/tests/sanity/extra/action-group.json.license3
-rwxr-xr-xansible_collections/community/docker/tests/sanity/extra/action-group.py82
-rwxr-xr-xansible_collections/community/docker/tests/sanity/extra/extra-docs.py2
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.10.txt11
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.11.txt2
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.12.txt2
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.13.txt1
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.16.txt1
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.17.txt1
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.17.txt.license3
-rw-r--r--ansible_collections/community/docker/tests/sanity/ignore-2.9.txt10
-rw-r--r--ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py7
-rw-r--r--ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py58
-rw-r--r--ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py2
-rw-r--r--ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py11
-rw-r--r--ansible_collections/community/docker/tests/unit/plugins/module_utils/compose_v2_test_cases.py10588
-rw-r--r--ansible_collections/community/docker/tests/unit/plugins/module_utils/test__logfmt.py100
-rw-r--r--ansible_collections/community/docker/tests/unit/plugins/module_utils/test_compose_v2.py242
-rw-r--r--ansible_collections/community/docker/tests/unit/requirements.yml1
-rwxr-xr-xansible_collections/community/docker/tests/utils/shippable/shippable.sh16
316 files changed, 24337 insertions, 1950 deletions
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt.license b/ansible_collections/community/crypto/CHANGELOG.md.license
index edff8c768..edff8c768 100644
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt.license
+++ b/ansible_collections/community/crypto/CHANGELOG.md.license
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt.license b/ansible_collections/community/crypto/tests/sanity/ignore-2.17.txt.license
index edff8c768..edff8c768 100644
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt.license
+++ b/ansible_collections/community/crypto/tests/sanity/ignore-2.17.txt.license
diff --git a/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml b/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml
index ac5c8623d..b54ccc148 100644
--- a/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml
+++ b/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml
@@ -46,7 +46,7 @@ variables:
resources:
containers:
- container: default
- image: quay.io/ansible/azure-pipelines-test-container:3.0.0
+ image: quay.io/ansible/azure-pipelines-test-container:4.0.1
pool: Standard
@@ -66,6 +66,17 @@ stages:
test: 'devel/sanity/extra'
- name: Units
test: 'devel/units/1'
+ - stage: Ansible_2_16
+ displayName: Sanity & Units 2.16
+ dependsOn: []
+ jobs:
+ - template: templates/matrix.yml
+ parameters:
+ targets:
+ - name: Sanity
+ test: '2.16/sanity/1'
+ - name: Units
+ test: '2.16/units/1'
- stage: Ansible_2_15
displayName: Sanity & Units 2.15
dependsOn: []
@@ -88,17 +99,6 @@ stages:
test: '2.14/sanity/1'
- name: Units
test: '2.14/units/1'
- - stage: Ansible_2_13
- displayName: Sanity & Units 2.13
- dependsOn: []
- jobs:
- - template: templates/matrix.yml
- parameters:
- targets:
- - name: Sanity
- test: '2.13/sanity/1'
- - name: Units
- test: '2.13/units/1'
### Docker
- stage: Docker_devel
@@ -109,12 +109,8 @@ stages:
parameters:
testFormat: devel/linux/{0}
targets:
- - name: CentOS 7
- test: centos7
- - name: Fedora 37
- test: fedora37
- - name: openSUSE 15
- test: opensuse15
+ - name: Fedora 39
+ test: fedora39
- name: Ubuntu 20.04
test: ubuntu2004
- name: Ubuntu 22.04
@@ -124,49 +120,55 @@ stages:
groups:
- 4
- 5
- - stage: Docker_2_15
- displayName: Docker 2.15
+ - 6
+ - stage: Docker_2_16
+ displayName: Docker 2.16
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
- testFormat: 2.15/linux/{0}
+ testFormat: 2.16/linux/{0}
targets:
+ - name: Fedora 38
+ test: fedora38
- name: CentOS 7
test: centos7
+ - name: openSUSE 15
+ test: opensuse15
groups:
- 4
- 5
- - stage: Docker_2_14
- displayName: Docker 2.14
+ - 6
+ - stage: Docker_2_15
+ displayName: Docker 2.15
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
- testFormat: 2.14/linux/{0}
+ testFormat: 2.15/linux/{0}
targets:
- - name: Fedora 36
- test: fedora36
+ - name: Fedora 37
+ test: fedora37
+ - name: CentOS 7
+ test: centos7
groups:
- 4
- 5
- - stage: Docker_2_13
- displayName: Docker 2.13
+ - 6
+ - stage: Docker_2_14
+ displayName: Docker 2.14
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
- testFormat: 2.13/linux/{0}
+ testFormat: 2.14/linux/{0}
targets:
- - name: Fedora 35
- test: fedora35
- - name: openSUSE 15 py2
- test: opensuse15py2
- name: Alpine 3
test: alpine3
groups:
- 4
- 5
+ - 6
### Community Docker
- stage: Docker_community_devel
@@ -179,15 +181,14 @@ stages:
targets:
- name: Debian Bullseye
test: debian-bullseye/3.9
+ - name: Debian Bookworm
+ test: debian-bookworm/3.11
- name: ArchLinux
test: archlinux/3.11
- - name: CentOS Stream 8 with Python 3.6
- test: centos-stream8/3.6
- - name: CentOS Stream 8 with Python 3.9
- test: centos-stream8/3.9
groups:
- 4
- 5
+ - 6
### Remote
- stage: Remote_devel
@@ -198,56 +199,64 @@ stages:
parameters:
testFormat: devel/{0}
targets:
- - name: RHEL 9.1 with latest Docker SDK from PyPi
- test: rhel/9.1-pypi-latest
+ - name: RHEL 9.3 with latest Docker SDK from PyPi
+ test: rhel/9.3-pypi-latest
+ # Currently always hangs in group 2
+ # - name: RHEL 8.8
+ # test: rhel/8.8
groups:
- 1
- 2
- 3
- 4
- 5
- - stage: Remote_2_15
- displayName: Remote 2.15
+ - 6
+ - stage: Remote_2_16
+ displayName: Remote 2.16
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
- testFormat: 2.15/{0}
+ testFormat: 2.16/{0}
targets:
- - name: RHEL 7.9
- test: rhel/7.9
+ - name: RHEL 9.2
+ test: rhel/9.2
groups:
- 1
- 2
- 3
- 4
- 5
- - stage: Remote_2_14
- displayName: Remote 2.14
+ - stage: Remote_2_15
+ displayName: Remote 2.15
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
- testFormat: 2.14/{0}
+ testFormat: 2.15/{0}
targets:
- - name: RHEL 9.0
- test: rhel/9.0
+ - name: RHEL 9.1
+ test: rhel/9.1
+ - name: RHEL 8.7
+ test: rhel/8.7
+ - name: RHEL 7.9
+ test: rhel/7.9
groups:
- 1
- 2
- 3
- 4
- 5
- - stage: Remote_2_13
- displayName: Remote 2.13
+ - stage: Remote_2_14
+ displayName: Remote 2.14
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
- testFormat: 2.13/{0}
+ testFormat: 2.14/{0}
targets:
- - name: RHEL 8.5
- test: rhel/8.5
+ - name: RHEL 9.0
+ test: rhel/9.0
groups:
- 1
- 2
@@ -261,17 +270,17 @@ stages:
condition: succeededOrFailed()
dependsOn:
- Ansible_devel
+ - Ansible_2_16
- Ansible_2_15
- Ansible_2_14
- - Ansible_2_13
- Remote_devel
+ - Remote_2_16
- Remote_2_15
- Remote_2_14
- - Remote_2_13
- Docker_devel
+ - Docker_2_16
- Docker_2_15
- Docker_2_14
- - Docker_2_13
- Docker_community_devel
jobs:
- template: templates/coverage.yml
diff --git a/ansible_collections/community/docker/.github/workflows/ansible-test.yml b/ansible_collections/community/docker/.github/workflows/ansible-test.yml
index 6aa69f015..d8910d9f6 100644
--- a/ansible_collections/community/docker/.github/workflows/ansible-test.yml
+++ b/ansible_collections/community/docker/.github/workflows/ansible-test.yml
@@ -31,6 +31,7 @@ jobs:
ansible:
- '2.11'
- '2.12'
+ - '2.13'
# Ansible-test on various stable branches does not yet work well with cgroups v2.
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
# image for these stable branches. The list of branches where this is necessary will
@@ -49,6 +50,8 @@ jobs:
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
pull-request-change-detection: 'true'
testing-type: sanity
+ pre-test-cmd: >-
+ git clone --depth=1 --single-branch --branch stable-1 https://github.com/ansible-collections/community.library_inventory_filtering.git ../../community/library_inventory_filtering_v1
units:
# Ansible-test on various stable branches does not yet work well with cgroups v2.
@@ -68,11 +71,10 @@ jobs:
ansible:
- '2.11'
- '2.12'
+ - '2.13'
steps:
- - name: >-
- Perform unit testing against
- Ansible version ${{ matrix.ansible }}
+ - name: Perform unit testing against Ansible version ${{ matrix.ansible }}
uses: felixfontein/ansible-test-gh-action@main
with:
ansible-core-github-repository-slug: ${{ contains(fromJson('["2.10", "2.11"]'), matrix.ansible) && 'felixfontein/ansible' || 'ansible/ansible' }}
@@ -80,6 +82,8 @@ jobs:
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
pull-request-change-detection: 'true'
testing-type: units
+ pre-test-cmd: >-
+ git clone --depth=1 --single-branch --branch stable-1 https://github.com/ansible-collections/community.library_inventory_filtering.git ../../community/library_inventory_filtering_v1
integration:
# Ansible-test on various stable branches does not yet work well with cgroups v2.
@@ -120,6 +124,10 @@ jobs:
python: ''
target: azp/5/
- ansible: '2.11'
+ docker: fedora32
+ python: ''
+ target: azp/6/
+ - ansible: '2.11'
docker: alpine3
python: ''
target: azp/4/
@@ -128,6 +136,10 @@ jobs:
docker: alpine3
python: ''
target: azp/5/
+ - ansible: '2.11'
+ docker: alpine3
+ python: ''
+ target: azp/6/
# 2.12
- ansible: '2.12'
docker: fedora33
@@ -138,6 +150,10 @@ jobs:
python: ''
target: azp/5/
- ansible: '2.12'
+ docker: fedora33
+ python: ''
+ target: azp/6/
+ - ansible: '2.12'
docker: fedora34
python: ''
target: azp/4/
@@ -146,6 +162,10 @@ jobs:
python: ''
target: azp/5/
- ansible: '2.12'
+ docker: fedora34
+ python: ''
+ target: azp/6/
+ - ansible: '2.12'
docker: ubuntu1804
python: ''
target: azp/4/
@@ -153,12 +173,50 @@ jobs:
docker: ubuntu1804
python: ''
target: azp/5/
+ - ansible: '2.12'
+ docker: ubuntu1804
+ python: ''
+ target: azp/6/
+ # 2.13
+ - ansible: '2.13'
+ docker: fedora35
+ python: ''
+ target: azp/4/
+ - ansible: '2.13'
+ docker: fedora35
+ python: ''
+ target: azp/5/
+ - ansible: '2.13'
+ docker: fedora35
+ python: ''
+ target: azp/6/
+ - ansible: '2.13'
+ docker: opensuse15py2
+ python: ''
+ target: azp/4/
+ - ansible: '2.13'
+ docker: opensuse15py2
+ python: ''
+ target: azp/5/
+ - ansible: '2.13'
+ docker: opensuse15py2
+ python: ''
+ target: azp/6/
+ - ansible: '2.13'
+ docker: alpine3
+ python: ''
+ target: azp/4/
+ - ansible: '2.13'
+ docker: alpine3
+ python: ''
+ target: azp/5/
+ - ansible: '2.13'
+ docker: alpine3
+ python: ''
+ target: azp/6/
steps:
- - name: >-
- Perform integration testing against
- Ansible version ${{ matrix.ansible }}
- under Python ${{ matrix.python }}
+ - name: Perform integration testing against Ansible version ${{ matrix.ansible }} under Python ${{ matrix.python }}
uses: felixfontein/ansible-test-gh-action@main
with:
ansible-core-github-repository-slug: ${{ contains(fromJson('["2.10", "2.11"]'), matrix.ansible) && 'felixfontein/ansible' || 'ansible/ansible' }}
@@ -176,6 +234,8 @@ jobs:
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git ../../community/crypto
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.general.git ../../community/general
+ ;
+ git clone --depth=1 --single-branch --branch stable-1 https://github.com/ansible-collections/community.library_inventory_filtering.git ../../community/library_inventory_filtering_v1
${{ matrix.extra-constraints && format('; echo ''{0}'' >> tests/utils/constraints.txt', matrix.extra-constraints) || '' }}
;
cat tests/utils/constraints.txt
diff --git a/ansible_collections/community/docker/.github/workflows/docs-pr.yml b/ansible_collections/community/docker/.github/workflows/docs-pr.yml
index c63bdbfc6..74aad8825 100644
--- a/ansible_collections/community/docker/.github/workflows/docs-pr.yml
+++ b/ansible_collections/community/docker/.github/workflows/docs-pr.yml
@@ -32,6 +32,7 @@ jobs:
init-extra-html-theme-options: |
documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/
render-file-line: '> * `$<status>` [$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)'
+ extra-collections: community.library_inventory_filtering_v1
publish-docs-gh-pages:
# for now we won't run this on forks
diff --git a/ansible_collections/community/docker/.github/workflows/docs-push.yml b/ansible_collections/community/docker/.github/workflows/docs-push.yml
index ccc320850..8ed0d874b 100644
--- a/ansible_collections/community/docker/.github/workflows/docs-push.yml
+++ b/ansible_collections/community/docker/.github/workflows/docs-push.yml
@@ -37,6 +37,7 @@ jobs:
init-html-short-title: Community.Docker Collection Docs
init-extra-html-theme-options: |
documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/
+ extra-collections: community.library_inventory_filtering_v1
publish-docs-gh-pages:
# for now we won't run this on forks
diff --git a/ansible_collections/community/docker/.github/workflows/ee.yml b/ansible_collections/community/docker/.github/workflows/ee.yml
index 2b2675b0c..d884f56ef 100644
--- a/ansible_collections/community/docker/.github/workflows/ee.yml
+++ b/ansible_collections/community/docker/.github/workflows/ee.yml
@@ -46,6 +46,10 @@ jobs:
- name: ansible-core devel @ RHEL UBI 9
ansible_core: https://github.com/ansible/ansible/archive/devel.tar.gz
ansible_runner: ansible-runner
+ other_deps: |2
+ python_interpreter:
+ package_system: python3.11 python3.11-pip python3.11-wheel python3.11-cryptography
+ python_path: "/usr/bin/python3.11"
base_image: docker.io/redhat/ubi9:latest
pre_base: '"#"'
- name: ansible-core 2.15 @ Rocky Linux 9
@@ -77,12 +81,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: '3.11'
diff --git a/ansible_collections/community/docker/.github/workflows/import-galaxy.yml b/ansible_collections/community/docker/.github/workflows/import-galaxy.yml
new file mode 100644
index 000000000..0c0ee402a
--- /dev/null
+++ b/ansible_collections/community/docker/.github/workflows/import-galaxy.yml
@@ -0,0 +1,20 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+name: import-galaxy
+'on':
+ # Run CI against all pushes (direct commits, also merged PRs) to main, and all Pull Requests
+ push:
+ branches:
+ - main
+ - stable-*
+ pull_request:
+
+jobs:
+ import-galaxy:
+ permissions:
+ contents: read
+ name: Test to import built collection artifact with Galaxy importer
+ uses: ansible-community/github-action-test-galaxy-import/.github/workflows/test-galaxy-import.yml@main
diff --git a/ansible_collections/community/docker/.github/workflows/reuse.yml b/ansible_collections/community/docker/.github/workflows/reuse.yml
index 8d9ebde8d..8064af149 100644
--- a/ansible_collections/community/docker/.github/workflows/reuse.yml
+++ b/ansible_collections/community/docker/.github/workflows/reuse.yml
@@ -21,12 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- - name: Install dependencies
- run: |
- pip install reuse
-
- - name: Check REUSE compliance
- run: |
- reuse lint
+ - name: REUSE Compliance Check
+ uses: fsfe/reuse-action@v3
diff --git a/ansible_collections/community/docker/CHANGELOG.md b/ansible_collections/community/docker/CHANGELOG.md
new file mode 100644
index 000000000..2e232e769
--- /dev/null
+++ b/ansible_collections/community/docker/CHANGELOG.md
@@ -0,0 +1,1390 @@
+# Docker Community Collection Release Notes
+
+**Topics**
+
+- <a href="#v3-8-1">v3\.8\.1</a>
+ - <a href="#release-summary">Release Summary</a>
+ - <a href="#security-fixes">Security Fixes</a>
+ - <a href="#bugfixes">Bugfixes</a>
+- <a href="#v3-8-0">v3\.8\.0</a>
+ - <a href="#release-summary-1">Release Summary</a>
+ - <a href="#minor-changes">Minor Changes</a>
+ - <a href="#bugfixes-1">Bugfixes</a>
+- <a href="#v3-7-0">v3\.7\.0</a>
+ - <a href="#release-summary-2">Release Summary</a>
+ - <a href="#minor-changes-1">Minor Changes</a>
+ - <a href="#bugfixes-2">Bugfixes</a>
+ - <a href="#new-modules">New Modules</a>
+- <a href="#v3-6-0">v3\.6\.0</a>
+ - <a href="#release-summary-3">Release Summary</a>
+ - <a href="#major-changes">Major Changes</a>
+ - <a href="#minor-changes-2">Minor Changes</a>
+ - <a href="#bugfixes-3">Bugfixes</a>
+ - <a href="#new-modules-1">New Modules</a>
+- <a href="#v3-5-0">v3\.5\.0</a>
+ - <a href="#release-summary-4">Release Summary</a>
+ - <a href="#minor-changes-3">Minor Changes</a>
+ - <a href="#deprecated-features">Deprecated Features</a>
+ - <a href="#bugfixes-4">Bugfixes</a>
+- <a href="#v3-4-11">v3\.4\.11</a>
+ - <a href="#release-summary-5">Release Summary</a>
+ - <a href="#bugfixes-5">Bugfixes</a>
+- <a href="#v3-4-10">v3\.4\.10</a>
+ - <a href="#release-summary-6">Release Summary</a>
+ - <a href="#bugfixes-6">Bugfixes</a>
+- <a href="#v3-4-9">v3\.4\.9</a>
+ - <a href="#release-summary-7">Release Summary</a>
+ - <a href="#bugfixes-7">Bugfixes</a>
+- <a href="#v3-4-8">v3\.4\.8</a>
+ - <a href="#release-summary-8">Release Summary</a>
+ - <a href="#known-issues">Known Issues</a>
+- <a href="#v3-4-7">v3\.4\.7</a>
+ - <a href="#release-summary-9">Release Summary</a>
+ - <a href="#bugfixes-8">Bugfixes</a>
+- <a href="#v3-4-6">v3\.4\.6</a>
+ - <a href="#release-summary-10">Release Summary</a>
+ - <a href="#bugfixes-9">Bugfixes</a>
+ - <a href="#known-issues-1">Known Issues</a>
+- <a href="#v3-4-5">v3\.4\.5</a>
+ - <a href="#release-summary-11">Release Summary</a>
+ - <a href="#bugfixes-10">Bugfixes</a>
+- <a href="#v3-4-4">v3\.4\.4</a>
+ - <a href="#release-summary-12">Release Summary</a>
+ - <a href="#minor-changes-4">Minor Changes</a>
+ - <a href="#known-issues-2">Known Issues</a>
+- <a href="#v3-4-3">v3\.4\.3</a>
+ - <a href="#release-summary-13">Release Summary</a>
+- <a href="#v3-4-2">v3\.4\.2</a>
+ - <a href="#release-summary-14">Release Summary</a>
+ - <a href="#bugfixes-11">Bugfixes</a>
+- <a href="#v3-4-1">v3\.4\.1</a>
+ - <a href="#release-summary-15">Release Summary</a>
+ - <a href="#bugfixes-12">Bugfixes</a>
+- <a href="#v3-4-0">v3\.4\.0</a>
+ - <a href="#release-summary-16">Release Summary</a>
+ - <a href="#minor-changes-5">Minor Changes</a>
+ - <a href="#bugfixes-13">Bugfixes</a>
+ - <a href="#new-modules-2">New Modules</a>
+- <a href="#v3-3-2">v3\.3\.2</a>
+ - <a href="#release-summary-17">Release Summary</a>
+ - <a href="#bugfixes-14">Bugfixes</a>
+- <a href="#v3-3-1">v3\.3\.1</a>
+ - <a href="#release-summary-18">Release Summary</a>
+ - <a href="#bugfixes-15">Bugfixes</a>
+- <a href="#v3-3-0">v3\.3\.0</a>
+ - <a href="#release-summary-19">Release Summary</a>
+ - <a href="#minor-changes-6">Minor Changes</a>
+ - <a href="#bugfixes-16">Bugfixes</a>
+- <a href="#v3-2-2">v3\.2\.2</a>
+ - <a href="#release-summary-20">Release Summary</a>
+ - <a href="#bugfixes-17">Bugfixes</a>
+- <a href="#v3-2-1">v3\.2\.1</a>
+ - <a href="#release-summary-21">Release Summary</a>
+- <a href="#v3-2-0">v3\.2\.0</a>
+ - <a href="#release-summary-22">Release Summary</a>
+ - <a href="#minor-changes-7">Minor Changes</a>
+ - <a href="#deprecated-features-1">Deprecated Features</a>
+- <a href="#v3-1-0">v3\.1\.0</a>
+ - <a href="#release-summary-23">Release Summary</a>
+ - <a href="#minor-changes-8">Minor Changes</a>
+- <a href="#v3-0-2">v3\.0\.2</a>
+ - <a href="#release-summary-24">Release Summary</a>
+ - <a href="#bugfixes-18">Bugfixes</a>
+- <a href="#v3-0-1">v3\.0\.1</a>
+ - <a href="#release-summary-25">Release Summary</a>
+ - <a href="#bugfixes-19">Bugfixes</a>
+- <a href="#v3-0-0">v3\.0\.0</a>
+ - <a href="#release-summary-26">Release Summary</a>
+ - <a href="#major-changes-1">Major Changes</a>
+ - <a href="#minor-changes-9">Minor Changes</a>
+ - <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
+ - <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
+ - <a href="#security-fixes-1">Security Fixes</a>
+ - <a href="#bugfixes-20">Bugfixes</a>
+- <a href="#v2-7-0">v2\.7\.0</a>
+ - <a href="#release-summary-27">Release Summary</a>
+ - <a href="#minor-changes-10">Minor Changes</a>
+ - <a href="#deprecated-features-2">Deprecated Features</a>
+ - <a href="#bugfixes-21">Bugfixes</a>
+- <a href="#v2-6-0">v2\.6\.0</a>
+ - <a href="#release-summary-28">Release Summary</a>
+ - <a href="#minor-changes-11">Minor Changes</a>
+ - <a href="#deprecated-features-3">Deprecated Features</a>
+ - <a href="#bugfixes-22">Bugfixes</a>
+- <a href="#v2-5-1">v2\.5\.1</a>
+ - <a href="#release-summary-29">Release Summary</a>
+ - <a href="#bugfixes-23">Bugfixes</a>
+- <a href="#v2-5-0">v2\.5\.0</a>
+ - <a href="#release-summary-30">Release Summary</a>
+ - <a href="#minor-changes-12">Minor Changes</a>
+- <a href="#v2-4-0">v2\.4\.0</a>
+ - <a href="#release-summary-31">Release Summary</a>
+ - <a href="#minor-changes-13">Minor Changes</a>
+ - <a href="#bugfixes-24">Bugfixes</a>
+- <a href="#v2-3-0">v2\.3\.0</a>
+ - <a href="#release-summary-32">Release Summary</a>
+ - <a href="#minor-changes-14">Minor Changes</a>
+ - <a href="#bugfixes-25">Bugfixes</a>
+- <a href="#v2-2-1">v2\.2\.1</a>
+ - <a href="#release-summary-33">Release Summary</a>
+ - <a href="#bugfixes-26">Bugfixes</a>
+- <a href="#v2-2-0">v2\.2\.0</a>
+ - <a href="#release-summary-34">Release Summary</a>
+ - <a href="#minor-changes-15">Minor Changes</a>
+ - <a href="#bugfixes-27">Bugfixes</a>
+- <a href="#v2-1-1">v2\.1\.1</a>
+ - <a href="#release-summary-35">Release Summary</a>
+ - <a href="#bugfixes-28">Bugfixes</a>
+- <a href="#v2-1-0">v2\.1\.0</a>
+ - <a href="#release-summary-36">Release Summary</a>
+ - <a href="#minor-changes-16">Minor Changes</a>
+ - <a href="#bugfixes-29">Bugfixes</a>
+- <a href="#v2-0-2">v2\.0\.2</a>
+ - <a href="#release-summary-37">Release Summary</a>
+ - <a href="#bugfixes-30">Bugfixes</a>
+- <a href="#v2-0-1">v2\.0\.1</a>
+ - <a href="#release-summary-38">Release Summary</a>
+- <a href="#v2-0-0">v2\.0\.0</a>
+ - <a href="#release-summary-39">Release Summary</a>
+ - <a href="#breaking-changes--porting-guide-1">Breaking Changes / Porting Guide</a>
+ - <a href="#deprecated-features-4">Deprecated Features</a>
+ - <a href="#removed-features-previously-deprecated-1">Removed Features \(previously deprecated\)</a>
+- <a href="#v1-10-0">v1\.10\.0</a>
+ - <a href="#release-summary-40">Release Summary</a>
+ - <a href="#minor-changes-17">Minor Changes</a>
+- <a href="#v1-9-1">v1\.9\.1</a>
+ - <a href="#release-summary-41">Release Summary</a>
+ - <a href="#bugfixes-31">Bugfixes</a>
+- <a href="#v1-9-0">v1\.9\.0</a>
+ - <a href="#release-summary-42">Release Summary</a>
+ - <a href="#minor-changes-18">Minor Changes</a>
+ - <a href="#deprecated-features-5">Deprecated Features</a>
+ - <a href="#bugfixes-32">Bugfixes</a>
+ - <a href="#new-plugins">New Plugins</a>
+ - <a href="#connection">Connection</a>
+- <a href="#v1-8-0">v1\.8\.0</a>
+ - <a href="#release-summary-43">Release Summary</a>
+ - <a href="#minor-changes-19">Minor Changes</a>
+ - <a href="#bugfixes-33">Bugfixes</a>
+- <a href="#v1-7-0">v1\.7\.0</a>
+ - <a href="#release-summary-44">Release Summary</a>
+ - <a href="#minor-changes-20">Minor Changes</a>
+- <a href="#v1-6-1">v1\.6\.1</a>
+ - <a href="#release-summary-45">Release Summary</a>
+ - <a href="#bugfixes-34">Bugfixes</a>
+- <a href="#v1-6-0">v1\.6\.0</a>
+ - <a href="#release-summary-46">Release Summary</a>
+ - <a href="#minor-changes-21">Minor Changes</a>
+ - <a href="#deprecated-features-6">Deprecated Features</a>
+ - <a href="#bugfixes-35">Bugfixes</a>
+- <a href="#v1-5-0">v1\.5\.0</a>
+ - <a href="#release-summary-47">Release Summary</a>
+ - <a href="#minor-changes-22">Minor Changes</a>
+ - <a href="#bugfixes-36">Bugfixes</a>
+ - <a href="#new-modules-3">New Modules</a>
+- <a href="#v1-4-0">v1\.4\.0</a>
+ - <a href="#release-summary-48">Release Summary</a>
+ - <a href="#minor-changes-23">Minor Changes</a>
+ - <a href="#breaking-changes--porting-guide-2">Breaking Changes / Porting Guide</a>
+ - <a href="#security-fixes-2">Security Fixes</a>
+ - <a href="#bugfixes-37">Bugfixes</a>
+- <a href="#v1-3-0">v1\.3\.0</a>
+ - <a href="#release-summary-49">Release Summary</a>
+ - <a href="#minor-changes-24">Minor Changes</a>
+ - <a href="#bugfixes-38">Bugfixes</a>
+ - <a href="#new-modules-4">New Modules</a>
+- <a href="#v1-2-2">v1\.2\.2</a>
+ - <a href="#release-summary-50">Release Summary</a>
+ - <a href="#security-fixes-3">Security Fixes</a>
+- <a href="#v1-2-1">v1\.2\.1</a>
+ - <a href="#release-summary-51">Release Summary</a>
+ - <a href="#bugfixes-39">Bugfixes</a>
+- <a href="#v1-2-0">v1\.2\.0</a>
+ - <a href="#release-summary-52">Release Summary</a>
+ - <a href="#minor-changes-25">Minor Changes</a>
+ - <a href="#bugfixes-40">Bugfixes</a>
+- <a href="#v1-1-0">v1\.1\.0</a>
+ - <a href="#release-summary-53">Release Summary</a>
+ - <a href="#minor-changes-26">Minor Changes</a>
+ - <a href="#deprecated-features-7">Deprecated Features</a>
+ - <a href="#bugfixes-41">Bugfixes</a>
+ - <a href="#new-plugins-1">New Plugins</a>
+ - <a href="#connection-1">Connection</a>
+ - <a href="#inventory">Inventory</a>
+ - <a href="#new-modules-5">New Modules</a>
+- <a href="#v1-0-1">v1\.0\.1</a>
+ - <a href="#release-summary-54">Release Summary</a>
+ - <a href="#bugfixes-42">Bugfixes</a>
+- <a href="#v1-0-0">v1\.0\.0</a>
+ - <a href="#release-summary-55">Release Summary</a>
+ - <a href="#minor-changes-27">Minor Changes</a>
+- <a href="#v0-1-0">v0\.1\.0</a>
+ - <a href="#release-summary-56">Release Summary</a>
+ - <a href="#minor-changes-28">Minor Changes</a>
+ - <a href="#removed-features-previously-deprecated-2">Removed Features \(previously deprecated\)</a>
+ - <a href="#bugfixes-43">Bugfixes</a>
+
+<a id="v3-8-1"></a>
+## v3\.8\.1
+
+<a id="release-summary"></a>
+### Release Summary
+
+Bugfix release
+
+<a id="security-fixes"></a>
+### Security Fixes
+
+* docker\_containers\, docker\_machine\, and docker\_swarm inventory plugins \- make sure all data received from the Docker daemon / Docker machine is marked as unsafe\, so remote code execution by obtaining texts that can be evaluated as templates is not possible \([https\://www\.die\-welt\.net/2024/03/remote\-code\-execution\-in\-ansible\-dynamic\-inventory\-plugins/](https\://www\.die\-welt\.net/2024/03/remote\-code\-execution\-in\-ansible\-dynamic\-inventory\-plugins/)\, [https\://github\.com/ansible\-collections/community\.docker/pull/815](https\://github\.com/ansible\-collections/community\.docker/pull/815)\)\.
+
+<a id="bugfixes"></a>
+### Bugfixes
+
+* docker\_compose\_v2 \- do not fail when non\-fatal errors occur\. This can happen when pulling an image fails\, but then the image can be built for another service\. Docker Compose emits an error in that case\, but <code>docker compose up</code> still completes successfully \([https\://github\.com/ansible\-collections/community\.docker/issues/807](https\://github\.com/ansible\-collections/community\.docker/issues/807)\, [https\://github\.com/ansible\-collections/community\.docker/pull/810](https\://github\.com/ansible\-collections/community\.docker/pull/810)\, [https\://github\.com/ansible\-collections/community\.docker/pull/811](https\://github\.com/ansible\-collections/community\.docker/pull/811)\)\.
+* docker\_compose\_v2\* modules \- correctly parse <code>Warning</code> events emitted by Docker Compose \([https\://github\.com/ansible\-collections/community\.docker/issues/807](https\://github\.com/ansible\-collections/community\.docker/issues/807)\, [https\://github\.com/ansible\-collections/community\.docker/pull/811](https\://github\.com/ansible\-collections/community\.docker/pull/811)\)\.
+* docker\_compose\_v2\* modules \- parse <code>logfmt</code> warnings emitted by Docker Compose \([https\://github\.com/ansible\-collections/community\.docker/issues/787](https\://github\.com/ansible\-collections/community\.docker/issues/787)\, [https\://github\.com/ansible\-collections/community\.docker/pull/811](https\://github\.com/ansible\-collections/community\.docker/pull/811)\)\.
+* docker\_compose\_v2\_pull \- fixing idempotence by checking actual pull progress events instead of service\-level pull request when <code>policy\=always</code>\. This stops the module from reporting <code>changed\=true</code> if no actual change happened when pulling\. In check mode\, it has to assume that a change happens though \([https\://github\.com/ansible\-collections/community\.docker/issues/813](https\://github\.com/ansible\-collections/community\.docker/issues/813)\, [https\://github\.com/ansible\-collections/community\.docker/pull/814](https\://github\.com/ansible\-collections/community\.docker/pull/814)\)\.
+
+<a id="v3-8-0"></a>
+## v3\.8\.0
+
+<a id="release-summary-1"></a>
+### Release Summary
+
+Bugfix and feature release\.
+
+<a id="minor-changes"></a>
+### Minor Changes
+
+* docker\_compose\_v2 \- allow to wait until containers are running/health when running <code>docker compose up</code> with the new <code>wait</code> option \([https\://github\.com/ansible\-collections/community\.docker/issues/794](https\://github\.com/ansible\-collections/community\.docker/issues/794)\, [https\://github\.com/ansible\-collections/community\.docker/pull/796](https\://github\.com/ansible\-collections/community\.docker/pull/796)\)\.
+* docker\_container \- the <code>pull\_check\_mode\_behavior</code> option now allows to control the module\'s behavior in check mode when <code>pull\=always</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/792](https\://github\.com/ansible\-collections/community\.docker/issues/792)\, [https\://github\.com/ansible\-collections/community\.docker/pull/797](https\://github\.com/ansible\-collections/community\.docker/pull/797)\)\.
+* docker\_container \- the <code>pull</code> option now accepts the three values <code>never</code>\, <code>missing\_image</code> \(default\)\, and <code>never</code>\, next to the previously valid values <code>true</code> \(equivalent to <code>always</code>\) and <code>false</code> \(equivalent to <code>missing\_image</code>\)\. This allows the equivalent to <code>\-\-pull\=never</code> from the Docker command line \([https\://github\.com/ansible\-collections/community\.docker/issues/783](https\://github\.com/ansible\-collections/community\.docker/issues/783)\, [https\://github\.com/ansible\-collections/community\.docker/pull/797](https\://github\.com/ansible\-collections/community\.docker/pull/797)\)\.
+
+<a id="bugfixes-1"></a>
+### Bugfixes
+
+* docker\_compose\_v2 \- do not consider a <code>Waiting</code> event as an action/change \([https\://github\.com/ansible\-collections/community\.docker/pull/804](https\://github\.com/ansible\-collections/community\.docker/pull/804)\)\.
+* docker\_compose\_v2 \- do not treat service\-level pull events as changes to avoid incorrect <code>changed\=true</code> return value of <code>pull\=always</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/802](https\://github\.com/ansible\-collections/community\.docker/issues/802)\, [https\://github\.com/ansible\-collections/community\.docker/pull/803](https\://github\.com/ansible\-collections/community\.docker/pull/803)\)\.
+* docker\_compose\_v2\, docker\_compose\_v2\_pull \- fix parsing of pull messages for Docker Compose 2\.20\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/785](https\://github\.com/ansible\-collections/community\.docker/issues/785)\, [https\://github\.com/ansible\-collections/community\.docker/pull/786](https\://github\.com/ansible\-collections/community\.docker/pull/786)\)\.
+
+<a id="v3-7-0"></a>
+## v3\.7\.0
+
+<a id="release-summary-2"></a>
+### Release Summary
+
+Bugfix and feature release\.
+
+<a id="minor-changes-1"></a>
+### Minor Changes
+
+* docker\_compose\_v2 \- add <code>scale</code> option to allow to explicitly scale services \([https\://github\.com/ansible\-collections/community\.docker/pull/776](https\://github\.com/ansible\-collections/community\.docker/pull/776)\)\.
+* docker\_compose\_v2\, docker\_compose\_v2\_pull \- support <code>files</code> parameter to specify multiple Compose files \([https\://github\.com/ansible\-collections/community\.docker/issues/772](https\://github\.com/ansible\-collections/community\.docker/issues/772)\, [https\://github\.com/ansible\-collections/community\.docker/pull/775](https\://github\.com/ansible\-collections/community\.docker/pull/775)\)\.
+
+<a id="bugfixes-2"></a>
+### Bugfixes
+
+* docker\_compose\_v2 \- properly parse dry\-run build events from <code>stderr</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/778](https\://github\.com/ansible\-collections/community\.docker/issues/778)\, [https\://github\.com/ansible\-collections/community\.docker/pull/779](https\://github\.com/ansible\-collections/community\.docker/pull/779)\)\.
+* docker\_compose\_v2\_pull \- the module was documented as part of the <code>community\.docker\.docker</code> action group\, but was not actually part of it\. That has now been fixed \([https\://github\.com/ansible\-collections/community\.docker/pull/773](https\://github\.com/ansible\-collections/community\.docker/pull/773)\)\.
+
+<a id="new-modules"></a>
+### New Modules
+
+* docker\_image\_export \- Export \(archive\) Docker images
+
+<a id="v3-6-0"></a>
+## v3\.6\.0
+
+<a id="release-summary-3"></a>
+### Release Summary
+
+Bugfix and feature release\.
+
+The collection now includes a bunch of new <code>docker\_image\_\*</code> modules that move features out of the
+rather complex <code>docker\_image</code> module\. These new modules are easier to use and can better declare whether
+they support check mode\, diff mode\, or none of them\.
+
+This version also features modules that support the Docker CLI plugins <code>buildx</code> and <code>compose</code>\.
+The <code>docker\_image\_build</code> module uses the <code>docker buildx</code> command under the hood\, and the <code>docker\_compose\_v2</code>
+and <code>docker\_compose\_v2\_pull</code> modules uses the <code>docker compose</code> command\. All these modules use the Docker CLI
+instead of directly talking to the API\. The modules support mostly the same interface as the API based modules\,
+so the main difference is that instead of some Python requirements\, they depend on the Docker CLI tool <code>docker</code>\.
+
+<a id="major-changes"></a>
+### Major Changes
+
+* The <code>community\.docker</code> collection now depends on the <code>community\.library\_inventory\_filtering\_v1</code> collection\. This utility collection provides host filtering functionality for inventory plugins\. If you use the Ansible community package\, both collections are included and you do not have to do anything special\. If you install the collection with <code>ansible\-galaxy collection install</code>\, it will be installed automatically\. If you install the collection by copying the files of the collection to a place where ansible\-core can find it\, for example by cloning the git repository\, you need to make sure that you also have to install the dependency if you are using the inventory plugins \([https\://github\.com/ansible\-collections/community\.docker/pull/698](https\://github\.com/ansible\-collections/community\.docker/pull/698)\)\.
+
+<a id="minor-changes-2"></a>
+### Minor Changes
+
+* The <code>ca\_cert</code> option available to almost all modules and plugins has been renamed to <code>ca\_path</code>\. The name <code>ca\_path</code> is also used for similar options in ansible\-core and other collections\. The old name has been added as an alias and can still be used \([https\://github\.com/ansible\-collections/community\.docker/pull/744](https\://github\.com/ansible\-collections/community\.docker/pull/744)\)\.
+* The <code>docker\_stack\*</code> modules now use the common CLI\-based module code added for the <code>docker\_image\_build</code> and <code>docker\_compose\_v2</code> modules\. This means that the modules now have various more configuration options with respect to talking to the Docker Daemon\, and now also are part of the <code>community\.docker\.docker</code> and <code>docker</code> module default groups \([https\://github\.com/ansible\-collections/community\.docker/pull/745](https\://github\.com/ansible\-collections/community\.docker/pull/745)\)\.
+* docker\_container \- add <code>networks\[\]\.mac\_address</code> option for Docker API 1\.44\+\. Note that Docker API 1\.44 no longer uses the global <code>mac\_address</code> option\, this new option is the only way to set the MAC address for a container \([https\://github\.com/ansible\-collections/community\.docker/pull/763](https\://github\.com/ansible\-collections/community\.docker/pull/763)\)\.
+* docker\_image \- allow to specify labels and <code>/dev/shm</code> size when building images \([https\://github\.com/ansible\-collections/community\.docker/issues/726](https\://github\.com/ansible\-collections/community\.docker/issues/726)\, [https\://github\.com/ansible\-collections/community\.docker/pull/727](https\://github\.com/ansible\-collections/community\.docker/pull/727)\)\.
+* docker\_image \- allow to specify memory size and swap memory size in other units than bytes \([https\://github\.com/ansible\-collections/community\.docker/pull/727](https\://github\.com/ansible\-collections/community\.docker/pull/727)\)\.
+* inventory plugins \- add <code>filter</code> option which allows to include and exclude hosts based on Jinja2 conditions \([https\://github\.com/ansible\-collections/community\.docker/pull/698](https\://github\.com/ansible\-collections/community\.docker/pull/698)\, [https\://github\.com/ansible\-collections/community\.docker/issues/610](https\://github\.com/ansible\-collections/community\.docker/issues/610)\)\.
+
+<a id="bugfixes-3"></a>
+### Bugfixes
+
+* Use <code>unix\:///var/run/docker\.sock</code> instead of the legacy <code>unix\://var/run/docker\.sock</code> as default for <code>docker\_host</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/736](https\://github\.com/ansible\-collections/community\.docker/pull/736)\)\.
+* docker\_image \- fix archiving idempotency with Docker API 1\.44 or later \([https\://github\.com/ansible\-collections/community\.docker/pull/765](https\://github\.com/ansible\-collections/community\.docker/pull/765)\)\.
+
+<a id="new-modules-1"></a>
+### New Modules
+
+* docker\_compose\_v2 \- Manage multi\-container Docker applications with Docker Compose CLI plugin
+* docker\_compose\_v2\_pull \- Pull a Docker compose project
+* docker\_image\_build \- Build Docker images using Docker buildx
+* docker\_image\_pull \- Pull Docker images from registries
+* docker\_image\_push \- Push Docker images to registries
+* docker\_image\_remove \- Remove Docker images
+* docker\_image\_tag \- Tag Docker images with new names and/or tags
+
+<a id="v3-5-0"></a>
+## v3\.5\.0
+
+<a id="release-summary-4"></a>
+### Release Summary
+
+Bugfix and feature release\.
+
+<a id="minor-changes-3"></a>
+### Minor Changes
+
+* docker\_container \- implement better <code>platform</code> string comparisons to improve idempotency \([https\://github\.com/ansible\-collections/community\.docker/issues/654](https\://github\.com/ansible\-collections/community\.docker/issues/654)\, [https\://github\.com/ansible\-collections/community\.docker/pull/705](https\://github\.com/ansible\-collections/community\.docker/pull/705)\)\.
+* docker\_container \- internal refactorings which allow comparisons to use more information like details of the current image or the Docker host config \([https\://github\.com/ansible\-collections/community\.docker/pull/713](https\://github\.com/ansible\-collections/community\.docker/pull/713)\)\.
+
+<a id="deprecated-features"></a>
+### Deprecated Features
+
+* docker\_container \- the default <code>ignore</code> for the <code>image\_name\_mismatch</code> parameter has been deprecated and will switch to <code>recreate</code> in community\.docker 4\.0\.0\. A deprecation warning will be printed in situations where the default value is used and where a behavior would change once the default changes \([https\://github\.com/ansible\-collections/community\.docker/pull/703](https\://github\.com/ansible\-collections/community\.docker/pull/703)\)\.
+
+<a id="bugfixes-4"></a>
+### Bugfixes
+
+* modules and plugins using the Docker SDK for Python \- remove <code>ssl\_version</code> from the parameters passed to Docker SDK for Python 7\.0\.0\+\. Explicitly fail with a nicer error message if it was explicitly set in this case \([https\://github\.com/ansible\-collections/community\.docker/pull/715](https\://github\.com/ansible\-collections/community\.docker/pull/715)\)\.
+* modules and plugins using the Docker SDK for Python \- remove <code>tls\_hostname</code> from the parameters passed to Docker SDK for Python 7\.0\.0\+\. Explicitly fail with a nicer error message if it was explicitly set in this case \([https\://github\.com/ansible\-collections/community\.docker/pull/721](https\://github\.com/ansible\-collections/community\.docker/pull/721)\)\.
+* vendored Docker SDK for Python \- avoid passing on <code>ssl\_version</code> and <code>tls\_hostname</code> if they were not provided by the user\. Remove dead code\. \([https\://github\.com/ansible\-collections/community\.docker/pull/722](https\://github\.com/ansible\-collections/community\.docker/pull/722)\)\.
+
+<a id="v3-4-11"></a>
+## v3\.4\.11
+
+<a id="release-summary-5"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-5"></a>
+### Bugfixes
+
+* docker\_volume \- fix crash caused by accessing an empty dictionary\. The <code>has\_different\_config\(\)</code> was raising an <code>AttributeError</code> because the <code>self\.existing\_volume\[\"Labels\"\]</code> dictionary was <code>None</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/702](https\://github\.com/ansible\-collections/community\.docker/pull/702)\)\.
+
+<a id="v3-4-10"></a>
+## v3\.4\.10
+
+<a id="release-summary-6"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-6"></a>
+### Bugfixes
+
+* docker\_swarm \- make init and join operations work again with Docker SDK for Python before 4\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/695](https\://github\.com/ansible\-collections/community\.docker/issues/695)\, [https\://github\.com/ansible\-collections/community\.docker/pull/696](https\://github\.com/ansible\-collections/community\.docker/pull/696)\)\.
+
+<a id="v3-4-9"></a>
+## v3\.4\.9
+
+<a id="release-summary-7"></a>
+### Release Summary
+
+Maintenance release with updated documentation and vendored Docker SDK for Python code\.
+
+<a id="bugfixes-7"></a>
+### Bugfixes
+
+* vendored Docker SDK for Python code \- cherry\-pick changes from the Docker SDK for Python code to align code\. These changes should not affect the parts used by the collection\'s code \([https\://github\.com/ansible\-collections/community\.docker/pull/694](https\://github\.com/ansible\-collections/community\.docker/pull/694)\)\.
+
+<a id="v3-4-8"></a>
+## v3\.4\.8
+
+<a id="release-summary-8"></a>
+### Release Summary
+
+Maintenance release with updated documentation\.
+
+From this version on\, community\.docker is using the new [Ansible semantic markup](https\://docs\.ansible\.com/ansible/devel/dev\_guide/developing\_modules\_documenting\.html\#semantic\-markup\-within\-module\-documentation)
+in its documentation\. If you look at documentation with the ansible\-doc CLI tool
+from ansible\-core before 2\.15\, please note that it does not render the markup
+correctly\. You should be still able to read it in most cases\, but you need
+ansible\-core 2\.15 or later to see it as it is intended\. Alternatively you can
+look at [the devel docsite](https\://docs\.ansible\.com/ansible/devel/collections/community/docker/)
+for the rendered HTML version of the documentation of the latest release\.
+
+<a id="known-issues"></a>
+### Known Issues
+
+* Ansible markup will show up in raw form on ansible\-doc text output for ansible\-core before 2\.15\. If you have trouble deciphering the documentation markup\, please upgrade to ansible\-core 2\.15 \(or newer\)\, or read the HTML documentation on [https\://docs\.ansible\.com/ansible/devel/collections/community/docker/](https\://docs\.ansible\.com/ansible/devel/collections/community/docker/)\.
+
+<a id="v3-4-7"></a>
+## v3\.4\.7
+
+<a id="release-summary-9"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-8"></a>
+### Bugfixes
+
+* docker\_swarm\_info \- if <code>service\=true</code> is used\, do not crash when a service without an endpoint spec is encountered \([https\://github\.com/ansible\-collections/community\.docker/issues/636](https\://github\.com/ansible\-collections/community\.docker/issues/636)\, [https\://github\.com/ansible\-collections/community\.docker/pull/637](https\://github\.com/ansible\-collections/community\.docker/pull/637)\)\.
+
+<a id="v3-4-6"></a>
+## v3\.4\.6
+
+<a id="release-summary-10"></a>
+### Release Summary
+
+Bugfix release with documentation warnings about using certain functionality when connecting to the Docker daemon with TCP TLS\.
+
+<a id="bugfixes-9"></a>
+### Bugfixes
+
+* socket\_handler module utils \- make sure this fully works when Docker SDK for Python is not available \([https\://github\.com/ansible\-collections/community\.docker/pull/620](https\://github\.com/ansible\-collections/community\.docker/pull/620)\)\.
+* vendored Docker SDK for Python code \- fix for errors on pipe close in Windows \([https\://github\.com/ansible\-collections/community\.docker/pull/619](https\://github\.com/ansible\-collections/community\.docker/pull/619)\)\.
+* vendored Docker SDK for Python code \- respect timeouts on Windows named pipes \([https\://github\.com/ansible\-collections/community\.docker/pull/619](https\://github\.com/ansible\-collections/community\.docker/pull/619)\)\.
+* vendored Docker SDK for Python code \- use <code>poll\(\)</code> instead of <code>select\(\)</code> except on Windows \([https\://github\.com/ansible\-collections/community\.docker/pull/619](https\://github\.com/ansible\-collections/community\.docker/pull/619)\)\.
+
+<a id="known-issues-1"></a>
+### Known Issues
+
+* docker\_api connection plugin \- does <strong>not work with TCP TLS sockets</strong>\! This is caused by the inability to send an <code>close\_notify</code> TLS alert without closing the connection with Python\'s <code>SSLSocket</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/605](https\://github\.com/ansible\-collections/community\.docker/issues/605)\, [https\://github\.com/ansible\-collections/community\.docker/pull/621](https\://github\.com/ansible\-collections/community\.docker/pull/621)\)\.
+* docker\_container\_exec \- does <strong>not work with TCP TLS sockets</strong> when the <code>stdin</code> option is used\! This is caused by the inability to send an <code>close\_notify</code> TLS alert without closing the connection with Python\'s <code>SSLSocket</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/605](https\://github\.com/ansible\-collections/community\.docker/issues/605)\, [https\://github\.com/ansible\-collections/community\.docker/pull/621](https\://github\.com/ansible\-collections/community\.docker/pull/621)\)\.
+
+<a id="v3-4-5"></a>
+## v3\.4\.5
+
+<a id="release-summary-11"></a>
+### Release Summary
+
+Maintenance release which adds compatibility with requests 2\.29\.0 and 2\.30\.0 and urllib3 2\.0\.
+
+<a id="bugfixes-10"></a>
+### Bugfixes
+
+* Make vendored Docker SDK for Python code compatible with requests 2\.29\.0 and urllib3 2\.0 \([https\://github\.com/ansible\-collections/community\.docker/pull/613](https\://github\.com/ansible\-collections/community\.docker/pull/613)\)\.
+
+<a id="v3-4-4"></a>
+## v3\.4\.4
+
+<a id="release-summary-12"></a>
+### Release Summary
+
+Maintenance release with updated EE requirements and updated documentation\.
+
+<a id="minor-changes-4"></a>
+### Minor Changes
+
+* Restrict requests to versions before 2\.29\.0\, and urllib3 to versions before 2\.0\.0\. This is necessary until the vendored code from Docker SDK for Python has been fully adjusted to work with a feature of urllib3 that is used since requests 2\.29\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/611](https\://github\.com/ansible\-collections/community\.docker/issues/611)\, [https\://github\.com/ansible\-collections/community\.docker/pull/612](https\://github\.com/ansible\-collections/community\.docker/pull/612)\)\.
+
+<a id="known-issues-2"></a>
+### Known Issues
+
+* The modules and plugins using the vendored code from Docker SDK for Python currently do not work with requests 2\.29\.0 and/or urllib3 2\.0\.0\. The same is currently true for the latest version of Docker SDK for Python itself \([https\://github\.com/ansible\-collections/community\.docker/issues/611](https\://github\.com/ansible\-collections/community\.docker/issues/611)\, [https\://github\.com/ansible\-collections/community\.docker/pull/612](https\://github\.com/ansible\-collections/community\.docker/pull/612)\)\.
+
+<a id="v3-4-3"></a>
+## v3\.4\.3
+
+<a id="release-summary-13"></a>
+### Release Summary
+
+Maintenance release with improved documentation\.
+
+<a id="v3-4-2"></a>
+## v3\.4\.2
+
+<a id="release-summary-14"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-11"></a>
+### Bugfixes
+
+* docker\_prune \- return correct value for <code>changed</code>\. So far the module always claimed that nothing changed \([https\://github\.com/ansible\-collections/community\.docker/pull/593](https\://github\.com/ansible\-collections/community\.docker/pull/593)\)\.
+
+<a id="v3-4-1"></a>
+## v3\.4\.1
+
+<a id="release-summary-15"></a>
+### Release Summary
+
+Regular bugfix release\.
+
+<a id="bugfixes-12"></a>
+### Bugfixes
+
+* docker\_api connection plugin\, docker\_container\_exec\, docker\_container\_copy\_into \- properly close socket to Daemon after executing commands in containers \([https\://github\.com/ansible\-collections/community\.docker/pull/582](https\://github\.com/ansible\-collections/community\.docker/pull/582)\)\.
+* docker\_container \- fix <code>tmfs\_size</code> and <code>tmpfs\_mode</code> not being set \([https\://github\.com/ansible\-collections/community\.docker/pull/580](https\://github\.com/ansible\-collections/community\.docker/pull/580)\)\.
+* various plugins and modules \- remove unnecessary imports \([https\://github\.com/ansible\-collections/community\.docker/pull/574](https\://github\.com/ansible\-collections/community\.docker/pull/574)\)\.
+
+<a id="v3-4-0"></a>
+## v3\.4\.0
+
+<a id="release-summary-16"></a>
+### Release Summary
+
+Regular bugfix and feature release\.
+
+<a id="minor-changes-5"></a>
+### Minor Changes
+
+* docker\_api connection plugin \- when copying files to/from a container\, stream the file contents instead of first reading them to memory \([https\://github\.com/ansible\-collections/community\.docker/pull/545](https\://github\.com/ansible\-collections/community\.docker/pull/545)\)\.
+* docker\_host\_info \- allow to list all containers with new option <code>containers\_all</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/535](https\://github\.com/ansible\-collections/community\.docker/issues/535)\, [https\://github\.com/ansible\-collections/community\.docker/pull/538](https\://github\.com/ansible\-collections/community\.docker/pull/538)\)\.
+
+<a id="bugfixes-13"></a>
+### Bugfixes
+
+* docker\_api connection plugin \- fix error handling when 409 Conflict is returned by the Docker daemon in case of a stopped container \([https\://github\.com/ansible\-collections/community\.docker/pull/546](https\://github\.com/ansible\-collections/community\.docker/pull/546)\)\.
+* docker\_container\_exec \- fix error handling when 409 Conflict is returned by the Docker daemon in case of a stopped container \([https\://github\.com/ansible\-collections/community\.docker/pull/546](https\://github\.com/ansible\-collections/community\.docker/pull/546)\)\.
+* docker\_plugin \- do not crash if plugin is installed in check mode \([https\://github\.com/ansible\-collections/community\.docker/issues/552](https\://github\.com/ansible\-collections/community\.docker/issues/552)\, [https\://github\.com/ansible\-collections/community\.docker/pull/553](https\://github\.com/ansible\-collections/community\.docker/pull/553)\)\.
+* most modules \- fix handling of <code>DOCKER\_TIMEOUT</code> environment variable\, and improve handling of other fallback environment variables \([https\://github\.com/ansible\-collections/community\.docker/issues/551](https\://github\.com/ansible\-collections/community\.docker/issues/551)\, [https\://github\.com/ansible\-collections/community\.docker/pull/554](https\://github\.com/ansible\-collections/community\.docker/pull/554)\)\.
+
+<a id="new-modules-2"></a>
+### New Modules
+
+* docker\_container\_copy\_into \- Copy a file into a Docker container
+
+<a id="v3-3-2"></a>
+## v3\.3\.2
+
+<a id="release-summary-17"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-14"></a>
+### Bugfixes
+
+* docker\_container \- when <code>detach\=false</code>\, wait indefinitely and not at most one minute\. This was the behavior with Docker SDK for Python\, and was accidentally changed in 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/526](https\://github\.com/ansible\-collections/community\.docker/issues/526)\, [https\://github\.com/ansible\-collections/community\.docker/pull/527](https\://github\.com/ansible\-collections/community\.docker/pull/527)\)\.
+
+<a id="v3-3-1"></a>
+## v3\.3\.1
+
+<a id="release-summary-18"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-15"></a>
+### Bugfixes
+
+* current\_container\_facts \- make container detection work better in more cases \([https\://github\.com/ansible\-collections/community\.docker/pull/522](https\://github\.com/ansible\-collections/community\.docker/pull/522)\)\.
+
+<a id="v3-3-0"></a>
+## v3\.3\.0
+
+<a id="release-summary-19"></a>
+### Release Summary
+
+Feature and bugfix release\.
+
+<a id="minor-changes-6"></a>
+### Minor Changes
+
+* current\_container\_facts \- make work with current Docker version\, also support Podman \([https\://github\.com/ansible\-collections/community\.docker/pull/510](https\://github\.com/ansible\-collections/community\.docker/pull/510)\)\.
+* docker\_image \- when using <code>archive\_path</code>\, detect whether changes are necessary based on the image ID \(hash\)\. If the existing tar archive matches the source\, do nothing\. Previously\, each task execution re\-created the archive \([https\://github\.com/ansible\-collections/community\.docker/pull/500](https\://github\.com/ansible\-collections/community\.docker/pull/500)\)\.
+
+<a id="bugfixes-16"></a>
+### Bugfixes
+
+* docker\_container\_exec \- fix <code>chdir</code> option which was ignored since community\.docker 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/517](https\://github\.com/ansible\-collections/community\.docker/issues/517)\, [https\://github\.com/ansible\-collections/community\.docker/pull/518](https\://github\.com/ansible\-collections/community\.docker/pull/518)\)\.
+* vendored latest Docker SDK for Python bugfix \([https\://github\.com/ansible\-collections/community\.docker/pull/513](https\://github\.com/ansible\-collections/community\.docker/pull/513)\, [https\://github\.com/docker/docker\-py/issues/3045](https\://github\.com/docker/docker\-py/issues/3045)\)\.
+
+<a id="v3-2-2"></a>
+## v3\.2\.2
+
+<a id="release-summary-20"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-17"></a>
+### Bugfixes
+
+* docker\_container \- the <code>kill\_signal</code> option erroneously did not accept strings anymore since 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/505](https\://github\.com/ansible\-collections/community\.docker/issues/505)\, [https\://github\.com/ansible\-collections/community\.docker/pull/506](https\://github\.com/ansible\-collections/community\.docker/pull/506)\)\.
+
+<a id="v3-2-1"></a>
+## v3\.2\.1
+
+<a id="release-summary-21"></a>
+### Release Summary
+
+Maintenance release with improved documentation\.
+
+<a id="v3-2-0"></a>
+## v3\.2\.0
+
+<a id="release-summary-22"></a>
+### Release Summary
+
+Feature and deprecation release\.
+
+<a id="minor-changes-7"></a>
+### Minor Changes
+
+* docker\_container \- added <code>image\_name\_mismatch</code> option which allows to control the behavior if the container uses the image specified\, but the container\'s configuration uses a different name for the image than the one provided to the module \([https\://github\.com/ansible\-collections/community\.docker/issues/485](https\://github\.com/ansible\-collections/community\.docker/issues/485)\, [https\://github\.com/ansible\-collections/community\.docker/pull/488](https\://github\.com/ansible\-collections/community\.docker/pull/488)\)\.
+
+<a id="deprecated-features-1"></a>
+### Deprecated Features
+
+* docker\_container \- the <code>ignore\_image</code> option is deprecated and will be removed in community\.docker 4\.0\.0\. Use <code>image\: ignore</code> in <code>comparisons</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/487](https\://github\.com/ansible\-collections/community\.docker/pull/487)\)\.
+* docker\_container \- the <code>purge\_networks</code> option is deprecated and will be removed in community\.docker 4\.0\.0\. Use <code>networks\: strict</code> in <code>comparisons</code> instead\, and make sure to provide <code>networks</code>\, with value <code>\[\]</code> if all networks should be removed \([https\://github\.com/ansible\-collections/community\.docker/pull/487](https\://github\.com/ansible\-collections/community\.docker/pull/487)\)\.
+
+<a id="v3-1-0"></a>
+## v3\.1\.0
+
+<a id="release-summary-23"></a>
+### Release Summary
+
+Feature release\.
+
+<a id="minor-changes-8"></a>
+### Minor Changes
+
+* The collection repository conforms to the [REUSE specification](https\://reuse\.software/spec/) except for the changelog fragments \([https\://github\.com/ansible\-collections/community\.docker/pull/462](https\://github\.com/ansible\-collections/community\.docker/pull/462)\)\.
+* docker\_swarm \- allows usage of the <code>data\_path\_port</code> parameter when initializing a swarm \([https\://github\.com/ansible\-collections/community\.docker/issues/296](https\://github\.com/ansible\-collections/community\.docker/issues/296)\)\.
+
+<a id="v3-0-2"></a>
+## v3\.0\.2
+
+<a id="release-summary-24"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-18"></a>
+### Bugfixes
+
+* docker\_image \- fix build argument handling \([https\://github\.com/ansible\-collections/community\.docker/issues/455](https\://github\.com/ansible\-collections/community\.docker/issues/455)\, [https\://github\.com/ansible\-collections/community\.docker/pull/456](https\://github\.com/ansible\-collections/community\.docker/pull/456)\)\.
+
+<a id="v3-0-1"></a>
+## v3\.0\.1
+
+<a id="release-summary-25"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-19"></a>
+### Bugfixes
+
+* docker\_container \- fix handling of <code>env\_file</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/451](https\://github\.com/ansible\-collections/community\.docker/issues/451)\, [https\://github\.com/ansible\-collections/community\.docker/pull/452](https\://github\.com/ansible\-collections/community\.docker/pull/452)\)\.
+
+<a id="v3-0-0"></a>
+## v3\.0\.0
+
+<a id="release-summary-26"></a>
+### Release Summary
+
+The 3\.0\.0 release features a rewrite of the <code>docker\_container</code> module\, and many modules and plugins no longer depend on the Docker SDK for Python\.
+
+<a id="major-changes-1"></a>
+### Major Changes
+
+* The collection now contains vendored code from the Docker SDK for Python to talk to the Docker daemon\. Modules and plugins using this code no longer need the Docker SDK for Python installed on the machine the module or plugin is running on \([https\://github\.com/ansible\-collections/community\.docker/pull/398](https\://github\.com/ansible\-collections/community\.docker/pull/398)\)\.
+* docker\_api connection plugin \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/414](https\://github\.com/ansible\-collections/community\.docker/pull/414)\)\.
+* docker\_container \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\.
+* docker\_container \- the module was completely rewritten from scratch \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\.
+* docker\_container\_exec \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/401](https\://github\.com/ansible\-collections/community\.docker/pull/401)\)\.
+* docker\_container\_info \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/402](https\://github\.com/ansible\-collections/community\.docker/pull/402)\)\.
+* docker\_containers inventory plugin \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/413](https\://github\.com/ansible\-collections/community\.docker/pull/413)\)\.
+* docker\_host\_info \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/403](https\://github\.com/ansible\-collections/community\.docker/pull/403)\)\.
+* docker\_image \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/404](https\://github\.com/ansible\-collections/community\.docker/pull/404)\)\.
+* docker\_image\_info \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/405](https\://github\.com/ansible\-collections/community\.docker/pull/405)\)\.
+* docker\_image\_load \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/406](https\://github\.com/ansible\-collections/community\.docker/pull/406)\)\.
+* docker\_login \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/407](https\://github\.com/ansible\-collections/community\.docker/pull/407)\)\.
+* docker\_network \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/408](https\://github\.com/ansible\-collections/community\.docker/pull/408)\)\.
+* docker\_network\_info \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/409](https\://github\.com/ansible\-collections/community\.docker/pull/409)\)\.
+* docker\_plugin \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/429](https\://github\.com/ansible\-collections/community\.docker/pull/429)\)\.
+* docker\_prune \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/410](https\://github\.com/ansible\-collections/community\.docker/pull/410)\)\.
+* docker\_volume \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/411](https\://github\.com/ansible\-collections/community\.docker/pull/411)\)\.
+* docker\_volume\_info \- no longer uses the Docker SDK for Python\. It requires <code>requests</code> to be installed\, and depending on the features used has some more requirements\. If the Docker SDK for Python is installed\, these requirements are likely met \([https\://github\.com/ansible\-collections/community\.docker/pull/412](https\://github\.com/ansible\-collections/community\.docker/pull/412)\)\.
+
+<a id="minor-changes-9"></a>
+### Minor Changes
+
+* All software licenses are now in the <code>LICENSES/</code> directory of the collection root\. Moreover\, <code>SPDX\-License\-Identifier\:</code> is used to declare the applicable license for every file that is not automatically generated \([https\://github\.com/ansible\-collections/community\.docker/pull/430](https\://github\.com/ansible\-collections/community\.docker/pull/430)\)\.
+* Remove vendored copy of <code>distutils\.version</code> in favor of vendored copy included with ansible\-core 2\.12\+\. For ansible\-core 2\.11\, uses <code>distutils\.version</code> for Python \< 3\.12\. There is no support for ansible\-core 2\.11 with Python 3\.12\+ \([https\://github\.com/ansible\-collections/community\.docker/pull/271](https\://github\.com/ansible\-collections/community\.docker/pull/271)\)\.
+* docker\_container \- add a new parameter <code>image\_comparison</code> to control the behavior for which image will be used for idempotency checks \([https\://github\.com/ansible\-collections/community\.docker/issues/421](https\://github\.com/ansible\-collections/community\.docker/issues/421)\, [https\://github\.com/ansible\-collections/community\.docker/pull/428](https\://github\.com/ansible\-collections/community\.docker/pull/428)\)\.
+* docker\_container \- add support for <code>cgroupns\_mode</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/338](https\://github\.com/ansible\-collections/community\.docker/issues/338)\, [https\://github\.com/ansible\-collections/community\.docker/pull/427](https\://github\.com/ansible\-collections/community\.docker/pull/427)\)\.
+* docker\_container \- allow to specify <code>platform</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/123](https\://github\.com/ansible\-collections/community\.docker/issues/123)\, [https\://github\.com/ansible\-collections/community\.docker/pull/426](https\://github\.com/ansible\-collections/community\.docker/pull/426)\)\.
+* modules and plugins communicating directly with the Docker daemon \- improve default TLS version selection for Python 3\.6 and newer\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\.
+* modules and plugins communicating directly with the Docker daemon \- simplify use of helper function that was removed in Docker SDK for Python to find executables \([https\://github\.com/ansible\-collections/community\.docker/pull/438](https\://github\.com/ansible\-collections/community\.docker/pull/438)\)\.
+* socker\_handler and socket\_helper module utils \- improve Python forward compatibility\, create helper functions for file blocking/unblocking \([https\://github\.com/ansible\-collections/community\.docker/pull/415](https\://github\.com/ansible\-collections/community\.docker/pull/415)\)\.
+
+<a id="breaking-changes--porting-guide"></a>
+### Breaking Changes / Porting Guide
+
+* This collection does not work with ansible\-core 2\.11 on Python 3\.12\+\. Please either upgrade to ansible\-core 2\.12\+\, or use Python 3\.11 or earlier \([https\://github\.com/ansible\-collections/community\.docker/pull/271](https\://github\.com/ansible\-collections/community\.docker/pull/271)\)\.
+* docker\_container \- <code>exposed\_ports</code> is no longer ignored in <code>comparisons</code>\. Before\, its value was assumed to be identical with the value of <code>published\_ports</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\.
+* docker\_container \- <code>log\_options</code> can no longer be specified when <code>log\_driver</code> is not specified \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\.
+* docker\_container \- <code>publish\_all\_ports</code> is no longer ignored in <code>comparisons</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\.
+* docker\_container \- <code>restart\_retries</code> can no longer be specified when <code>restart\_policy</code> is not specified \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\.
+* docker\_container \- <code>stop\_timeout</code> is no longer ignored for idempotency if told to be not ignored in <code>comparisons</code>\. So far it defaulted to <code>ignore</code> there\, and setting it to <code>strict</code> had no effect \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\.
+* modules and plugins communicating directly with the Docker daemon \- when connecting by SSH and not using <code>use\_ssh\_client\=true</code>\, reject unknown host keys instead of accepting them\. This is only a breaking change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\.
+
+<a id="removed-features-previously-deprecated"></a>
+### Removed Features \(previously deprecated\)
+
+* Execution Environments built with community\.docker no longer include docker\-compose \< 2\.0\.0\. If you need to use it with the <code>docker\_compose</code> module\, please install that requirement manually \([https\://github\.com/ansible\-collections/community\.docker/pull/400](https\://github\.com/ansible\-collections/community\.docker/pull/400)\)\.
+* Support for Ansible 2\.9 and ansible\-base 2\.10 has been removed\. If you need support for Ansible 2\.9 or ansible\-base 2\.10\, please use community\.docker 2\.x\.y \([https\://github\.com/ansible\-collections/community\.docker/pull/400](https\://github\.com/ansible\-collections/community\.docker/pull/400)\)\.
+* Support for Docker API versions 1\.20 to 1\.24 has been removed\. If you need support for these API versions\, please use community\.docker 2\.x\.y \([https\://github\.com/ansible\-collections/community\.docker/pull/400](https\://github\.com/ansible\-collections/community\.docker/pull/400)\)\.
+* Support for Python 2\.6 has been removed\. If you need support for Python 2\.6\, please use community\.docker 2\.x\.y \([https\://github\.com/ansible\-collections/community\.docker/pull/400](https\://github\.com/ansible\-collections/community\.docker/pull/400)\)\.
+* Various modules \- the default of <code>tls\_hostname</code> \(<code>localhost</code>\) has been removed\. If you want to continue using <code>localhost</code>\, you need to specify it explicitly \([https\://github\.com/ansible\-collections/community\.docker/pull/363](https\://github\.com/ansible\-collections/community\.docker/pull/363)\)\.
+* docker\_container \- the <code>all</code> value is no longer allowed in <code>published\_ports</code>\. Use <code>publish\_all\_ports\=true</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/399](https\://github\.com/ansible\-collections/community\.docker/pull/399)\)\.
+* docker\_container \- the default of <code>command\_handling</code> was changed from <code>compatibility</code> to <code>correct</code>\. Older versions were warning for every invocation of the module when this would result in a change of behavior \([https\://github\.com/ansible\-collections/community\.docker/pull/399](https\://github\.com/ansible\-collections/community\.docker/pull/399)\)\.
+* docker\_stack \- the return values <code>out</code> and <code>err</code> have been removed\. Use <code>stdout</code> and <code>stderr</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/363](https\://github\.com/ansible\-collections/community\.docker/pull/363)\)\.
+
+<a id="security-fixes-1"></a>
+### Security Fixes
+
+* modules and plugins communicating directly with the Docker daemon \- when connecting by SSH and not using <code>use\_ssh\_client\=true</code>\, reject unknown host keys instead of accepting them\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\.
+
+<a id="bugfixes-20"></a>
+### Bugfixes
+
+* docker\_image \- when composing the build context\, trim trailing whitespace from <code>\.dockerignore</code> entries\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\.
+* docker\_plugin \- fix crash when handling plugin options \([https\://github\.com/ansible\-collections/community\.docker/issues/446](https\://github\.com/ansible\-collections/community\.docker/issues/446)\, [https\://github\.com/ansible\-collections/community\.docker/pull/447](https\://github\.com/ansible\-collections/community\.docker/pull/447)\)\.
+* docker\_stack \- fix broken string formatting when reporting error in case <code>compose</code> was containing invalid values \([https\://github\.com/ansible\-collections/community\.docker/pull/448](https\://github\.com/ansible\-collections/community\.docker/pull/448)\)\.
+* modules and plugins communicating directly with the Docker daemon \- do not create a subshell for SSH connections when using <code>use\_ssh\_client\=true</code>\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\.
+* modules and plugins communicating directly with the Docker daemon \- fix <code>ProxyCommand</code> handling for SSH connections when not using <code>use\_ssh\_client\=true</code>\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\.
+* modules and plugins communicating directly with the Docker daemon \- fix parsing of IPv6 addresses with a port in <code>docker\_host</code>\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\.
+* modules and plugins communicating directly with the Docker daemon \- prevent crash when TLS is used \([https\://github\.com/ansible\-collections/community\.docker/pull/432](https\://github\.com/ansible\-collections/community\.docker/pull/432)\)\.
+
+<a id="v2-7-0"></a>
+## v2\.7\.0
+
+<a id="release-summary-27"></a>
+### Release Summary
+
+Bugfix and deprecation release\. The next 2\.x\.y releases will only be bugfix releases\, the next expect minor/major release will be 3\.0\.0 with some major changes\.
+
+<a id="minor-changes-10"></a>
+### Minor Changes
+
+* Move common utility functions from the <code>common</code> module\_util to a new module\_util called <code>util</code>\. This should not have any user\-visible effect \([https\://github\.com/ansible\-collections/community\.docker/pull/390](https\://github\.com/ansible\-collections/community\.docker/pull/390)\)\.
+
+<a id="deprecated-features-2"></a>
+### Deprecated Features
+
+* Support for Docker API version 1\.20 to 1\.24 has been deprecated and will be removed in community\.docker 3\.0\.0\. The first Docker version supporting API version 1\.25 was Docker 1\.13\, released in January 2017\. This affects the modules <code>docker\_container</code>\, <code>docker\_container\_exec</code>\, <code>docker\_container\_info</code>\, <code>docker\_compose</code>\, <code>docker\_login</code>\, <code>docker\_image</code>\, <code>docker\_image\_info</code>\, <code>docker\_image\_load</code>\, <code>docker\_host\_info</code>\, <code>docker\_network</code>\, <code>docker\_network\_info</code>\, <code>docker\_node\_info</code>\, <code>docker\_swarm\_info</code>\, <code>docker\_swarm\_service</code>\, <code>docker\_swarm\_service\_info</code>\, <code>docker\_volume\_info</code>\, and <code>docker\_volume</code>\, whose minimally supported API version is between 1\.20 and 1\.24 \([https\://github\.com/ansible\-collections/community\.docker/pull/396](https\://github\.com/ansible\-collections/community\.docker/pull/396)\)\.
+* Support for Python 2\.6 is deprecated and will be removed in the next major release \(community\.docker 3\.0\.0\)\. Some modules might still work with Python 2\.6\, but we will no longer try to ensure compatibility \([https\://github\.com/ansible\-collections/community\.docker/pull/388](https\://github\.com/ansible\-collections/community\.docker/pull/388)\)\.
+
+<a id="bugfixes-21"></a>
+### Bugfixes
+
+* Docker SDK for Python based modules and plugins \- if the API version is specified as an option\, use that one to validate API version requirements of module/plugin options instead of the latest API version supported by the Docker daemon\. This also avoids one unnecessary API call per module/plugin \([https\://github\.com/ansible\-collections/community\.docker/pull/389](https\://github\.com/ansible\-collections/community\.docker/pull/389)\)\.
+
+<a id="v2-6-0"></a>
+## v2\.6\.0
+
+<a id="release-summary-28"></a>
+### Release Summary
+
+Bugfix and feature release\.
+
+<a id="minor-changes-11"></a>
+### Minor Changes
+
+* docker\_container \- added <code>image\_label\_mismatch</code> parameter \([https\://github\.com/ansible\-collections/community\.docker/issues/314](https\://github\.com/ansible\-collections/community\.docker/issues/314)\, [https\://github\.com/ansible\-collections/community\.docker/pull/370](https\://github\.com/ansible\-collections/community\.docker/pull/370)\)\.
+
+<a id="deprecated-features-3"></a>
+### Deprecated Features
+
+* Support for Ansible 2\.9 and ansible\-base 2\.10 is deprecated\, and will be removed in the next major release \(community\.docker 3\.0\.0\)\. Some modules might still work with these versions afterwards\, but we will no longer keep compatibility code that was needed to support them \([https\://github\.com/ansible\-collections/community\.docker/pull/361](https\://github\.com/ansible\-collections/community\.docker/pull/361)\)\.
+* The dependency on docker\-compose for Execution Environments is deprecated and will be removed in community\.docker 3\.0\.0\. The [Python docker\-compose library](https\://pypi\.org/project/docker\-compose/) is unmaintained and can cause dependency issues\. You can manually still install it in an Execution Environment when needed \([https\://github\.com/ansible\-collections/community\.docker/pull/373](https\://github\.com/ansible\-collections/community\.docker/pull/373)\)\.
+* Various modules \- the default of <code>tls\_hostname</code> that was supposed to be removed in community\.docker 2\.0\.0 will now be removed in version 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/pull/362](https\://github\.com/ansible\-collections/community\.docker/pull/362)\)\.
+* docker\_stack \- the return values <code>out</code> and <code>err</code> that were supposed to be removed in community\.docker 2\.0\.0 will now be removed in version 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/pull/362](https\://github\.com/ansible\-collections/community\.docker/pull/362)\)\.
+
+<a id="bugfixes-22"></a>
+### Bugfixes
+
+* docker\_container \- fail with a meaningful message instead of crashing if a port is specified with more than three colon\-separated parts \([https\://github\.com/ansible\-collections/community\.docker/pull/367](https\://github\.com/ansible\-collections/community\.docker/pull/367)\, [https\://github\.com/ansible\-collections/community\.docker/issues/365](https\://github\.com/ansible\-collections/community\.docker/issues/365)\)\.
+* docker\_container \- remove unused code that will cause problems with Python 3\.13 \([https\://github\.com/ansible\-collections/community\.docker/pull/354](https\://github\.com/ansible\-collections/community\.docker/pull/354)\)\.
+
+<a id="v2-5-1"></a>
+## v2\.5\.1
+
+<a id="release-summary-29"></a>
+### Release Summary
+
+Maintenance release\.
+
+<a id="bugfixes-23"></a>
+### Bugfixes
+
+* Include <code>PSF\-license\.txt</code> file for <code>plugins/module\_utils/\_version\.py</code>\.
+
+<a id="v2-5-0"></a>
+## v2\.5\.0
+
+<a id="release-summary-30"></a>
+### Release Summary
+
+Regular feature release\.
+
+<a id="minor-changes-12"></a>
+### Minor Changes
+
+* docker\_config \- add support for <code>template\_driver</code> with one option <code>golang</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/332](https\://github\.com/ansible\-collections/community\.docker/issues/332)\, [https\://github\.com/ansible\-collections/community\.docker/pull/345](https\://github\.com/ansible\-collections/community\.docker/pull/345)\)\.
+* docker\_swarm \- adds <code>data\_path\_addr</code> parameter during swarm initialization or when joining \([https\://github\.com/ansible\-collections/community\.docker/issues/339](https\://github\.com/ansible\-collections/community\.docker/issues/339)\)\.
+
+<a id="v2-4-0"></a>
+## v2\.4\.0
+
+<a id="release-summary-31"></a>
+### Release Summary
+
+Regular feature and bugfix release\.
+
+<a id="minor-changes-13"></a>
+### Minor Changes
+
+* Prepare collection for inclusion in an Execution Environment by declaring its dependencies\. The <code>docker\_stack\*</code> modules are not supported \([https\://github\.com/ansible\-collections/community\.docker/pull/336](https\://github\.com/ansible\-collections/community\.docker/pull/336)\)\.
+* current\_container\_facts \- add detection for GitHub Actions \([https\://github\.com/ansible\-collections/community\.docker/pull/336](https\://github\.com/ansible\-collections/community\.docker/pull/336)\)\.
+* docker\_container \- support returning Docker container log output when using Docker\'s <code>local</code> logging driver\, an optimized local logging driver introduced in Docker 18\.09 \([https\://github\.com/ansible\-collections/community\.docker/pull/337](https\://github\.com/ansible\-collections/community\.docker/pull/337)\)\.
+
+<a id="bugfixes-24"></a>
+### Bugfixes
+
+* docker connection plugin \- make sure that <code>docker\_extra\_args</code> is used for querying the Docker version\. Also ensures that the Docker version is only queried when needed\. This is currently the case if a remote user is specified \([https\://github\.com/ansible\-collections/community\.docker/issues/325](https\://github\.com/ansible\-collections/community\.docker/issues/325)\, [https\://github\.com/ansible\-collections/community\.docker/pull/327](https\://github\.com/ansible\-collections/community\.docker/pull/327)\)\.
+
+<a id="v2-3-0"></a>
+## v2\.3\.0
+
+<a id="release-summary-32"></a>
+### Release Summary
+
+Regular feature and bugfix release\.
+
+<a id="minor-changes-14"></a>
+### Minor Changes
+
+* docker connection plugin \- implement connection reset by clearing internal container user cache \([https\://github\.com/ansible\-collections/community\.docker/pull/312](https\://github\.com/ansible\-collections/community\.docker/pull/312)\)\.
+* docker connection plugin \- simplify <code>actual\_user</code> handling code \([https\://github\.com/ansible\-collections/community\.docker/pull/311](https\://github\.com/ansible\-collections/community\.docker/pull/311)\)\.
+* docker connection plugin \- the plugin supports new ways to define the timeout\. These are the <code>ANSIBLE\_DOCKER\_TIMEOUT</code> environment variable\, the <code>timeout</code> setting in the <code>docker\_connection</code> section of <code>ansible\.cfg</code>\, and the <code>ansible\_docker\_timeout</code> variable \([https\://github\.com/ansible\-collections/community\.docker/pull/297](https\://github\.com/ansible\-collections/community\.docker/pull/297)\)\.
+* docker\_api connection plugin \- implement connection reset by clearing internal container user/group ID cache \([https\://github\.com/ansible\-collections/community\.docker/pull/312](https\://github\.com/ansible\-collections/community\.docker/pull/312)\)\.
+* docker\_api connection plugin \- the plugin supports new ways to define the timeout\. These are the <code>ANSIBLE\_DOCKER\_TIMEOUT</code> environment variable\, the <code>timeout</code> setting in the <code>docker\_connection</code> section of <code>ansible\.cfg</code>\, and the <code>ansible\_docker\_timeout</code> variable \([https\://github\.com/ansible\-collections/community\.docker/pull/308](https\://github\.com/ansible\-collections/community\.docker/pull/308)\)\.
+
+<a id="bugfixes-25"></a>
+### Bugfixes
+
+* docker connection plugin \- fix option handling to be compatible with ansible\-core 2\.13 \([https\://github\.com/ansible\-collections/community\.docker/pull/297](https\://github\.com/ansible\-collections/community\.docker/pull/297)\, [https\://github\.com/ansible\-collections/community\.docker/issues/307](https\://github\.com/ansible\-collections/community\.docker/issues/307)\)\.
+* docker\_api connection plugin \- fix option handling to be compatible with ansible\-core 2\.13 \([https\://github\.com/ansible\-collections/community\.docker/pull/308](https\://github\.com/ansible\-collections/community\.docker/pull/308)\)\.
+
+<a id="v2-2-1"></a>
+## v2\.2\.1
+
+<a id="release-summary-33"></a>
+### Release Summary
+
+Regular bugfix release\.
+
+<a id="bugfixes-26"></a>
+### Bugfixes
+
+* docker\_compose \- fix Python 3 type error when extracting warnings or errors from docker\-compose\'s output \([https\://github\.com/ansible\-collections/community\.docker/pull/305](https\://github\.com/ansible\-collections/community\.docker/pull/305)\)\.
+
+<a id="v2-2-0"></a>
+## v2\.2\.0
+
+<a id="release-summary-34"></a>
+### Release Summary
+
+Regular feature and bugfix release\.
+
+<a id="minor-changes-15"></a>
+### Minor Changes
+
+* docker\_config \- add support for rolling update\, set <code>rolling\_versions</code> to <code>true</code> to enable \([https\://github\.com/ansible\-collections/community\.docker/pull/295](https\://github\.com/ansible\-collections/community\.docker/pull/295)\, [https\://github\.com/ansible\-collections/community\.docker/issues/109](https\://github\.com/ansible\-collections/community\.docker/issues/109)\)\.
+* docker\_secret \- add support for rolling update\, set <code>rolling\_versions</code> to <code>true</code> to enable \([https\://github\.com/ansible\-collections/community\.docker/pull/293](https\://github\.com/ansible\-collections/community\.docker/pull/293)\, [https\://github\.com/ansible\-collections/community\.docker/issues/21](https\://github\.com/ansible\-collections/community\.docker/issues/21)\)\.
+* docker\_swarm\_service \- add support for setting capabilities with the <code>cap\_add</code> and <code>cap\_drop</code> parameters\. Usage is the same as with the <code>capabilities</code> and <code>cap\_drop</code> parameters for <code>docker\_container</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/294](https\://github\.com/ansible\-collections/community\.docker/pull/294)\)\.
+
+<a id="bugfixes-27"></a>
+### Bugfixes
+
+* docker\_container\, docker\_image \- adjust image finding code to peculiarities of <code>podman\-docker</code>\'s API emulation when Docker short names like <code>redis</code> are used \([https\://github\.com/ansible\-collections/community\.docker/issues/292](https\://github\.com/ansible\-collections/community\.docker/issues/292)\)\.
+
+<a id="v2-1-1"></a>
+## v2\.1\.1
+
+<a id="release-summary-35"></a>
+### Release Summary
+
+Emergency release to amend breaking change in previous release\.
+
+<a id="bugfixes-28"></a>
+### Bugfixes
+
+* Fix unintended breaking change caused by [an earlier fix](https\://github\.com/ansible\-collections/community\.docker/pull/258) by vendoring the deprecated Python standard library <code>distutils\.version</code> until this collection stops supporting Ansible 2\.9 and ansible\-base 2\.10 \([https\://github\.com/ansible\-collections/community\.docker/issues/267](https\://github\.com/ansible\-collections/community\.docker/issues/267)\, [https\://github\.com/ansible\-collections/community\.docker/pull/269](https\://github\.com/ansible\-collections/community\.docker/pull/269)\)\.
+
+<a id="v2-1-0"></a>
+## v2\.1\.0
+
+<a id="release-summary-36"></a>
+### Release Summary
+
+Feature and bugfix release\.
+
+<a id="minor-changes-16"></a>
+### Minor Changes
+
+* docker\_container\_exec \- add <code>detach</code> parameter \([https\://github\.com/ansible\-collections/community\.docker/issues/250](https\://github\.com/ansible\-collections/community\.docker/issues/250)\, [https\://github\.com/ansible\-collections/community\.docker/pull/255](https\://github\.com/ansible\-collections/community\.docker/pull/255)\)\.
+* docker\_container\_exec \- add <code>env</code> option \([https\://github\.com/ansible\-collections/community\.docker/issues/248](https\://github\.com/ansible\-collections/community\.docker/issues/248)\, [https\://github\.com/ansible\-collections/community\.docker/pull/254](https\://github\.com/ansible\-collections/community\.docker/pull/254)\)\.
+
+<a id="bugfixes-29"></a>
+### Bugfixes
+
+* Various modules and plugins \- use vendored version of <code>distutils\.version</code> included in ansible\-core 2\.12 if available\. This avoids breakage when <code>distutils</code> is removed from the standard library of Python 3\.12\. Note that ansible\-core 2\.11\, ansible\-base 2\.10 and Ansible 2\.9 are right now not compatible with Python 3\.12\, hence this fix does not target these ansible\-core/\-base/2\.9 versions \([https\://github\.com/ansible\-collections/community\.docker/pull/258](https\://github\.com/ansible\-collections/community\.docker/pull/258)\)\.
+* docker connection plugin \- replace deprecated <code>distutils\.spawn\.find\_executable</code> with Ansible\'s <code>get\_bin\_path</code> to find the <code>docker</code> executable \([https\://github\.com/ansible\-collections/community\.docker/pull/257](https\://github\.com/ansible\-collections/community\.docker/pull/257)\)\.
+* docker\_container\_exec \- disallow using the <code>chdir</code> option for Docker API before 1\.35 \([https\://github\.com/ansible\-collections/community\.docker/pull/253](https\://github\.com/ansible\-collections/community\.docker/pull/253)\)\.
+
+<a id="v2-0-2"></a>
+## v2\.0\.2
+
+<a id="release-summary-37"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-30"></a>
+### Bugfixes
+
+* docker\_api connection plugin \- avoid passing an unnecessary argument to a Docker SDK for Python call that is only supported by version 3\.0\.0 or later \([https\://github\.com/ansible\-collections/community\.docker/pull/243](https\://github\.com/ansible\-collections/community\.docker/pull/243)\)\.
+* docker\_container\_exec \- <code>chdir</code> is only supported since Docker SDK for Python 3\.0\.0\. Make sure that this option can only use when 3\.0\.0 or later is installed\, and prevent passing this parameter on when <code>chdir</code> is not provided to this module \([https\://github\.com/ansible\-collections/community\.docker/pull/243](https\://github\.com/ansible\-collections/community\.docker/pull/243)\, [https\://github\.com/ansible\-collections/community\.docker/issues/242](https\://github\.com/ansible\-collections/community\.docker/issues/242)\)\.
+* nsenter connection plugin \- ensure the <code>nsenter\_pid</code> option is retrieved in <code>\_connect</code> instead of <code>\_\_init\_\_</code> to prevent a crash due to bad initialization order \([https\://github\.com/ansible\-collections/community\.docker/pull/249](https\://github\.com/ansible\-collections/community\.docker/pull/249)\)\.
+* nsenter connection plugin \- replace the use of <code>\-\-all\-namespaces</code> with specific namespaces to support compatibility with Busybox nsenter \(used on\, for example\, Alpine containers\) \([https\://github\.com/ansible\-collections/community\.docker/pull/249](https\://github\.com/ansible\-collections/community\.docker/pull/249)\)\.
+
+<a id="v2-0-1"></a>
+## v2\.0\.1
+
+<a id="release-summary-38"></a>
+### Release Summary
+
+Maintenance release with some documentation fixes\.
+
+<a id="v2-0-0"></a>
+## v2\.0\.0
+
+<a id="release-summary-39"></a>
+### Release Summary
+
+New major release with some deprecations removed and a breaking change in the <code>docker\_compose</code> module regarding the <code>timeout</code> parameter\.
+
+<a id="breaking-changes--porting-guide-1"></a>
+### Breaking Changes / Porting Guide
+
+* docker\_compose \- fixed <code>timeout</code> defaulting behavior so that <code>stop\_grace\_period</code>\, if defined in the compose file\, will be used if <em class="title-reference">timeout\`</em> is not specified \([https\://github\.com/ansible\-collections/community\.docker/pull/163](https\://github\.com/ansible\-collections/community\.docker/pull/163)\)\.
+
+<a id="deprecated-features-4"></a>
+### Deprecated Features
+
+* docker\_container \- using the special value <code>all</code> in <code>published\_ports</code> has been deprecated\. Use <code>publish\_all\_ports\=true</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\.
+
+<a id="removed-features-previously-deprecated-1"></a>
+### Removed Features \(previously deprecated\)
+
+* docker\_container \- the default value of <code>container\_default\_behavior</code> changed to <code>no\_defaults</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\.
+* docker\_container \- the default value of <code>network\_mode</code> is now the name of the first network specified in <code>networks</code> if such are specified and <code>networks\_cli\_compatible\=true</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\.
+* docker\_container \- the special value <code>all</code> can no longer be used in <code>published\_ports</code> next to other values\. Please use <code>publish\_all\_ports\=true</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\.
+* docker\_login \- removed the <code>email</code> option \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\.
+
+<a id="v1-10-0"></a>
+## v1\.10\.0
+
+<a id="release-summary-40"></a>
+### Release Summary
+
+Regular feature and bugfix release\.
+
+<a id="minor-changes-17"></a>
+### Minor Changes
+
+* Add the modules docker\_container\_exec\, docker\_image\_load and docker\_plugin to the <code>docker</code> module defaults group \([https\://github\.com/ansible\-collections/community\.docker/pull/209](https\://github\.com/ansible\-collections/community\.docker/pull/209)\)\.
+* docker\_config \- add option <code>data\_src</code> to read configuration data from target \([https\://github\.com/ansible\-collections/community\.docker/issues/64](https\://github\.com/ansible\-collections/community\.docker/issues/64)\, [https\://github\.com/ansible\-collections/community\.docker/pull/203](https\://github\.com/ansible\-collections/community\.docker/pull/203)\)\.
+* docker\_secret \- add option <code>data\_src</code> to read secret data from target \([https\://github\.com/ansible\-collections/community\.docker/issues/64](https\://github\.com/ansible\-collections/community\.docker/issues/64)\, [https\://github\.com/ansible\-collections/community\.docker/pull/203](https\://github\.com/ansible\-collections/community\.docker/pull/203)\)\.
+
+<a id="v1-9-1"></a>
+## v1\.9\.1
+
+<a id="release-summary-41"></a>
+### Release Summary
+
+Regular bugfix release\.
+
+<a id="bugfixes-31"></a>
+### Bugfixes
+
+* docker\_compose \- fixed incorrect <code>changed</code> status for services with <code>profiles</code> defined\, but none enabled \([https\://github\.com/ansible\-collections/community\.docker/pull/192](https\://github\.com/ansible\-collections/community\.docker/pull/192)\)\.
+
+<a id="v1-9-0"></a>
+## v1\.9\.0
+
+<a id="release-summary-42"></a>
+### Release Summary
+
+New bugfixes and features release\.
+
+<a id="minor-changes-18"></a>
+### Minor Changes
+
+* docker\_\* modules \- include <code>ImportError</code> traceback when reporting that Docker SDK for Python could not be found \([https\://github\.com/ansible\-collections/community\.docker/pull/188](https\://github\.com/ansible\-collections/community\.docker/pull/188)\)\.
+* docker\_compose \- added <code>env\_file</code> option for specifying custom environment files \([https\://github\.com/ansible\-collections/community\.docker/pull/174](https\://github\.com/ansible\-collections/community\.docker/pull/174)\)\.
+* docker\_container \- added <code>publish\_all\_ports</code> option to publish all exposed ports to random ports except those explicitly bound with <code>published\_ports</code> \(this was already added in community\.docker 1\.8\.0\) \([https\://github\.com/ansible\-collections/community\.docker/pull/162](https\://github\.com/ansible\-collections/community\.docker/pull/162)\)\.
+* docker\_container \- added new <code>command\_handling</code> option with current deprecated default value <code>compatibility</code> which allows to control how the module handles shell quoting when interpreting lists\, and how the module handles empty lists/strings\. The default will switch to <code>correct</code> in community\.docker 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/pull/186](https\://github\.com/ansible\-collections/community\.docker/pull/186)\)\.
+* docker\_container \- lifted restriction preventing the creation of anonymous volumes with the <code>mounts</code> option \([https\://github\.com/ansible\-collections/community\.docker/pull/181](https\://github\.com/ansible\-collections/community\.docker/pull/181)\)\.
+
+<a id="deprecated-features-5"></a>
+### Deprecated Features
+
+* docker\_container \- the new <code>command\_handling</code>\'s default value\, <code>compatibility</code>\, is deprecated and will change to <code>correct</code> in community\.docker 3\.0\.0\. A deprecation warning is emitted by the module in cases where the behavior will change\. Please note that ansible\-core will output a deprecation warning only once\, so if it is shown for an earlier task\, there could be more tasks with this warning where it is not shown \([https\://github\.com/ansible\-collections/community\.docker/pull/186](https\://github\.com/ansible\-collections/community\.docker/pull/186)\)\.
+
+<a id="bugfixes-32"></a>
+### Bugfixes
+
+* docker\_compose \- fixes task failures when bringing up services while using <code>docker\-compose \<1\.17\.0</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/180](https\://github\.com/ansible\-collections/community\.docker/issues/180)\)\.
+* docker\_container \- make sure to also return <code>container</code> on <code>detached\=false</code> when status code is non\-zero \([https\://github\.com/ansible\-collections/community\.docker/pull/178](https\://github\.com/ansible\-collections/community\.docker/pull/178)\)\.
+* docker\_stack\_info \- make sure that module isn\'t skipped in check mode \([https\://github\.com/ansible\-collections/community\.docker/pull/183](https\://github\.com/ansible\-collections/community\.docker/pull/183)\)\.
+* docker\_stack\_task\_info \- make sure that module isn\'t skipped in check mode \([https\://github\.com/ansible\-collections/community\.docker/pull/183](https\://github\.com/ansible\-collections/community\.docker/pull/183)\)\.
+
+<a id="new-plugins"></a>
+### New Plugins
+
+<a id="connection"></a>
+#### Connection
+
+* nsenter \- execute on host running controller container
+
+<a id="v1-8-0"></a>
+## v1\.8\.0
+
+<a id="release-summary-43"></a>
+### Release Summary
+
+Regular bugfix and feature release\.
+
+<a id="minor-changes-19"></a>
+### Minor Changes
+
+* Avoid internal ansible\-core module\_utils in favor of equivalent public API available since at least Ansible 2\.9 \([https\://github\.com/ansible\-collections/community\.docker/pull/164](https\://github\.com/ansible\-collections/community\.docker/pull/164)\)\.
+* docker\_compose \- added <code>profiles</code> option to specify service profiles when starting services \([https\://github\.com/ansible\-collections/community\.docker/pull/167](https\://github\.com/ansible\-collections/community\.docker/pull/167)\)\.
+* docker\_containers inventory plugin \- when <code>connection\_type\=docker\-api</code>\, now pass Docker daemon connection options from inventory plugin to connection plugin\. This can be disabled by setting <code>configure\_docker\_daemon\=false</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/157](https\://github\.com/ansible\-collections/community\.docker/pull/157)\)\.
+* docker\_host\_info \- allow values for keys in <code>containers\_filters</code>\, <code>images\_filters</code>\, <code>networks\_filters</code>\, and <code>volumes\_filters</code> to be passed as YAML lists \([https\://github\.com/ansible\-collections/community\.docker/pull/160](https\://github\.com/ansible\-collections/community\.docker/pull/160)\)\.
+* docker\_plugin \- added <code>alias</code> option to specify local names for docker plugins \([https\://github\.com/ansible\-collections/community\.docker/pull/161](https\://github\.com/ansible\-collections/community\.docker/pull/161)\)\.
+
+<a id="bugfixes-33"></a>
+### Bugfixes
+
+* docker\_compose \- fix idempotence bug when using <code>stopped\: true</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/142](https\://github\.com/ansible\-collections/community\.docker/issues/142)\, [https\://github\.com/ansible\-collections/community\.docker/pull/159](https\://github\.com/ansible\-collections/community\.docker/pull/159)\)\.
+
+<a id="v1-7-0"></a>
+## v1\.7\.0
+
+<a id="release-summary-44"></a>
+### Release Summary
+
+Small feature and bugfix release\.
+
+<a id="minor-changes-20"></a>
+### Minor Changes
+
+* docker\_image \- allow to tag images by ID \([https\://github\.com/ansible\-collections/community\.docker/pull/149](https\://github\.com/ansible\-collections/community\.docker/pull/149)\)\.
+
+<a id="v1-6-1"></a>
+## v1\.6\.1
+
+<a id="release-summary-45"></a>
+### Release Summary
+
+Bugfix release to reduce deprecation warning spam\.
+
+<a id="bugfixes-34"></a>
+### Bugfixes
+
+* docker\_\* modules and plugins\, except <code>docker\_swarm</code> connection plugin and <code>docker\_compose</code> and <code>docker\_stack\*\` modules \- only emit \`\`tls\_hostname</code> deprecation message if TLS is actually used \([https\://github\.com/ansible\-collections/community\.docker/pull/143](https\://github\.com/ansible\-collections/community\.docker/pull/143)\)\.
+
+<a id="v1-6-0"></a>
+## v1\.6\.0
+
+<a id="release-summary-46"></a>
+### Release Summary
+
+Regular bugfix and feature release\.
+
+<a id="minor-changes-21"></a>
+### Minor Changes
+
+* common module utils \- correct error messages for guiding to install proper Docker SDK for Python module \([https\://github\.com/ansible\-collections/community\.docker/pull/125](https\://github\.com/ansible\-collections/community\.docker/pull/125)\)\.
+* docker\_container \- allow <code>memory\_swap\: \-1</code> to set memory swap limit to unlimited\. This is useful when the user cannot set memory swap limits due to cgroup limitations or other reasons\, as by default Docker will try to set swap usage to two times the value of <code>memory</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/138](https\://github\.com/ansible\-collections/community\.docker/pull/138)\)\.
+
+<a id="deprecated-features-6"></a>
+### Deprecated Features
+
+* docker\_\* modules and plugins\, except <code>docker\_swarm</code> connection plugin and <code>docker\_compose</code> and <code>docker\_stack\*\` modules \- the current default \`\`localhost</code> for <code>tls\_hostname</code> is deprecated\. In community\.docker 2\.0\.0 it will be computed from <code>docker\_host</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/134](https\://github\.com/ansible\-collections/community\.docker/pull/134)\)\.
+
+<a id="bugfixes-35"></a>
+### Bugfixes
+
+* docker\-compose \- fix not pulling when <code>state\: present</code> and <code>stopped\: true</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/12](https\://github\.com/ansible\-collections/community\.docker/issues/12)\, [https\://github\.com/ansible\-collections/community\.docker/pull/119](https\://github\.com/ansible\-collections/community\.docker/pull/119)\)\.
+* docker\_plugin \- also configure plugin after installing \([https\://github\.com/ansible\-collections/community\.docker/issues/118](https\://github\.com/ansible\-collections/community\.docker/issues/118)\, [https\://github\.com/ansible\-collections/community\.docker/pull/135](https\://github\.com/ansible\-collections/community\.docker/pull/135)\)\.
+* docker\_swarm\_services \- avoid crash during idempotence check if <code>published\_port</code> is not specified \([https\://github\.com/ansible\-collections/community\.docker/issues/107](https\://github\.com/ansible\-collections/community\.docker/issues/107)\, [https\://github\.com/ansible\-collections/community\.docker/pull/136](https\://github\.com/ansible\-collections/community\.docker/pull/136)\)\.
+
+<a id="v1-5-0"></a>
+## v1\.5\.0
+
+<a id="release-summary-47"></a>
+### Release Summary
+
+Regular feature release\.
+
+<a id="minor-changes-22"></a>
+### Minor Changes
+
+* Add the <code>use\_ssh\_client</code> option to most docker modules and plugins \([https\://github\.com/ansible\-collections/community\.docker/issues/108](https\://github\.com/ansible\-collections/community\.docker/issues/108)\, [https\://github\.com/ansible\-collections/community\.docker/pull/114](https\://github\.com/ansible\-collections/community\.docker/pull/114)\)\.
+
+<a id="bugfixes-36"></a>
+### Bugfixes
+
+* all modules \- use <code>to\_native</code> to convert exceptions to strings \([https\://github\.com/ansible\-collections/community\.docker/pull/121](https\://github\.com/ansible\-collections/community\.docker/pull/121)\)\.
+
+<a id="new-modules-3"></a>
+### New Modules
+
+* docker\_container\_exec \- Execute command in a docker container
+
+<a id="v1-4-0"></a>
+## v1\.4\.0
+
+<a id="release-summary-48"></a>
+### Release Summary
+
+Security release to address another potential secret leak\. Also includes regular bugfixes and features\.
+
+<a id="minor-changes-23"></a>
+### Minor Changes
+
+* docker\_swarm\_service \- change <code>publish\.published\_port</code> option from mandatory to optional\. Docker will assign random high port if not specified \([https\://github\.com/ansible\-collections/community\.docker/issues/99](https\://github\.com/ansible\-collections/community\.docker/issues/99)\)\.
+
+<a id="breaking-changes--porting-guide-2"></a>
+### Breaking Changes / Porting Guide
+
+* docker\_swarm \- if <code>join\_token</code> is specified\, a returned join token with the same value will be replaced by <code>VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER</code>\. Make sure that you do not blindly use the join tokens from the return value of this module when the module is invoked with <code>join\_token</code> specified\! This breaking change appears in a minor release since it is necessary to fix a security issue \([https\://github\.com/ansible\-collections/community\.docker/pull/103](https\://github\.com/ansible\-collections/community\.docker/pull/103)\)\.
+
+<a id="security-fixes-2"></a>
+### Security Fixes
+
+* docker\_swarm \- the <code>join\_token</code> option is now marked as <code>no\_log</code> so it is no longer written into logs \([https\://github\.com/ansible\-collections/community\.docker/pull/103](https\://github\.com/ansible\-collections/community\.docker/pull/103)\)\.
+
+<a id="bugfixes-37"></a>
+### Bugfixes
+
+* <code>docker\_swarm\_service</code> \- fix KeyError on caused by reference to deprecated option <code>update\_failure\_action</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/100](https\://github\.com/ansible\-collections/community\.docker/pull/100)\)\.
+* docker\_swarm\_service \- mark <code>secrets</code> module option with <code>no\_log\=False</code> since it does not leak secrets \([https\://github\.com/ansible\-collections/community\.general/pull/2001](https\://github\.com/ansible\-collections/community\.general/pull/2001)\)\.
+
+<a id="v1-3-0"></a>
+## v1\.3\.0
+
+<a id="release-summary-49"></a>
+### Release Summary
+
+Regular feature and bugfix release\.
+
+<a id="minor-changes-24"></a>
+### Minor Changes
+
+* docker\_container \- add <code>storage\_opts</code> option to specify storage options \([https\://github\.com/ansible\-collections/community\.docker/issues/91](https\://github\.com/ansible\-collections/community\.docker/issues/91)\, [https\://github\.com/ansible\-collections/community\.docker/pull/93](https\://github\.com/ansible\-collections/community\.docker/pull/93)\)\.
+* docker\_image \- allows to specify platform to pull for <code>source\=pull</code> with new option <code>pull\_platform</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/79](https\://github\.com/ansible\-collections/community\.docker/issues/79)\, [https\://github\.com/ansible\-collections/community\.docker/pull/89](https\://github\.com/ansible\-collections/community\.docker/pull/89)\)\.
+* docker\_image \- properly support image IDs \(hashes\) for loading and tagging images \([https\://github\.com/ansible\-collections/community\.docker/issues/86](https\://github\.com/ansible\-collections/community\.docker/issues/86)\, [https\://github\.com/ansible\-collections/community\.docker/pull/87](https\://github\.com/ansible\-collections/community\.docker/pull/87)\)\.
+* docker\_swarm\_service \- adding support for maximum number of tasks per node \(<code>replicas\_max\_per\_node</code>\) when running swarm service in replicated mode\. Introduced in API 1\.40 \([https\://github\.com/ansible\-collections/community\.docker/issues/7](https\://github\.com/ansible\-collections/community\.docker/issues/7)\, [https\://github\.com/ansible\-collections/community\.docker/pull/92](https\://github\.com/ansible\-collections/community\.docker/pull/92)\)\.
+
+<a id="bugfixes-38"></a>
+### Bugfixes
+
+* docker\_container \- fix healthcheck disabling idempotency issue with strict comparison \([https\://github\.com/ansible\-collections/community\.docker/issues/85](https\://github\.com/ansible\-collections/community\.docker/issues/85)\)\.
+* docker\_image \- prevent module failure when removing image that is removed between inspection and removal \([https\://github\.com/ansible\-collections/community\.docker/pull/87](https\://github\.com/ansible\-collections/community\.docker/pull/87)\)\.
+* docker\_image \- prevent module failure when removing non\-existent image by ID \([https\://github\.com/ansible\-collections/community\.docker/pull/87](https\://github\.com/ansible\-collections/community\.docker/pull/87)\)\.
+* docker\_image\_info \- prevent module failure when image vanishes between listing and inspection \([https\://github\.com/ansible\-collections/community\.docker/pull/87](https\://github\.com/ansible\-collections/community\.docker/pull/87)\)\.
+* docker\_image\_info \- prevent module failure when querying non\-existent image by ID \([https\://github\.com/ansible\-collections/community\.docker/pull/87](https\://github\.com/ansible\-collections/community\.docker/pull/87)\)\.
+
+<a id="new-modules-4"></a>
+### New Modules
+
+* docker\_image\_load \- Load docker image\(s\) from archives
+* docker\_plugin \- Manage Docker plugins
+
+<a id="v1-2-2"></a>
+## v1\.2\.2
+
+<a id="release-summary-50"></a>
+### Release Summary
+
+Security bugfix release to address CVE\-2021\-20191\.
+
+<a id="security-fixes-3"></a>
+### Security Fixes
+
+* docker\_swarm \- enabled <code>no\_log</code> for the option <code>signing\_ca\_key</code> to prevent accidental disclosure \(CVE\-2021\-20191\, [https\://github\.com/ansible\-collections/community\.docker/pull/80](https\://github\.com/ansible\-collections/community\.docker/pull/80)\)\.
+
+<a id="v1-2-1"></a>
+## v1\.2\.1
+
+<a id="release-summary-51"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes-39"></a>
+### Bugfixes
+
+* docker connection plugin \- fix Docker version parsing\, as some docker versions have a leading <code>v</code> in the output of the command <code>docker version \-\-format \"\{\{\.Server\.Version\}\}\"</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/76](https\://github\.com/ansible\-collections/community\.docker/pull/76)\)\.
+
+<a id="v1-2-0"></a>
+## v1\.2\.0
+
+<a id="release-summary-52"></a>
+### Release Summary
+
+Feature release with one new feature and two bugfixes\.
+
+<a id="minor-changes-25"></a>
+### Minor Changes
+
+* docker\_container \- added <code>default\_host\_ip</code> option which allows to explicitly set the default IP string for published ports without explicitly specified IPs\. When using IPv6 binds with Docker 20\.10\.2 or newer\, this needs to be set to an empty string \(<code>\"\"</code>\) \([https\://github\.com/ansible\-collections/community\.docker/issues/70](https\://github\.com/ansible\-collections/community\.docker/issues/70)\, [https\://github\.com/ansible\-collections/community\.docker/pull/71](https\://github\.com/ansible\-collections/community\.docker/pull/71)\)\.
+
+<a id="bugfixes-40"></a>
+### Bugfixes
+
+* docker\_container \- allow IPv6 zones \(RFC 4007\) in bind IPs \([https\://github\.com/ansible\-collections/community\.docker/pull/66](https\://github\.com/ansible\-collections/community\.docker/pull/66)\)\.
+* docker\_image \- fix crash on loading images with versions of Docker SDK for Python before 2\.5\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/72](https\://github\.com/ansible\-collections/community\.docker/issues/72)\, [https\://github\.com/ansible\-collections/community\.docker/pull/73](https\://github\.com/ansible\-collections/community\.docker/pull/73)\)\.
+
+<a id="v1-1-0"></a>
+## v1\.1\.0
+
+<a id="release-summary-53"></a>
+### Release Summary
+
+Feature release with three new plugins and modules\.
+
+<a id="minor-changes-26"></a>
+### Minor Changes
+
+* docker\_container \- support specifying <code>cgroup\_parent</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/6](https\://github\.com/ansible\-collections/community\.docker/issues/6)\, [https\://github\.com/ansible\-collections/community\.docker/pull/59](https\://github\.com/ansible\-collections/community\.docker/pull/59)\)\.
+* docker\_container \- when a container is started with <code>detached\=false</code>\, <code>status</code> is now also returned when it is 0 \([https\://github\.com/ansible\-collections/community\.docker/issues/26](https\://github\.com/ansible\-collections/community\.docker/issues/26)\, [https\://github\.com/ansible\-collections/community\.docker/pull/58](https\://github\.com/ansible\-collections/community\.docker/pull/58)\)\.
+* docker\_image \- support <code>platform</code> when building images \([https\://github\.com/ansible\-collections/community\.docker/issues/22](https\://github\.com/ansible\-collections/community\.docker/issues/22)\, [https\://github\.com/ansible\-collections/community\.docker/pull/54](https\://github\.com/ansible\-collections/community\.docker/pull/54)\)\.
+
+<a id="deprecated-features-7"></a>
+### Deprecated Features
+
+* docker\_container \- currently <code>published\_ports</code> can contain port mappings next to the special value <code>all</code>\, in which case the port mappings are ignored\. This behavior is deprecated for community\.docker 2\.0\.0\, at which point it will either be forbidden\, or this behavior will be properly implemented similar to how the Docker CLI tool handles this \([https\://github\.com/ansible\-collections/community\.docker/issues/8](https\://github\.com/ansible\-collections/community\.docker/issues/8)\, [https\://github\.com/ansible\-collections/community\.docker/pull/60](https\://github\.com/ansible\-collections/community\.docker/pull/60)\)\.
+
+<a id="bugfixes-41"></a>
+### Bugfixes
+
+* docker\_image \- if <code>push\=true</code> is used with <code>repository</code>\, and the image does not need to be tagged\, still push\. This can happen if <code>repository</code> and <code>name</code> are equal \([https\://github\.com/ansible\-collections/community\.docker/issues/52](https\://github\.com/ansible\-collections/community\.docker/issues/52)\, [https\://github\.com/ansible\-collections/community\.docker/pull/53](https\://github\.com/ansible\-collections/community\.docker/pull/53)\)\.
+* docker\_image \- report error when loading a broken archive that contains no image \([https\://github\.com/ansible\-collections/community\.docker/issues/46](https\://github\.com/ansible\-collections/community\.docker/issues/46)\, [https\://github\.com/ansible\-collections/community\.docker/pull/55](https\://github\.com/ansible\-collections/community\.docker/pull/55)\)\.
+* docker\_image \- report error when the loaded archive does not contain the specified image \([https\://github\.com/ansible\-collections/community\.docker/issues/41](https\://github\.com/ansible\-collections/community\.docker/issues/41)\, [https\://github\.com/ansible\-collections/community\.docker/pull/55](https\://github\.com/ansible\-collections/community\.docker/pull/55)\)\.
+
+<a id="new-plugins-1"></a>
+### New Plugins
+
+<a id="connection-1"></a>
+#### Connection
+
+* docker\_api \- Run tasks in docker containers
+
+<a id="inventory"></a>
+#### Inventory
+
+* docker\_containers \- Ansible dynamic inventory plugin for Docker containers\.
+
+<a id="new-modules-5"></a>
+### New Modules
+
+* current\_container\_facts \- Return facts about whether the module runs in a Docker container
+
+<a id="v1-0-1"></a>
+## v1\.0\.1
+
+<a id="release-summary-54"></a>
+### Release Summary
+
+Maintenance release with a bugfix for <code>docker\_container</code>\.
+
+<a id="bugfixes-42"></a>
+### Bugfixes
+
+* docker\_container \- the validation for <code>capabilities</code> in <code>device\_requests</code> was incorrect \([https\://github\.com/ansible\-collections/community\.docker/issues/42](https\://github\.com/ansible\-collections/community\.docker/issues/42)\, [https\://github\.com/ansible\-collections/community\.docker/pull/43](https\://github\.com/ansible\-collections/community\.docker/pull/43)\)\.
+
+<a id="v1-0-0"></a>
+## v1\.0\.0
+
+<a id="release-summary-55"></a>
+### Release Summary
+
+This is the first production \(non\-prerelease\) release of <code>community\.docker</code>\.
+
+<a id="minor-changes-27"></a>
+### Minor Changes
+
+* Add collection\-side support of the <code>docker</code> action group / module defaults group \([https\://github\.com/ansible\-collections/community\.docker/pull/17](https\://github\.com/ansible\-collections/community\.docker/pull/17)\)\.
+* docker\_image \- return docker build output \([https\://github\.com/ansible\-collections/community\.general/pull/805](https\://github\.com/ansible\-collections/community\.general/pull/805)\)\.
+* docker\_secret \- add a warning when the secret does not have an <code>ansible\_key</code> label but the <code>force</code> parameter is not set \([https\://github\.com/ansible\-collections/community\.docker/issues/30](https\://github\.com/ansible\-collections/community\.docker/issues/30)\, [https\://github\.com/ansible\-collections/community\.docker/pull/31](https\://github\.com/ansible\-collections/community\.docker/pull/31)\)\.
+
+<a id="v0-1-0"></a>
+## v0\.1\.0
+
+<a id="release-summary-56"></a>
+### Release Summary
+
+The <code>community\.docker</code> continues the work on the Ansible docker modules and plugins from their state in <code>community\.general</code> 1\.2\.0\. The changes listed here are thus relative to the modules and plugins <code>community\.general\.docker\*</code>\.
+
+All deprecation removals planned for <code>community\.general</code> 2\.0\.0 have been applied\. All deprecation removals scheduled for <code>community\.general</code> 3\.0\.0 have been re\-scheduled for <code>community\.docker</code> 2\.0\.0\.
+
+<a id="minor-changes-28"></a>
+### Minor Changes
+
+* docker\_container \- now supports the <code>device\_requests</code> option\, which allows to request additional resources such as GPUs \([https\://github\.com/ansible/ansible/issues/65748](https\://github\.com/ansible/ansible/issues/65748)\, [https\://github\.com/ansible\-collections/community\.general/pull/1119](https\://github\.com/ansible\-collections/community\.general/pull/1119)\)\.
+
+<a id="removed-features-previously-deprecated-2"></a>
+### Removed Features \(previously deprecated\)
+
+* docker\_container \- no longer returns <code>ansible\_facts</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_container \- the default of <code>networks\_cli\_compatible</code> changed to <code>true</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_container \- the unused option <code>trust\_image\_content</code> has been removed \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_image \- <code>state\=build</code> has been removed\. Use <code>present</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_image \- the <code>container\_limits</code>\, <code>dockerfile</code>\, <code>http\_timeout</code>\, <code>nocache</code>\, <code>rm</code>\, <code>path</code>\, <code>buildargs</code>\, <code>pull</code> have been removed\. Use the corresponding suboptions of <code>build</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_image \- the <code>force</code> option has been removed\. Use the more specific <code>force\_\*</code> options instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_image \- the <code>source</code> option is now mandatory \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_image \- the <code>use\_tls</code> option has been removed\. Use <code>tls</code> and <code>validate\_certs</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_image \- the default of the <code>build\.pull</code> option changed to <code>false</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_image\_facts \- this alias is on longer available\, use <code>docker\_image\_info</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_network \- no longer returns <code>ansible\_facts</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_network \- the <code>ipam\_options</code> option has been removed\. Use <code>ipam\_config</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_service \- no longer returns <code>ansible\_facts</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_swarm \- <code>state\=inspect</code> has been removed\. Use <code>docker\_swarm\_info</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_swarm\_service \- the <code>constraints</code> option has been removed\. Use <code>placement\.constraints</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_swarm\_service \- the <code>limit\_cpu</code> and <code>limit\_memory</code> options has been removed\. Use the corresponding suboptions in <code>limits</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_swarm\_service \- the <code>log\_driver</code> and <code>log\_driver\_options</code> options has been removed\. Use the corresponding suboptions in <code>logging</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_swarm\_service \- the <code>reserve\_cpu</code> and <code>reserve\_memory</code> options has been removed\. Use the corresponding suboptions in <code>reservations</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_swarm\_service \- the <code>restart\_policy</code>\, <code>restart\_policy\_attempts</code>\, <code>restart\_policy\_delay</code> and <code>restart\_policy\_window</code> options has been removed\. Use the corresponding suboptions in <code>restart\_config</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_swarm\_service \- the <code>update\_delay</code>\, <code>update\_parallelism</code>\, <code>update\_failure\_action</code>\, <code>update\_monitor</code>\, <code>update\_max\_failure\_ratio</code> and <code>update\_order</code> options has been removed\. Use the corresponding suboptions in <code>update\_config</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_volume \- no longer returns <code>ansible\_facts</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+* docker\_volume \- the <code>force</code> option has been removed\. Use <code>recreate</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\.
+
+<a id="bugfixes-43"></a>
+### Bugfixes
+
+* docker\_login \- fix internal config file storage to handle credentials for more than one registry \([https\://github\.com/ansible\-collections/community\.general/issues/1117](https\://github\.com/ansible\-collections/community\.general/issues/1117)\)\.
diff --git a/ansible_collections/community/docker/CHANGELOG.md.license b/ansible_collections/community/docker/CHANGELOG.md.license
new file mode 100644
index 000000000..edff8c768
--- /dev/null
+++ b/ansible_collections/community/docker/CHANGELOG.md.license
@@ -0,0 +1,3 @@
+GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+SPDX-License-Identifier: GPL-3.0-or-later
+SPDX-FileCopyrightText: Ansible Project
diff --git a/ansible_collections/community/docker/CHANGELOG.rst b/ansible_collections/community/docker/CHANGELOG.rst
index fb15fe36a..74e43714e 100644
--- a/ansible_collections/community/docker/CHANGELOG.rst
+++ b/ansible_collections/community/docker/CHANGELOG.rst
@@ -4,6 +4,210 @@ Docker Community Collection Release Notes
.. contents:: Topics
+v3.8.1
+======
+
+Release Summary
+---------------
+
+Bugfix release
+
+Security Fixes
+--------------
+
+- docker_containers, docker_machine, and docker_swarm inventory plugins - make sure all data received from the Docker daemon / Docker machine is marked as unsafe, so remote code execution by obtaining texts that can be evaluated as templates is not possible (https://www.die-welt.net/2024/03/remote-code-execution-in-ansible-dynamic-inventory-plugins/, https://github.com/ansible-collections/community.docker/pull/815).
+
+Bugfixes
+--------
+
+- docker_compose_v2 - do not fail when non-fatal errors occur. This can happen when pulling an image fails, but then the image can be built for another service. Docker Compose emits an error in that case, but ``docker compose up`` still completes successfully (https://github.com/ansible-collections/community.docker/issues/807, https://github.com/ansible-collections/community.docker/pull/810, https://github.com/ansible-collections/community.docker/pull/811).
+- docker_compose_v2* modules - correctly parse ``Warning`` events emitted by Docker Compose (https://github.com/ansible-collections/community.docker/issues/807, https://github.com/ansible-collections/community.docker/pull/811).
+- docker_compose_v2* modules - parse ``logfmt`` warnings emitted by Docker Compose (https://github.com/ansible-collections/community.docker/issues/787, https://github.com/ansible-collections/community.docker/pull/811).
+- docker_compose_v2_pull - fixing idempotence by checking actual pull progress events instead of service-level pull request when ``policy=always``. This stops the module from reporting ``changed=true`` if no actual change happened when pulling. In check mode, it has to assume that a change happens though (https://github.com/ansible-collections/community.docker/issues/813, https://github.com/ansible-collections/community.docker/pull/814).
+
+v3.8.0
+======
+
+Release Summary
+---------------
+
+Bugfix and feature release.
+
+Minor Changes
+-------------
+
+- docker_compose_v2 - allow to wait until containers are running/health when running ``docker compose up`` with the new ``wait`` option (https://github.com/ansible-collections/community.docker/issues/794, https://github.com/ansible-collections/community.docker/pull/796).
+- docker_container - the ``pull_check_mode_behavior`` option now allows to control the module's behavior in check mode when ``pull=always`` (https://github.com/ansible-collections/community.docker/issues/792, https://github.com/ansible-collections/community.docker/pull/797).
+- docker_container - the ``pull`` option now accepts the three values ``never``, ``missing_image`` (default), and ``never``, next to the previously valid values ``true`` (equivalent to ``always``) and ``false`` (equivalent to ``missing_image``). This allows the equivalent to ``--pull=never`` from the Docker command line (https://github.com/ansible-collections/community.docker/issues/783, https://github.com/ansible-collections/community.docker/pull/797).
+
+Bugfixes
+--------
+
+- docker_compose_v2 - do not consider a ``Waiting`` event as an action/change (https://github.com/ansible-collections/community.docker/pull/804).
+- docker_compose_v2 - do not treat service-level pull events as changes to avoid incorrect ``changed=true`` return value of ``pull=always`` (https://github.com/ansible-collections/community.docker/issues/802, https://github.com/ansible-collections/community.docker/pull/803).
+- docker_compose_v2, docker_compose_v2_pull - fix parsing of pull messages for Docker Compose 2.20.0 (https://github.com/ansible-collections/community.docker/issues/785, https://github.com/ansible-collections/community.docker/pull/786).
+
+v3.7.0
+======
+
+Release Summary
+---------------
+
+Bugfix and feature release.
+
+Minor Changes
+-------------
+
+- docker_compose_v2 - add ``scale`` option to allow to explicitly scale services (https://github.com/ansible-collections/community.docker/pull/776).
+- docker_compose_v2, docker_compose_v2_pull - support ``files`` parameter to specify multiple Compose files (https://github.com/ansible-collections/community.docker/issues/772, https://github.com/ansible-collections/community.docker/pull/775).
+
+Bugfixes
+--------
+
+- docker_compose_v2 - properly parse dry-run build events from ``stderr`` (https://github.com/ansible-collections/community.docker/issues/778, https://github.com/ansible-collections/community.docker/pull/779).
+- docker_compose_v2_pull - the module was documented as part of the ``community.docker.docker`` action group, but was not actually part of it. That has now been fixed (https://github.com/ansible-collections/community.docker/pull/773).
+
+New Modules
+-----------
+
+- docker_image_export - Export (archive) Docker images
+
+v3.6.0
+======
+
+Release Summary
+---------------
+
+Bugfix and feature release.
+
+The collection now includes a bunch of new ``docker_image_*`` modules that move features out of the
+rather complex ``docker_image`` module. These new modules are easier to use and can better declare whether
+they support check mode, diff mode, or none of them.
+
+This version also features modules that support the Docker CLI plugins ``buildx`` and ``compose``.
+The ``docker_image_build`` module uses the ``docker buildx`` command under the hood, and the ``docker_compose_v2``
+and ``docker_compose_v2_pull`` modules uses the ``docker compose`` command. All these modules use the Docker CLI
+instead of directly talking to the API. The modules support mostly the same interface as the API based modules,
+so the main difference is that instead of some Python requirements, they depend on the Docker CLI tool ``docker``.
+
+Major Changes
+-------------
+
+- The ``community.docker`` collection now depends on the ``community.library_inventory_filtering_v1`` collection. This utility collection provides host filtering functionality for inventory plugins. If you use the Ansible community package, both collections are included and you do not have to do anything special. If you install the collection with ``ansible-galaxy collection install``, it will be installed automatically. If you install the collection by copying the files of the collection to a place where ansible-core can find it, for example by cloning the git repository, you need to make sure that you also have to install the dependency if you are using the inventory plugins (https://github.com/ansible-collections/community.docker/pull/698).
+
+Minor Changes
+-------------
+
+- The ``ca_cert`` option available to almost all modules and plugins has been renamed to ``ca_path``. The name ``ca_path`` is also used for similar options in ansible-core and other collections. The old name has been added as an alias and can still be used (https://github.com/ansible-collections/community.docker/pull/744).
+- The ``docker_stack*`` modules now use the common CLI-based module code added for the ``docker_image_build`` and ``docker_compose_v2`` modules. This means that the modules now have various more configuration options with respect to talking to the Docker Daemon, and now also are part of the ``community.docker.docker`` and ``docker`` module default groups (https://github.com/ansible-collections/community.docker/pull/745).
+- docker_container - add ``networks[].mac_address`` option for Docker API 1.44+. Note that Docker API 1.44 no longer uses the global ``mac_address`` option, this new option is the only way to set the MAC address for a container (https://github.com/ansible-collections/community.docker/pull/763).
+- docker_image - allow to specify labels and ``/dev/shm`` size when building images (https://github.com/ansible-collections/community.docker/issues/726, https://github.com/ansible-collections/community.docker/pull/727).
+- docker_image - allow to specify memory size and swap memory size in other units than bytes (https://github.com/ansible-collections/community.docker/pull/727).
+- inventory plugins - add ``filter`` option which allows to include and exclude hosts based on Jinja2 conditions (https://github.com/ansible-collections/community.docker/pull/698, https://github.com/ansible-collections/community.docker/issues/610).
+
+Bugfixes
+--------
+
+- Use ``unix:///var/run/docker.sock`` instead of the legacy ``unix://var/run/docker.sock`` as default for ``docker_host`` (https://github.com/ansible-collections/community.docker/pull/736).
+- docker_image - fix archiving idempotency with Docker API 1.44 or later (https://github.com/ansible-collections/community.docker/pull/765).
+
+New Modules
+-----------
+
+- docker_compose_v2 - Manage multi-container Docker applications with Docker Compose CLI plugin
+- docker_compose_v2_pull - Pull a Docker compose project
+- docker_image_build - Build Docker images using Docker buildx
+- docker_image_pull - Pull Docker images from registries
+- docker_image_push - Push Docker images to registries
+- docker_image_remove - Remove Docker images
+- docker_image_tag - Tag Docker images with new names and/or tags
+
+v3.5.0
+======
+
+Release Summary
+---------------
+
+Bugfix and feature release.
+
+Minor Changes
+-------------
+
+- docker_container - implement better ``platform`` string comparisons to improve idempotency (https://github.com/ansible-collections/community.docker/issues/654, https://github.com/ansible-collections/community.docker/pull/705).
+- docker_container - internal refactorings which allow comparisons to use more information like details of the current image or the Docker host config (https://github.com/ansible-collections/community.docker/pull/713).
+
+Deprecated Features
+-------------------
+
+- docker_container - the default ``ignore`` for the ``image_name_mismatch`` parameter has been deprecated and will switch to ``recreate`` in community.docker 4.0.0. A deprecation warning will be printed in situations where the default value is used and where a behavior would change once the default changes (https://github.com/ansible-collections/community.docker/pull/703).
+
+Bugfixes
+--------
+
+- modules and plugins using the Docker SDK for Python - remove ``ssl_version`` from the parameters passed to Docker SDK for Python 7.0.0+. Explicitly fail with a nicer error message if it was explicitly set in this case (https://github.com/ansible-collections/community.docker/pull/715).
+- modules and plugins using the Docker SDK for Python - remove ``tls_hostname`` from the parameters passed to Docker SDK for Python 7.0.0+. Explicitly fail with a nicer error message if it was explicitly set in this case (https://github.com/ansible-collections/community.docker/pull/721).
+- vendored Docker SDK for Python - avoid passing on ``ssl_version`` and ``tls_hostname`` if they were not provided by the user. Remove dead code. (https://github.com/ansible-collections/community.docker/pull/722).
+
+v3.4.11
+=======
+
+Release Summary
+---------------
+
+Bugfix release.
+
+Bugfixes
+--------
+
+- docker_volume - fix crash caused by accessing an empty dictionary. The ``has_different_config()`` was raising an ``AttributeError`` because the ``self.existing_volume["Labels"]`` dictionary was ``None`` (https://github.com/ansible-collections/community.docker/pull/702).
+
+v3.4.10
+=======
+
+Release Summary
+---------------
+
+Bugfix release.
+
+Bugfixes
+--------
+
+- docker_swarm - make init and join operations work again with Docker SDK for Python before 4.0.0 (https://github.com/ansible-collections/community.docker/issues/695, https://github.com/ansible-collections/community.docker/pull/696).
+
+v3.4.9
+======
+
+Release Summary
+---------------
+
+Maintenance release with updated documentation and vendored Docker SDK for Python code.
+
+Bugfixes
+--------
+
+- vendored Docker SDK for Python code - cherry-pick changes from the Docker SDK for Python code to align code. These changes should not affect the parts used by the collection's code (https://github.com/ansible-collections/community.docker/pull/694).
+
+v3.4.8
+======
+
+Release Summary
+---------------
+
+Maintenance release with updated documentation.
+
+From this version on, community.docker is using the new `Ansible semantic markup
+<https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#semantic-markup-within-module-documentation>`__
+in its documentation. If you look at documentation with the ansible-doc CLI tool
+from ansible-core before 2.15, please note that it does not render the markup
+correctly. You should be still able to read it in most cases, but you need
+ansible-core 2.15 or later to see it as it is intended. Alternatively you can
+look at `the devel docsite <https://docs.ansible.com/ansible/devel/collections/community/docker/>`__
+for the rendered HTML version of the documentation of the latest release.
+
+Known Issues
+------------
+
+- Ansible markup will show up in raw form on ansible-doc text output for ansible-core before 2.15. If you have trouble deciphering the documentation markup, please upgrade to ansible-core 2.15 (or newer), or read the HTML documentation on https://docs.ansible.com/ansible/devel/collections/community/docker/.
v3.4.7
======
@@ -300,7 +504,7 @@ Minor Changes
- docker_container - allow to specify ``platform`` (https://github.com/ansible-collections/community.docker/issues/123, https://github.com/ansible-collections/community.docker/pull/426).
- modules and plugins communicating directly with the Docker daemon - improve default TLS version selection for Python 3.6 and newer. This is only a change relative to older community.docker 3.0.0 pre-releases or with respect to Docker SDK for Python < 6.0.0. Docker SDK for Python 6.0.0 will also include this change (https://github.com/ansible-collections/community.docker/pull/434).
- modules and plugins communicating directly with the Docker daemon - simplify use of helper function that was removed in Docker SDK for Python to find executables (https://github.com/ansible-collections/community.docker/pull/438).
-- socker_handler and socket_helper module utils - improve Python forward compatibilty, create helper functions for file blocking/unblocking (https://github.com/ansible-collections/community.docker/pull/415).
+- socker_handler and socket_helper module utils - improve Python forward compatibility, create helper functions for file blocking/unblocking (https://github.com/ansible-collections/community.docker/pull/415).
Breaking Changes / Porting Guide
--------------------------------
@@ -493,7 +697,7 @@ Minor Changes
Bugfixes
--------
-- docker_container, docker_image - adjust image finding code to pecularities of ``podman-docker``'s API emulation when Docker short names like ``redis`` are used (https://github.com/ansible-collections/community.docker/issues/292).
+- docker_container, docker_image - adjust image finding code to peculiarities of ``podman-docker``'s API emulation when Docker short names like ``redis`` are used (https://github.com/ansible-collections/community.docker/issues/292).
v2.1.1
======
@@ -542,7 +746,7 @@ Bugfixes
- docker_api connection plugin - avoid passing an unnecessary argument to a Docker SDK for Python call that is only supported by version 3.0.0 or later (https://github.com/ansible-collections/community.docker/pull/243).
- docker_container_exec - ``chdir`` is only supported since Docker SDK for Python 3.0.0. Make sure that this option can only use when 3.0.0 or later is installed, and prevent passing this parameter on when ``chdir`` is not provided to this module (https://github.com/ansible-collections/community.docker/pull/243, https://github.com/ansible-collections/community.docker/issues/242).
-- nsenter connection plugin - ensure the ``nsenter_pid`` option is retrieved in ``_connect`` instead of ``__init__`` to prevent a crasher due to bad initialization order (https://github.com/ansible-collections/community.docker/pull/249).
+- nsenter connection plugin - ensure the ``nsenter_pid`` option is retrieved in ``_connect`` instead of ``__init__`` to prevent a crash due to bad initialization order (https://github.com/ansible-collections/community.docker/pull/249).
- nsenter connection plugin - replace the use of ``--all-namespaces`` with specific namespaces to support compatibility with Busybox nsenter (used on, for example, Alpine containers) (https://github.com/ansible-collections/community.docker/pull/249).
v2.0.1
@@ -792,9 +996,9 @@ Bugfixes
- docker_container - fix healthcheck disabling idempotency issue with strict comparison (https://github.com/ansible-collections/community.docker/issues/85).
- docker_image - prevent module failure when removing image that is removed between inspection and removal (https://github.com/ansible-collections/community.docker/pull/87).
-- docker_image - prevent module failure when removing non-existant image by ID (https://github.com/ansible-collections/community.docker/pull/87).
+- docker_image - prevent module failure when removing non-existent image by ID (https://github.com/ansible-collections/community.docker/pull/87).
- docker_image_info - prevent module failure when image vanishes between listing and inspection (https://github.com/ansible-collections/community.docker/pull/87).
-- docker_image_info - prevent module failure when querying non-existant image by ID (https://github.com/ansible-collections/community.docker/pull/87).
+- docker_image_info - prevent module failure when querying non-existent image by ID (https://github.com/ansible-collections/community.docker/pull/87).
New Modules
-----------
@@ -913,7 +1117,6 @@ Release Summary
This is the first production (non-prerelease) release of ``community.docker``.
-
Minor Changes
-------------
@@ -931,7 +1134,6 @@ The ``community.docker`` continues the work on the Ansible docker modules and pl
All deprecation removals planned for ``community.general`` 2.0.0 have been applied. All deprecation removals scheduled for ``community.general`` 3.0.0 have been re-scheduled for ``community.docker`` 2.0.0.
-
Minor Changes
-------------
@@ -949,7 +1151,7 @@ Removed Features (previously deprecated)
- docker_image - the ``source`` option is now mandatory (https://github.com/ansible-collections/community.docker/pull/1).
- docker_image - the ``use_tls`` option has been removed. Use ``tls`` and ``validate_certs`` instead (https://github.com/ansible-collections/community.docker/pull/1).
- docker_image - the default of the ``build.pull`` option changed to ``false`` (https://github.com/ansible-collections/community.docker/pull/1).
-- docker_image_facts - this alias is on longer availabe, use ``docker_image_info`` instead (https://github.com/ansible-collections/community.docker/pull/1).
+- docker_image_facts - this alias is on longer available, use ``docker_image_info`` instead (https://github.com/ansible-collections/community.docker/pull/1).
- docker_network - no longer returns ``ansible_facts`` (https://github.com/ansible-collections/community.docker/pull/1).
- docker_network - the ``ipam_options`` option has been removed. Use ``ipam_config`` instead (https://github.com/ansible-collections/community.docker/pull/1).
- docker_service - no longer returns ``ansible_facts`` (https://github.com/ansible-collections/community.docker/pull/1).
diff --git a/ansible_collections/community/docker/FILES.json b/ansible_collections/community/docker/FILES.json
index edc83e6f7..9797df497 100644
--- a/ansible_collections/community/docker/FILES.json
+++ b/ansible_collections/community/docker/FILES.json
@@ -109,7 +109,7 @@
"name": ".azure-pipelines/azure-pipelines.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ea4b811e8060d4717b92e76a372e0840fbc617f12958516a4360d773903dc028",
+ "chksum_sha256": "4083b64eda9b5fdcbf472007a0a8edc921d46d7d2132b870ccddfc04b72aede1",
"format": 1
},
{
@@ -130,35 +130,42 @@
"name": ".github/workflows/ansible-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "4131ea9bc006d31c7c0dec53330c54af588c2c82ec18ebd0aa1db9b7a1256a01",
+ "chksum_sha256": "c1b9c8b20850a848ebb8c91cdb9382cc3e521658fb2bbe1bb62f6357565e044d",
"format": 1
},
{
"name": ".github/workflows/docs-pr.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "754a357ab5c3a5fd1dd782ade11220decb76a24bfb4452a9a15d9a7fec1f863e",
+ "chksum_sha256": "b42710de9bd387cfe9475eb546b21ee2c20af7c062b2601f8ae94b4b3255d313",
"format": 1
},
{
"name": ".github/workflows/docs-push.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8e50964ae57efe54009281fbd8f6f6f3bfa493821a5da63c08635afed76fc8f2",
+ "chksum_sha256": "c6bf8a08ff0faa3aced5e10453305f2d50df702833b6983c333886a651caa2b7",
"format": 1
},
{
"name": ".github/workflows/ee.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "16c3016cc7ac13c3523fd5235253e5894d563f6f002e7724fb1e19a7687f8051",
+ "chksum_sha256": "f7bad2dd69eaeb6413cc12e92a6bf9c962ed705563a8803a09c76669c39ca501",
+ "format": 1
+ },
+ {
+ "name": ".github/workflows/import-galaxy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "739c36223d6e0e6ccc98907c43cba53296e7b1ccd64a2d995c2ff21df4ab25a5",
"format": 1
},
{
"name": ".github/workflows/reuse.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e8a5666a792db2dbbb984d861032728af7523bd05eb64f72d5fe24d7888c4a85",
+ "chksum_sha256": "91fb4be801aaf7897a138f4774f1fa172291af4fcd9e1c7a3a5e3830236305fe",
"format": 1
},
{
@@ -207,7 +214,7 @@
"name": "LICENSES/Apache-2.0.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f2f0b07fa5e492c11d27aa0d2f3f1a0e64b9d17f32d8aa489ae2af9609af33b2",
+ "chksum_sha256": "a88d15b80c84a53d3d94876d718db924f6e59bf5cbc6a9328415bb3c0269f963",
"format": 1
},
{
@@ -235,7 +242,7 @@
"name": "changelogs/changelog.yaml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "61e7fce8a5851bb2137604e0a9197fd369cf5a6c909632cf177111ec82797d75",
+ "chksum_sha256": "78b978f9536ee113fed773101c478a20057167e348c8d5b6cdb77f44e62d9b6f",
"format": 1
},
{
@@ -249,7 +256,7 @@
"name": "changelogs/config.yaml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e608bfe9368cd9a95e04b99ec78d74bd7c8e125cc715c059a1957bb32079c102",
+ "chksum_sha256": "89ca51ecae2759b4987976d346e16fa930be4a4e05062a1385764626e3aca951",
"format": 1
},
{
@@ -277,7 +284,14 @@
"name": "docs/docsite/rst/scenario_guide.rst",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "11df82606883ecfa82952f141ed9c30ac31e07746dcd50edc53ca8dd3a360a2e",
+ "chksum_sha256": "b7460de972dad8dba6ffbaacd46a84f2b673a74e78f5eb3db617fd3eb574ba6d",
+ "format": 1
+ },
+ {
+ "name": "docs/docsite/config.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2d289e9f0e5f0151d1cd40963461f6427b69df33ba7dde69b950dc58912f016",
"format": 1
},
{
@@ -326,7 +340,7 @@
"name": "meta/runtime.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "036384152d6b46d0edefb1a12d1dfef3c85205511e5db3319d49d17fa342f97f",
+ "chksum_sha256": "edcb1bfa37eaf30f16b8a081dcd80ac6406972a894d4f3f5f7fd320e4f309c38",
"format": 1
},
{
@@ -347,7 +361,7 @@
"name": "plugins/action/docker_container_copy_into.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1c50124cc05fb7aece01e325768ce1683916f5c620545c6ff094756a3f58e29e",
+ "chksum_sha256": "e79dbc67466ae588344ddd74a79d508c859252cf76b71a918cf066ac39fb7de1",
"format": 1
},
{
@@ -361,21 +375,21 @@
"name": "plugins/connection/docker.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7b33a9616e9189aed4014f1869666bec5b788dba44385ecf3cbeed4e30f4ffe8",
+ "chksum_sha256": "499dc980904433196409bc04a10faf38801123c8a22871026037f4bad6d13bab",
"format": 1
},
{
"name": "plugins/connection/docker_api.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "989cc3489190aac86f45542c4b21888e5454eca9043f1776790b0824a6ad626e",
+ "chksum_sha256": "eb3275f36134a45b5acc0620f5b0b849c9cde8cf1975c7cd45b683d56e2e4258",
"format": 1
},
{
"name": "plugins/connection/nsenter.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8ca5d2af831451b5d3d38fcf237314b0d86f85bea38d589f91b249e7d5f34031",
+ "chksum_sha256": "2f246a2f8dcb35feb42d2a1d7f28ead845ae4854da097781489233f5a5920e94",
"format": 1
},
{
@@ -393,10 +407,17 @@
"format": 1
},
{
+ "name": "plugins/doc_fragments/compose_v2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e42aa81006fe5a72ef9713d008b616da75c6dbb0bc359ff892ced2885545166",
+ "format": 1
+ },
+ {
"name": "plugins/doc_fragments/docker.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f164958068db65e0d813835b35ea9b057c1f45cabaaa5e5e34d7b6b22b2e3ade",
+ "chksum_sha256": "89dae4973d0a843ba52d8ac81197045dcdc136df4ca685210efe815366dbb70f",
"format": 1
},
{
@@ -410,21 +431,21 @@
"name": "plugins/inventory/docker_containers.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2b00c2519a8e5698bc534d3e1b3ef6127e91bc9fa81192b64db2f0bea605c89d",
+ "chksum_sha256": "1d01e5f455339e704233d7df6597aae12be29a5fef4e6aef5fcb787cfb8030d2",
"format": 1
},
{
"name": "plugins/inventory/docker_machine.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "63788182b475bbb689919fa08b9753c3cba026937a6d7be2ee5238727d583e53",
+ "chksum_sha256": "559ab252a16a63dc14a344be1f90ee66f976d8f3927f83dda2b3657fea0c1078",
"format": 1
},
{
"name": "plugins/inventory/docker_swarm.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "94be597d342833b28bd4061b9faf061c0b04e7b1f0fedbbcc48458e90b27a918",
+ "chksum_sha256": "a01b5a62dffc44a43c42dfacff3ee1430d39c43c0d313a4289a12526bca33109",
"format": 1
},
{
@@ -452,7 +473,7 @@
"name": "plugins/module_utils/_api/api/client.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "957bfbb66512485e7b324be0c00e4c96a0db8a99f0d175732ee64ebc6fce29c6",
+ "chksum_sha256": "8554f7ce18d5be8e27c24585da9ca10eb9873fd3d190b1089908e11e64fcfdc1",
"format": 1
},
{
@@ -536,7 +557,7 @@
"name": "plugins/module_utils/_api/transport/ssladapter.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "44b20375c0f42347bd84f6e855d4a4042b5cf6e83f0f49199ea04cb8c6578130",
+ "chksum_sha256": "9280c24e44fb347c2f6075cc2ac6eb36d2ab68fda7aa95e00c987a9495343b9e",
"format": 1
},
{
@@ -620,14 +641,14 @@
"name": "plugins/module_utils/_api/utils/socket.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "87d46479caf0eb9214156b0bc10d9348171a3f96db3a9d2c6406b4e8f109c122",
+ "chksum_sha256": "58f5909c0bdbf63fbb0c09c89aeb3f8a1f9e8b22c071fd2c0c25e6bfce166d18",
"format": 1
},
{
"name": "plugins/module_utils/_api/utils/utils.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f11f1f6efa555721dcad3244256e97daaddf282e81d9a9a16683aa9d11ff1973",
+ "chksum_sha256": "951272b159d81117e35e73c6d67fce3ea9501b1edc6aace9580063a4a61936b4",
"format": 1
},
{
@@ -655,14 +676,14 @@
"name": "plugins/module_utils/_api/errors.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "36dcebce54b43306c9bd14c64786c14c9e91b60cdc60747f2d531861eb43d90a",
+ "chksum_sha256": "0c856e76224c2ff545de31cbba165bb09120bc276208c2f76ce4a62c0b027c36",
"format": 1
},
{
"name": "plugins/module_utils/_api/tls.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "23a55b15907f6d866d17f366af10e6efc0e618b207a53d3dd59ae2698cea384e",
+ "chksum_sha256": "f9f061aba4ca55a4649311b98b42e700e36b449a5f2ec117b470ef723050ad14",
"format": 1
},
{
@@ -676,21 +697,35 @@
"name": "plugins/module_utils/module_container/base.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ee59b15754a61eb80299496b9ff66b8724faa2cc62580a627ce0c3ea2a147a8e",
+ "chksum_sha256": "3ef56885b8746ef1ae068412cd9a608dcb83f5b7aa06670d5ae6216aa845a940",
"format": 1
},
{
"name": "plugins/module_utils/module_container/docker_api.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "158af3f302bad3889571eb688dd61d2c0c14f97806fdf73e6f02c445766c25e1",
+ "chksum_sha256": "2d0e757e6b3439e7445531b1be278c283e2a442747f86f51ef831739ddf158c5",
"format": 1
},
{
"name": "plugins/module_utils/module_container/module.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ec66e374d210e738d7aaea787d1bc42a547f7067acabeb6253f7fb0b8970dd18",
+ "chksum_sha256": "5bce434dccc5301efe29067d15a789513a2e70f3542e56eff0c32bc4dcc1ab36",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/_logfmt.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "83828f29e47da36c168e78a5ea7d17bf72fa20905e6678b6dbe1e445f3aa0f69",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/_platform.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "45b82a5a2cf3d9b279c5fa6e285cb91f783035abe888c0f1147ed4b427a81ac2",
"format": 1
},
{
@@ -704,14 +739,28 @@
"name": "plugins/module_utils/common.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "86b8ea61f7933baa3a681810ffbb49a28f45f4d71d09023b093093d96acde20e",
+ "chksum_sha256": "5de0831ed3a84d5a505424594ac264bd723f247a26a50bc32896b41083096fda",
"format": 1
},
{
"name": "plugins/module_utils/common_api.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "3eded77a2c9e9987e6690f1bfb17b8ebaf8eb5aba712ae2d9417cce1a116e301",
+ "chksum_sha256": "1ee4abcab984e082d2336fed858ab787e538b6e2c25a9a446fde0fd4d6c73f81",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/common_cli.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0129c9ca85986f12989d754336d5897eadf0fcd3166f1ab89afca096963fbfd6",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/compose_v2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60698c26cc1f0b0394ebd9ed2451d45681844d44c79c32b0e2921193feebc29f",
"format": 1
},
{
@@ -725,7 +774,7 @@
"name": "plugins/module_utils/image_archive.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7c6784aecdfc14661d55b3ddef4e0c19e6a44bb0fecdbc514834c571716e8711",
+ "chksum_sha256": "26073983bafd86ccadb1f197f2a55188f208145db066bbc02ea9bf59aaf30085",
"format": 1
},
{
@@ -753,7 +802,7 @@
"name": "plugins/module_utils/util.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "36b3fed68a9a09ffe13fd31c72531f2428db92417f8b39d3a98b8914485c3a92",
+ "chksum_sha256": "cd9d4863ea58408543821688b7093aed25a1323109de82c13c8489f6cd45651a",
"format": 1
},
{
@@ -774,196 +823,252 @@
"name": "plugins/modules/current_container_facts.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f8859f459d86a9cea8acc478f6cca9d9afbdb8fdb3de67dd7c26b519e8266e5b",
+ "chksum_sha256": "6866839dd328f2c566de59dea1a826ec60cb9fa20c2639c520d16338d3a09839",
"format": 1
},
{
"name": "plugins/modules/docker_compose.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ca2ed4f1ab7e7b8950aeecc53368085068d46c12a19387eb6f830916cf899f69",
+ "chksum_sha256": "ae76fdb37a3517ffcdc50047d900d33a94a9c5e85dcc76ebdd1bbc6dfa9c3b8b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_compose_v2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "237adfe9c0e33461e576fe78fb2c5f82b089e9df202fa9e61ca5ab4bc39d4282",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_compose_v2_pull.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "16378b1ddf2c8914b0b9ec7adc4519f6b664787971ba46672b1ec05f593c1ca3",
"format": 1
},
{
"name": "plugins/modules/docker_config.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d332e43cf754184bcc99367c2b256408d60baeaad3b1f45eceef634748cd9eb5",
+ "chksum_sha256": "c0f87f95dcdd562d4dcb8d637377d2923eeb0946f255ff691d45dad1690f6aa1",
"format": 1
},
{
"name": "plugins/modules/docker_container.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e47b110ea04f3db21c4c84ac913d587191bf32c72d70f11819bca7a721135458",
+ "chksum_sha256": "20ff6513c8c1d81c477c58c1cbe943e383005bcf8c110cfb3b58f96240339da7",
"format": 1
},
{
"name": "plugins/modules/docker_container_copy_into.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "dfeac79e2e0e22a99815fce943475665427a528dffce4c9804e401eb5b735053",
+ "chksum_sha256": "249d80799d026e601bf5040b554708c933a2376bda27c43d668cc9258f8b5110",
"format": 1
},
{
"name": "plugins/modules/docker_container_exec.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e89910b315662391984fb98d93621c435c486899b3a2cb260a4459e0e544fe44",
+ "chksum_sha256": "088ebb7b7c11d7d7ee8a9e30a9813dc7acfd0bac32782a8a128ac3fe613ab797",
"format": 1
},
{
"name": "plugins/modules/docker_container_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cf3a704310a9a0ac7d02af0fc9b07cfb9d3ce65cdab9ba597161f25bcb493c33",
+ "chksum_sha256": "35e0e238679d4354f9de4c1d6dc2ac3e0862cf672946d78ef0cc4a7556ab0f62",
"format": 1
},
{
"name": "plugins/modules/docker_host_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "fc1571ef765c93fd2f80e20b687ddab8360f482f0630021f5755f8ea8529d116",
+ "chksum_sha256": "7dd379926353d259ccccf5030a0c96549ebe8ec3be98e491610ba6b331f7888e",
"format": 1
},
{
"name": "plugins/modules/docker_image.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6e5fe1c3bdef812f6e58d89084958948d2a77000b2316090e4309035e95635b1",
+ "chksum_sha256": "537490ed518e8224d115fe315b7240a715b0d3e8b6d004b79e8966e1277c817d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_image_build.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0c56e7842f5681b3ca5081ee263fc33ee2a677ce07d19407c04be97f66352720",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_image_export.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7067813390e980633abb6e6dac5f5465999cc14edd128098167ca4866bab3af2",
"format": 1
},
{
"name": "plugins/modules/docker_image_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cee8e231c2ddc6330958d95c830a523cfb5663284b2fe7f9a8b9f43948037df5",
+ "chksum_sha256": "559cca032685ee95c35d6035a7cd3f618318c42f26785f1a0ff588c6f7951468",
"format": 1
},
{
"name": "plugins/modules/docker_image_load.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "dc180605dc910fedd7c3e9b75ce91c2de46a3eb6df014f7666345c074f621f8f",
+ "chksum_sha256": "16169307ec8cfa3787eadfe2fd33c818134ba9ef11e964ea4b57f0c73d695196",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_image_pull.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e9f67a89f12825306cd7c4a5ad7e88d7a37e3c61441f47a3845d254eea40742",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_image_push.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "268edc32e25119bd5325af3d9ed30aa0c9e0086e787243c99930f9987189fb9a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_image_remove.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0041c6479f43faa0a47c6935202a6b1fbbe3c149753a2e1f5d5d93c0a0588420",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/docker_image_tag.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "44167b07eef7079178b8b386407d11c327107d41a38957301179da71a8825b65",
"format": 1
},
{
"name": "plugins/modules/docker_login.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c1f09ecf54b177ba5830773fdfb7092cf54ab207f33522a603201a4fce94a42b",
+ "chksum_sha256": "2d03eca55c8d126807cff8d560211dd7cd06aedd84d1c8af2342afc96ce23a84",
"format": 1
},
{
"name": "plugins/modules/docker_network.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "03cb04a8a13c033237eddc478b5944e32a571ae67cde6004b923e08083bdf1ca",
+ "chksum_sha256": "d8f6a678e09487346b7ab007dcef3d8c5cb494ede7ccadc43be42c205902de40",
"format": 1
},
{
"name": "plugins/modules/docker_network_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "3a67bff7fa7f1a2f0d55b5c34187699b0794e67123bfdb86bc3da50a9296e413",
+ "chksum_sha256": "2df4c46a27a1a7f4faa016db358677a3885ec854592a0416e051a33a83d99d39",
"format": 1
},
{
"name": "plugins/modules/docker_node.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "98e369f1bcf1caded3d21f38724c6187a7705a0bae647a57edade757e2679ec8",
+ "chksum_sha256": "6f05002632112751e1f8f46b26a1c7faf2285fce01bd2ce836077a222f0e01bc",
"format": 1
},
{
"name": "plugins/modules/docker_node_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5875c7b1b2a5f080277de528ffb22f70540ea19d3a25583b25cc6b1046573517",
+ "chksum_sha256": "780820410f8eb564f8b858f61aa33fbc4eaee4919719df1f7c75b4c9629a67e7",
"format": 1
},
{
"name": "plugins/modules/docker_plugin.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "39ba800ce74a9d7740abe244464fe1fac4c66a7e10592930f8f2ce3de40dc566",
+ "chksum_sha256": "0e51993a3f5ba1e1d0d8067e7d4dacaac4a4031c6fc7431a847c4f69a6a7f556",
"format": 1
},
{
"name": "plugins/modules/docker_prune.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9315eb36ddab089ddcceba06cf8c70faf3a4d0d77ecce0d9a133716ee4bc1dc8",
+ "chksum_sha256": "83107f0243ee1c6706686da15f65e8aa2e5fc96e0d346934210557a97ca38292",
"format": 1
},
{
"name": "plugins/modules/docker_secret.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "fe578e93cd122a530a0b1880aaaeb6286ea06c9ce7d752345094a3ea0f63d00f",
+ "chksum_sha256": "c68ef5309cbfd19cc754f80301d57f8ed71c2b758073e31e16cf84e7f6110707",
"format": 1
},
{
"name": "plugins/modules/docker_stack.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7b0ee4740452db238cc6799510b3fccd6e06fb933b7053117bf62dccedc28f66",
+ "chksum_sha256": "047d1241a93d534ece032531376bca777d4b768846d0a50e443ffc2a50401e32",
"format": 1
},
{
"name": "plugins/modules/docker_stack_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5c8ad7b526a9903d4c334225e81c1b794f72927e7ca1bd318400f6f4d1a35a23",
+ "chksum_sha256": "cbe62b6ff998c1f3c5e8c88e2aef77002993c0b5e67dad10413d618eb3984635",
"format": 1
},
{
"name": "plugins/modules/docker_stack_task_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "34cdb57ca28f881e6069bb9f84f452c5f3b340f6f19afb09e3b7b8ebb918379a",
+ "chksum_sha256": "83fecae51c22fca463f96318f2e2c07d593adcfd84eccd043a7c1abddb988a64",
"format": 1
},
{
"name": "plugins/modules/docker_swarm.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b6b384c90ee60b63b166485bf25aebf00d2c1111a5857a049e2ce1685aad9d12",
+ "chksum_sha256": "326f01d8464ff007981b53b8b1836c3585390f7495ab0105509b4a78f676c479",
"format": 1
},
{
"name": "plugins/modules/docker_swarm_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cc3b2471a4d4154fc8e0f07f6719b0b3b0b036f53d46dc17b3b0ecacdf975dbb",
+ "chksum_sha256": "05bcd2c3e0b417f7ee328732c6c4afba2dba2400a83e5149a6af989eeda493fe",
"format": 1
},
{
"name": "plugins/modules/docker_swarm_service.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d445e55603e0c3f01d0d7b4a976cda370b0ef1fdcd0afdcc23bd400bcbabd1db",
+ "chksum_sha256": "a123422ef5020a31efc1f19872e62bd1374af3352640a62df3f01dc8a4c0a3df",
"format": 1
},
{
"name": "plugins/modules/docker_swarm_service_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a67a4a18d2482ce4a624d93351c6d013780351e531eeed4a8507e0d03b871a4b",
+ "chksum_sha256": "11ab44415df1311c23916d9e1a84b83b54e06077cbd01f22989acc0d23769fec",
"format": 1
},
{
"name": "plugins/modules/docker_volume.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1d59a481f217bd40f4b9188b540490285a7bdedd0a6e830b5942f661006630dd",
+ "chksum_sha256": "763910fd648b74f32a1a5acfa7d1c5c19ebc2cf473fe57856133b76c93759b87",
"format": 1
},
{
"name": "plugins/modules/docker_volume_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e6727d7a596134f2f4f7116e42081ad78bf41d7c72df2e4fc87ea772f138c769",
+ "chksum_sha256": "b1b8c2614b7d3746f5ac2c4e7f378fcd7912217a8171638c33e697b7889a173d",
"format": 1
},
{
@@ -1208,7 +1313,7 @@
"name": "tests/integration/targets/connection_docker_api/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -1229,7 +1334,7 @@
"name": "tests/integration/targets/connection_docker_api/setup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "90fca01e7a2276ac2616ca60026535d3996b4de111479473d7471a9ceaf22be1",
+ "chksum_sha256": "d7287d44d5223a9afb55417cb29ffdd2fb06568dd6a817274b82578082ae3176",
"format": 1
},
{
@@ -1278,7 +1383,7 @@
"name": "tests/integration/targets/connection_nsenter/runme.sh",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7f6a528c5f20c98919cf8cb93d1487f05844c9f5eab75621cc7a294d67177a08",
+ "chksum_sha256": "6c7656f5c6e2ce7d59a76527b1dfe599dbf79325e32f23b1ef7fbd478c418c79",
"format": 1
},
{
@@ -1362,7 +1467,7 @@
"name": "tests/integration/targets/docker_compose/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "47bfd6330a8616b7324f5a956839b953d844ed07b327c78a67ac86d1b65c6102",
+ "chksum_sha256": "87e5d82e8ac83281e179792a74c7a27cb38a271327311e27ce44cd81c9e654af",
"format": 1
},
{
@@ -1397,20 +1502,153 @@
"name": "tests/integration/targets/docker_compose/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1527d71c7fcb97bba10c5abe90cf36795b45583d33280d58a8b170a33dc27d36",
+ "chksum_sha256": "6b8ed3ac1dcbc2e57090222c0122e12eed47715945aa536b910fb924733b57ee",
"format": 1
},
{
"name": "tests/integration/targets/docker_compose/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
"name": "tests/integration/targets/docker_compose/aliases",
"ftype": "file",
"chksum_type": "sha256",
+ "chksum_sha256": "0198949fe4ff2cfe98102ac0580ef659952ecf3c8c45dab7f0c78655e372e828",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58974ad0879f97f23deb80f10b5f0edca86e1864798c8abc02390de4ea8437d7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/tasks/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/tasks/tests/pull.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2dca8d67d229abe3fa5a6c0913fab09042576790055a6a7b5b0cb14bf493a317",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/tasks/tests/start-stop.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "22379b999ad56ac7691796e2f2c7e0cd5e359c9cab97ded2074fce676d558eb9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "375f957e7348b7c72fac3e7ce7634b9424daf98122537ff7b803b56aa4b3079d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/tasks/run-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58974ad0879f97f23deb80f10b5f0edca86e1864798c8abc02390de4ea8437d7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/tasks/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/tasks/tests/pull.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b8eb64730c4423e73f6ed793b393f8ea6be6b66369e8133135717d4271efd135",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "375f957e7348b7c72fac3e7ce7634b9424daf98122537ff7b803b56aa4b3079d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/tasks/run-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_compose_v2_pull/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
"chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
"format": 1
},
@@ -1432,7 +1670,7 @@
"name": "tests/integration/targets/docker_config/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa",
+ "chksum_sha256": "48e41681961146fc376abdd7ef550952d84678a300f6310fd18910e2b270ac29",
"format": 1
},
{
@@ -1509,7 +1747,7 @@
"name": "tests/integration/targets/docker_container/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -1530,7 +1768,7 @@
"name": "tests/integration/targets/docker_container/tasks/tests/comparisons.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f622ba77bed23fe0bef21c621696db94325b0e98f067dc64f12abbcb7daa6a36",
+ "chksum_sha256": "9975880766fb10219151c58592084c77a17f340af95fb146503bf8e4ed5b5001",
"format": 1
},
{
@@ -1544,7 +1782,7 @@
"name": "tests/integration/targets/docker_container/tasks/tests/image-ids.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b0440399c26e6c9b3cf2e29da8ef4e3a97a2c93ee675cd5e7a55c4f8e41785e8",
+ "chksum_sha256": "60cfc29a44563833ed84d2240f6de1f146f2a3e05590bf45004108b290e1c5d3",
"format": 1
},
{
@@ -1565,7 +1803,7 @@
"name": "tests/integration/targets/docker_container/tasks/tests/options.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a5c152736a4e2c51367d3553cccc4b44320ac52eab374f4837b3eaaf29e6cc72",
+ "chksum_sha256": "b6479e2ffd06f410f3eaafd8cd478325ef1291e9013fc79d36c5c3da42b7207e",
"format": 1
},
{
@@ -1600,14 +1838,14 @@
"name": "tests/integration/targets/docker_container/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f437ccc68a828f632b778b60368f62f93758c09bd3339df64ae427cd8e9ef9e7",
+ "chksum_sha256": "47bc2c08f9e907360b97511ad5096630439458e0d6020d851f9e80fb778c9ab1",
"format": 1
},
{
"name": "tests/integration/targets/docker_container/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
@@ -1635,7 +1873,7 @@
"name": "tests/integration/targets/docker_container_copy_into/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa",
+ "chksum_sha256": "f1c910549dd871495ae0ef7a0ddfa2c2b836d671346c8993ab0d91008b19e86c",
"format": 1
},
{
@@ -1670,14 +1908,14 @@
"name": "tests/integration/targets/docker_container_copy_into/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "524ff9fae84d128947e0b36eaf1ba800f55dcc1e4cec812ae4f4a86463d725e2",
+ "chksum_sha256": "8d9fa990ca08e1a50f0729260994fe275ff72e11e997118e0bdebadcaea4ad22",
"format": 1
},
{
"name": "tests/integration/targets/docker_container_copy_into/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
@@ -1705,7 +1943,7 @@
"name": "tests/integration/targets/docker_container_exec/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -1747,7 +1985,7 @@
"name": "tests/integration/targets/docker_container_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -1789,7 +2027,7 @@
"name": "tests/integration/targets/docker_host_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -1810,7 +2048,7 @@
"name": "tests/integration/targets/docker_host_info/tasks/test_host_info.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c8876138d9d717c706d3131a7e17b762e25ad4079de0138e6062e2f603bed57f",
+ "chksum_sha256": "71b40536d593bc36f89a74db356d48dfd933c001d934f0728512eec3b1c99045",
"format": 1
},
{
@@ -1838,7 +2076,7 @@
"name": "tests/integration/targets/docker_image/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7dbaea666eae950a1143d33cb471f602233866f4e39e4ece479ce828658a50ab",
+ "chksum_sha256": "1c2c8deaa4439989de0cde4582eec0a685d1c15554272cf4e82d6fc4e119b076",
"format": 1
},
{
@@ -1859,21 +2097,21 @@
"name": "tests/integration/targets/docker_image/tasks/tests/basic.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "142e5c02da389057b35f7439df89e0c3047f8ac3f0bad93513a770e0a04ee5cd",
+ "chksum_sha256": "82c6cc949307b59b70c390d8c43067cb5fea9ae6de3c57e5d133fc9e9caa2d7a",
"format": 1
},
{
"name": "tests/integration/targets/docker_image/tasks/tests/docker_image.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b00a60da257604ace692b6a044f374071d828d1ff005ffc786c23f8fae385f35",
+ "chksum_sha256": "132b8e0517198529ec420ca730dabad59ba9fa99c5f307a8074d12a1e9a2b773",
"format": 1
},
{
"name": "tests/integration/targets/docker_image/tasks/tests/options.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a2f7b377f8b6c3ca7e3565a40ae4d81244f26ac5bbfdcc5dec20ed17fae268fd",
+ "chksum_sha256": "01e5f20d85b5a760235bb1c1b56136c8097ad7dfd32a5211fcffa5416191bb97",
"format": 1
},
{
@@ -1887,14 +2125,14 @@
"name": "tests/integration/targets/docker_image/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
"name": "tests/integration/targets/docker_image/tasks/test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cdc47967e0d64ebadcb0878d571976a21a5942ac286e88fdf00694e3e733f239",
+ "chksum_sha256": "eaeceab2e31f7a9b28a4f2e68a19b356ea9619e12ef2b7f776ab20967fc8fd0b",
"format": 1
},
{
@@ -1947,6 +2185,188 @@
"format": 1
},
{
+ "name": "tests/integration/targets/docker_image_build",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58f77094d90397f9219c42f973c386ad471d6a9e17c590260458ea0de4aa7ce0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/tasks/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/tasks/tests/options.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "175cbbaf36639ee9c054d814400835d571416b48df606c9ed7ccaf009f98032c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/tasks/run-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/tasks/test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d96b8ee07ced0cad104066cce1c1ccbd8569008924dc2669c43f363dcfec9c6f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/templates/ArgsDockerfile",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c3699620b7b078291c3f1d1c97414c9e961b51ce3705fdccb67545e87fe7e75e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/templates/Dockerfile",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d300419d4d1e626ddbd093c53831948c6ebb6d48a973ba4a0d9fa34cdf7462e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/templates/EtcHostsDockerfile",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f9d474c11ff7766ee58b74e50ecd80fba99b9ca1bab0b661c8f39c91dee23aed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/templates/MyDockerfile",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d9039d8165a7c7170c5f1466438e9c27d6380abb329609d7601d34325709858",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/templates/StagedDockerfile",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d5882640f5183ed9b01fe7f06e144cd375bd402a1f2014392347c5e0bfce2222",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_build/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f1c910549dd871495ae0ef7a0ddfa2c2b836d671346c8993ab0d91008b19e86c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/tasks/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/tasks/tests/basic.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5d45f01ccb2bdd3ca9e191085355417aff91eabbd9950714549ae559c43e409e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/tasks/run-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/tasks/test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f86478b3e92d32cd089ed3a4b4b6c9dfa7d2e0629f2180ba5a5159447de3c0e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_export/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
+ "format": 1
+ },
+ {
"name": "tests/integration/targets/docker_image_info",
"ftype": "dir",
"chksum_type": null,
@@ -1964,7 +2384,7 @@
"name": "tests/integration/targets/docker_image_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -1978,7 +2398,7 @@
"name": "tests/integration/targets/docker_image_info/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "426eca8e288e79157781391f44256414ede3708b23c39f29c92dd7db3091cf42",
+ "chksum_sha256": "dc3ce4462ff5b5f575a9e3734427fee06c61d8a0cbd93ead7926f95d0131a8a9",
"format": 1
},
{
@@ -2006,7 +2426,7 @@
"name": "tests/integration/targets/docker_image_load/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa",
+ "chksum_sha256": "f1c910549dd871495ae0ef7a0ddfa2c2b836d671346c8993ab0d91008b19e86c",
"format": 1
},
{
@@ -2027,7 +2447,7 @@
"name": "tests/integration/targets/docker_image_load/tasks/tests/basic.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "86da5d9bdf5be5824548d45f489180bf3783a4a3e418f6632343ffa512860e04",
+ "chksum_sha256": "d5de67d5dab3fcd7da5eaf5c3a6c94261bf62d1917bde74d9a950d96a17f1ed9",
"format": 1
},
{
@@ -2041,14 +2461,14 @@
"name": "tests/integration/targets/docker_image_load/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
"name": "tests/integration/targets/docker_image_load/tasks/test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "095b8c21beee6803c2a06eae5119a074eb019e54ebf2d8f0f348047cdc4e8997",
+ "chksum_sha256": "4f86478b3e92d32cd089ed3a4b4b6c9dfa7d2e0629f2180ba5a5159447de3c0e",
"format": 1
},
{
@@ -2059,6 +2479,251 @@
"format": 1
},
{
+ "name": "tests/integration/targets/docker_image_pull",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3fe2a9716c9e0d5f76289712ef7a56c65f1101ad33972a291e80c638560348de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks/tests/basic.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a74261dfdb75932a93fef7f45fae601eea430ad9a7770b2ea60c5451fe8567c0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6046c00692b59a1087dc1a1be4fb0a51d2ead9b8eb13f5dec6bf9f5c281e3556",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks/tests/registry.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5640e423fa7377f6513b62f58b068e66143f2f15b74a0a4b00d9adfdcf286352",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks/run-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/tasks/test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f86478b3e92d32cd089ed3a4b4b6c9dfa7d2e0629f2180ba5a5159447de3c0e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_pull/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3fe2a9716c9e0d5f76289712ef7a56c65f1101ad33972a291e80c638560348de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/tasks/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/tasks/tests/basic.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0e176bf605f73d6dc857c02c67aa1b8c400d8c51e30e00b2d076eddd7f10f8c1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/tasks/tests/registry.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "033ce4bb02091d123ce90d08d9618cb5b6dd9ab959d8a7c27944aeab3fe3a704",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/tasks/run-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/tasks/test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f86478b3e92d32cd089ed3a4b4b6c9dfa7d2e0629f2180ba5a5159447de3c0e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_push/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_remove",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_remove/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_remove/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_remove/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_remove/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8909cd9fb5a4f056696fb0e2f6b5c595388c0209f9aacd3143a2cdfa95039acb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_remove/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_tag",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_tag/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_tag/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_tag/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_tag/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a0189575a19c755c3ae0594b57deaf9ef24496566dafb73b9ca5edc64732c57a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/docker_image_tag/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b",
+ "format": 1
+ },
+ {
"name": "tests/integration/targets/docker_login",
"ftype": "dir",
"chksum_type": null,
@@ -2076,7 +2741,7 @@
"name": "tests/integration/targets/docker_login/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c0879f5877b4d7a56bfd1fc54868e01542fd2c3a3c935fbaf51a6f8b1d78b98c",
+ "chksum_sha256": "3fe2a9716c9e0d5f76289712ef7a56c65f1101ad33972a291e80c638560348de",
"format": 1
},
{
@@ -2118,14 +2783,14 @@
"name": "tests/integration/targets/docker_login/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
"name": "tests/integration/targets/docker_login/tasks/test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "17cb11d752619a8dec4d8cb853f761e8b57fdb5e5ce5a5da262f9084609727a2",
+ "chksum_sha256": "461a8c0fd7d6c95ea0cb8da0bd992001aee333d6b1df85ad59287c50816d4fc7",
"format": 1
},
{
@@ -2153,7 +2818,7 @@
"name": "tests/integration/targets/docker_network/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "ae0071cbdc1f10ad0a69b2bcec3ad0c9026329d5a4a885c48defd2286853051c",
"format": 1
},
{
@@ -2209,14 +2874,14 @@
"name": "tests/integration/targets/docker_network/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "783052d7b0b20a53eb53022d1a11291f58a2d6a1d5e1fe4cdaba53ef8f48ae91",
+ "chksum_sha256": "dc33f1ea882658d11b8b05f9d7ecb3b5fa83f93874634d4a64fcf5b0ce4ee135",
"format": 1
},
{
"name": "tests/integration/targets/docker_network/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
@@ -2244,7 +2909,7 @@
"name": "tests/integration/targets/docker_network_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -2286,7 +2951,7 @@
"name": "tests/integration/targets/docker_node/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf",
"format": 1
},
{
@@ -2307,7 +2972,7 @@
"name": "tests/integration/targets/docker_node/tasks/test_node.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "bda1878d83565fb8898708430195d199316191192995faf33f56328291d02458",
+ "chksum_sha256": "6286e7ba1e8bd45d6eab7be864c5732a387f3660d2ac2f294e70aad9b2ada3d8",
"format": 1
},
{
@@ -2335,7 +3000,7 @@
"name": "tests/integration/targets/docker_node_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf",
"format": 1
},
{
@@ -2384,7 +3049,7 @@
"name": "tests/integration/targets/docker_plugin/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf",
"format": 1
},
{
@@ -2419,14 +3084,14 @@
"name": "tests/integration/targets/docker_plugin/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "52bb0aa03f299c3dc12da10e484e0461c14fdff09b45613a80e537aaea6d344b",
+ "chksum_sha256": "9d9fdb52da705c4dfb2359e5c2d49068f19609f91763fb3d8777fed5627add36",
"format": 1
},
{
"name": "tests/integration/targets/docker_plugin/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
@@ -2454,7 +3119,7 @@
"name": "tests/integration/targets/docker_prune/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -2496,7 +3161,7 @@
"name": "tests/integration/targets/docker_secret/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa",
+ "chksum_sha256": "48e41681961146fc376abdd7ef550952d84678a300f6310fd18910e2b270ac29",
"format": 1
},
{
@@ -2650,7 +3315,7 @@
"name": "tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "47f3a780523d0ade76b5f881890ced60757ab9a24988b4398691b0b849c47acc",
+ "chksum_sha256": "29e78c0d01610a78842ca6301e597e5945169162814e9cf5415bd66406c8246a",
"format": 1
},
{
@@ -2734,7 +3399,7 @@
"name": "tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "dcfd63fef6c062d68b21cbbf4ecb44656d4be44f167cbb86f758edc4f8842b86",
+ "chksum_sha256": "5095994eb5af632106c94860af28783dfac2551ea3e83ca89ea1cbb8d5743e3c",
"format": 1
},
{
@@ -2797,7 +3462,7 @@
"name": "tests/integration/targets/docker_swarm/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2e40a69bda050967e474e8787b51b7343a60d5c7ac88685d66b556d160b942ea",
+ "chksum_sha256": "afb9965617dda796ed1d87d1a9cb81c0d18c52b89cecc9bd081a60de56421576",
"format": 1
},
{
@@ -2853,14 +3518,14 @@
"name": "tests/integration/targets/docker_swarm/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "243eaa04af0c56a5361d4ae5e09fc7d1ee61ac8df474638a0d00dfa5cbf08db9",
+ "chksum_sha256": "83facb629ba05b88437476933f76de29c5b3d771c73016683130c160f467bdd7",
"format": 1
},
{
"name": "tests/integration/targets/docker_swarm/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
@@ -2888,7 +3553,7 @@
"name": "tests/integration/targets/docker_swarm_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf",
"format": 1
},
{
@@ -2909,7 +3574,7 @@
"name": "tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "90c49732479e7ca86986ab2c60e33e6f76b8498153ac5c53f868853d7d41f501",
+ "chksum_sha256": "a66e2f1d82c3ab32d59c07635c4d20abf69b8d323b96ddf841357b6b0b58cdfa",
"format": 1
},
{
@@ -2958,7 +3623,7 @@
"name": "tests/integration/targets/docker_swarm_service/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf",
"format": 1
},
{
@@ -3063,14 +3728,14 @@
"name": "tests/integration/targets/docker_swarm_service/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "66e91bb3f282f7b18ca6a769723a257694c0d06721505e1d52a4c7f71c5edc61",
+ "chksum_sha256": "11581ee9556a8936a8ab16d8d1efeb94d7c48255103a35b466eda5043985ea17",
"format": 1
},
{
"name": "tests/integration/targets/docker_swarm_service/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
@@ -3112,7 +3777,7 @@
"name": "tests/integration/targets/docker_swarm_service_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf",
"format": 1
},
{
@@ -3161,7 +3826,7 @@
"name": "tests/integration/targets/docker_volume/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -3189,14 +3854,14 @@
"name": "tests/integration/targets/docker_volume/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6543ef6a25f219df5e563d0c1f01ef07f5b0a3dab90f402e9829c1bc74877a9a",
+ "chksum_sha256": "fd4eca112abb405d6608e364103379b1d106c0fd8f61b7b7ee464a5756d3e4ed",
"format": 1
},
{
"name": "tests/integration/targets/docker_volume/tasks/run-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876",
+ "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b",
"format": 1
},
{
@@ -3224,7 +3889,7 @@
"name": "tests/integration/targets/docker_volume_info/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -3294,7 +3959,7 @@
"name": "tests/integration/targets/generic_connection_tests/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2e40a69bda050967e474e8787b51b7343a60d5c7ac88685d66b556d160b942ea",
+ "chksum_sha256": "b0d732afa83688b5150e3b820884f8342c9ee4c0d9a56858687e17584d6b4de1",
"format": 1
},
{
@@ -3322,7 +3987,7 @@
"name": "tests/integration/targets/generic_connection_tests/vars/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "14638ce9bffa141ed24360a6b3829bc932cc92d32534849dff7e47c8dbd4d337",
+ "chksum_sha256": "5f127d1b97bf228ef19a0c0c998f7a7611f43087865121d35beec0fb44a07a25",
"format": 1
},
{
@@ -3350,7 +4015,7 @@
"name": "tests/integration/targets/generic_ssh_connection/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "3f6945a1293b14cbefecf8301fcc7cabaa845fabc7e6e5d4df97a159a848bb2c",
+ "chksum_sha256": "515ee11c2347dabc82e8f82887d5b978fd93ef1f324c0dc208182baca2b638a0",
"format": 1
},
{
@@ -3364,7 +4029,7 @@
"name": "tests/integration/targets/generic_ssh_connection/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d252f557380bba5c18a7d7a395bedf317d1a3322d6ed0d28c24738edbc7b3c5f",
+ "chksum_sha256": "89d9d7da7291d856cc871282536f110a0b38c459b43ba2925444cc4c0595133c",
"format": 1
},
{
@@ -3392,7 +4057,7 @@
"name": "tests/integration/targets/inventory_docker_containers/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5",
"format": 1
},
{
@@ -3406,28 +4071,28 @@
"name": "tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "234f2134d2618268ded9e87f250344cb54d1ffac76077dec39231ef435e69888",
+ "chksum_sha256": "05c43d3ee07e3844fc8e887e51e7aac1724e5e02b762847a6bbe4a5141825c16",
"format": 1
},
{
"name": "tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "27487a6d48339d9cc60b3f212670c8d1e36c19f340cbf254ce24c183bbc59fe1",
+ "chksum_sha256": "c7baa4866eb0bf2867252beb9a89b1aa709d912818f4364deb2bf35267b59c6f",
"format": 1
},
{
"name": "tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9f9ec4b04a09105e25040fbc27f2dce25d25826d2c589cb2f50e9d9fe9cdb80c",
+ "chksum_sha256": "5a161e8190369dce67ab9b59f2c4109fbfda3ce2cac66c80412b7aacc558c996",
"format": 1
},
{
"name": "tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2f8162017e23a5c9faeeadbfb6e5e0700f1e64f1d76bb5f4d21c44deb6593c4f",
+ "chksum_sha256": "e932ce6bae051ae264322180fced5ee38ce01ccd2c1b5c8ca4d4fa855e1bffd8",
"format": 1
},
{
@@ -3455,7 +4120,7 @@
"name": "tests/integration/targets/inventory_docker_containers/runme.sh",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9e9f61933604532e33a6df228c8165615864926686a4f278bccf7574725a471f",
+ "chksum_sha256": "959dd0ebdd942dd1ea2518dcafecf11004ffe7f3ab4f6eb3ddf418a6fd2a947e",
"format": 1
},
{
@@ -3490,7 +4155,7 @@
"name": "tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "06da4e8823ec83e13ab7e15e2448347a01ff3e86a26a7d5bae23a9a85630318f",
+ "chksum_sha256": "87061ebde573e07bac6d43d7991eb716942a931ae0f4e4a51e53e6a6a2f81fb2",
"format": 1
},
{
@@ -3553,7 +4218,7 @@
"name": "tests/integration/targets/inventory_docker_machine/runme.sh",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b7766b726c1bd9f7f88d041949de164708050e7cc2391db54e760bfdf0c0a18e",
+ "chksum_sha256": "40d6b2c962e3c75f15ce208eeb6d47cf16b4049560ed69c977e74fb1a2f465c2",
"format": 1
},
{
@@ -3581,7 +4246,7 @@
"name": "tests/integration/targets/inventory_docker_swarm/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf",
"format": 1
},
{
@@ -3595,14 +4260,14 @@
"name": "tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "260def0e56e182996d606d1cf1844cb867a566dca8a703f2072ac7828b411845",
+ "chksum_sha256": "08ae593373e067d4f51b95903ecf66e764ad9e690f1f287cfe436899e99b0a2f",
"format": 1
},
{
"name": "tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "68093251935f6f88a5224d35b3a27e3f7025e7e5f8e553163daf6981faf36478",
+ "chksum_sha256": "7264337e3c80dbe3ba6d521850c653da85767df86814af18a03b90a7b64fb2ec",
"format": 1
},
{
@@ -3644,7 +4309,7 @@
"name": "tests/integration/targets/inventory_docker_swarm/runme.sh",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b4b637a7352ac0fd0648dbced168f58e41cbc8b283d3b142575cc02dd7e84820",
+ "chksum_sha256": "9165553f336b498778d029796fb63fce86d53d9a8a3ffc42190c20a9442a4e66",
"format": 1
},
{
@@ -3665,7 +4330,7 @@
"name": "tests/integration/targets/setup_docker/defaults/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "dcfce2a57ae37a11f8350da70b4cb56af42d7175b34257b93b91a1073b1e4d4a",
+ "chksum_sha256": "588fe56f36b397ee3f8e5f44732ccda89632bad1b148143d06cd21365c162542",
"format": 1
},
{
@@ -3679,7 +4344,7 @@
"name": "tests/integration/targets/setup_docker/handlers/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b3404a9480a664270525437804a3d4e92476437dcedea0c04500deb7e9447f25",
+ "chksum_sha256": "5fde8f14499aecccaad502ae36b1cdc7d40057275b62fc255cb8c791fefcd7ae",
"format": 1
},
{
@@ -3707,7 +4372,7 @@
"name": "tests/integration/targets/setup_docker/tasks/Alpine.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "43b8d257ab837f98501833d5b91f8eee268be85accf168f3dfb9f478ac0d3af1",
+ "chksum_sha256": "13b468db50d2d5e6f76a989547a8ba2d9b6552a355d86173ea3f1fd7619309b9",
"format": 1
},
{
@@ -3763,7 +4428,7 @@
"name": "tests/integration/targets/setup_docker/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6f121d1ab26132465c260741cc7f45bdc50e20986a8a1b1186c929c98154edcf",
+ "chksum_sha256": "3e5d213ee69aa2b33302bc83ce9d56fde52956a4070fde9c3e2de3c7564ad88c",
"format": 1
},
{
@@ -3791,7 +4456,7 @@
"name": "tests/integration/targets/setup_docker/vars/RedHat-7.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "646aba9f18362f886a8d806cc2129a958ba226d851d54e55b805140a8b14ab7e",
+ "chksum_sha256": "d8fac5856f538ceb01bcfa39157cc49b2fd4b06f90f81b139931dfb51ba1d3fa",
"format": 1
},
{
@@ -3819,7 +4484,7 @@
"name": "tests/integration/targets/setup_docker/vars/Ubuntu-14.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "718e986033765b8744119a049b8d6c6efc048cb3eacd85edcb42c6a69e08cdcc",
+ "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb",
"format": 1
},
{
@@ -3847,7 +4512,7 @@
"name": "tests/integration/targets/setup_docker/vars/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "14638ce9bffa141ed24360a6b3829bc932cc92d32534849dff7e47c8dbd4d337",
+ "chksum_sha256": "5f127d1b97bf228ef19a0c0c998f7a7611f43087865121d35beec0fb44a07a25",
"format": 1
},
{
@@ -3858,189 +4523,448 @@
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose",
+ "name": "tests/integration/targets/setup_docker_cli_buildx",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/defaults",
+ "name": "tests/integration/targets/setup_docker_cli_buildx/meta",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/defaults/main.yml",
+ "name": "tests/integration/targets/setup_docker_cli_buildx/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5a0dcbb1be4a30a25685755533954499a8849453b5758f093fbc74c9025d1ae5",
+ "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/meta",
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/meta/main.yml",
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "00790dc5d03168159d5780e0cc7b3a3a73b9fed8aa7ab5c84f538b189ed7c2df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1d99d87f0c899b2a5f9e72705de13726d9499905a88ee7d0518d1e0a5ecc5afa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb7b20e68f175f1be8cd72e7c62f1943db97b151d0b39c0573efaf92ea74f8c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "40fbe81fae1589d08d7026a9b648bd1b836c54e24d28c5311d778838926879bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "721d802f4ff5041cb0d78ee17e9555375422ec46ead9d8c3eeec197661887b2f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_buildx/vars/default.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6cbc07316095dcf5ff8cf95bd2e57095ae2187fab0c9edf224e0d6bf212f553b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0391df4795e8bbf89618a8ebb1c3ce3458cd06474f1a9e9d9f8cdf1139a8a384",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb33f9ec7af9d4a5355e1aa3685fbbe9ced427ad030d1ce36f1f36c3eaa051c7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d1ea224b6e53e3f587af86e5f8d988e9569011d2e1d3f98a3f5836abaf3085b9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c8d8ec38064dacd5357eee4cab893855454ebe75e9f30c638071735a596776e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/tasks/nothing.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_cli_compose/vars/default.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/defaults/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ce4bb65d99952f682f7153558914669854e3ce0113789d6d0c09b2d58d6423d6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "73fc081e424b642eeab13b34ec6594726fa079ea946df22fdf7e0cc75fece2d3",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/Alpine.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Alpine.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "b71b69524c05e82aeea8ba71809e08218c45a108eb50e73bb81ddcfafbc0f48c",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Archlinux.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "b70baef7cc2b4cc553b7a6dde5aba91de029be5c08c2d0373ec57a0bccacb645",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/Debian.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Debian.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "72be467f15cffa21fa7eefbb26646f78d49787b9d30b97d41bbc045242ecc792",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/Fedora.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Fedora.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "f75f1446ccac863d07c5a0503bef419b8be29b5556a10b7200bdf7ac2f87d6b0",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/RedHat-7.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-7.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "0eb71ce9c438e1425fe68baefcd0e4ef0fdcf189f7610be09a3987f136270efd",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/RedHat-8.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-8.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "bf017f59cbd79a3501fa97c8a25f789dd4344a58d5cbe3a53d68390b3930c642",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/RedHat-9.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-9.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "bf017f59cbd79a3501fa97c8a25f789dd4344a58d5cbe3a53d68390b3930c642",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/Suse.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "8eb0b2d6ae8ba75408d500d36c1bc26325d79d3277f29a35bf6e7a7dc73cbac8",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/main.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "14c06a6d94f6eec3b1691433c009b560cccfe8edff15164ce7076ed03f73a603",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/tasks/setup.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "347de1b4ae8ddb1c9c51606f248b23047ef5bd881d662eee6bf07d4b59ab7fc3",
+ "chksum_sha256": "d0f71068688a01b29984ff13a35fbcb2ddc306d511c8f63ca66a57db807b44b6",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/CentOS-8.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0",
+ "chksum_sha256": "0554ad7767703892ec32552f8d6119dcc9015f694aa90e4aa4dc4d65a069840e",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10152adf3d38b6a56495180b4585ffea1ca37943561b97ce2fb504dcedcb6339",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/CentOS-8.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/RedHat-8.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57bb4c8bfe93488522b1b6e6fe14783266ebf1692fdcbf8743b76b248ae0484a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57bb4c8bfe93488522b1b6e6fe14783266ebf1692fdcbf8743b76b248ae0484a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fd5145a46e8fb735a465794fb7daf159b2777397fa9e206df45052e2855f2946",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/RedHat-8.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/RedHat-9.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/RedHat-9.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/Suse-py2.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Suse-py2.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Suse-py3.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0061c7189c312bb9d118ae0390ed09046eb9de90e29df5da0db043f571de71b5",
+ "chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/Ubuntu-16.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db950d02e92758a200434ecf25d81c90e7f076466be75332673c714b6be638a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-16.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/Ubuntu-18.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-18.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/Ubuntu.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "0061c7189c312bb9d118ae0390ed09046eb9de90e29df5da0db043f571de71b5",
"format": 1
},
{
- "name": "tests/integration/targets/setup_docker_compose/vars/default.yml",
+ "name": "tests/integration/targets/setup_docker_compose_v1/vars/default.yml",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb",
@@ -4194,6 +5118,125 @@
"format": 1
},
{
+ "name": "tests/integration/targets/setup_docker_current_container_network_ip",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_current_container_network_ip/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "41bf68c553802d515363d753ddcb1dd210353046bbce15372476067f260176c6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_current_container_network_ip/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fdc6377d741426c14f7cae91fe58584664a155b76ff1725cd005f05f98efc577",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/defaults/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "721c28099649141d17cacdcdb886f4de0188ddadac86852f2abb6a334830de34",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb68a78cb264725dfaa8d3647048f08b136626454fb58e349c909e13b19d4be1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "decb7c8ff488a40f3ff28d848a09158ae3a0b33675b4ee27320bd90cd0879f3c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "849f8ca19544ea366e1209448768a68238e0ec4a55d09daa9bb9817e4d51df98",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5cb84acc4451ea34b384dbd22bf68b593398d4fe490d313dfbd0ea043dbde0fa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/vars/default.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_python_deps/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb09ffab7e455855046b8e8ef753c031bcd11a625c879517fa98335d23b15af8",
+ "format": 1
+ },
+ {
"name": "tests/integration/targets/setup_docker_registry",
"ftype": "dir",
"chksum_type": null,
@@ -4232,7 +5275,7 @@
"name": "tests/integration/targets/setup_docker_registry/handlers/cleanup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "53b156130794d1c5df35d9e01508a3533488abfe0e5ff309a1887cc4e04478b2",
+ "chksum_sha256": "120d0201a317b41b424e1e8fd4f96f6d039a133f07e34dc04b1d785b56009c60",
"format": 1
},
{
@@ -4253,7 +5296,7 @@
"name": "tests/integration/targets/setup_docker_registry/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "df14f8571467afbfe26d30dca0d552af60569eef593778ceed169823636b6df0",
+ "chksum_sha256": "2817df3a1acffc7941cbe75ff9125d401a566c95e787d2deaa091e54c335bff3",
"format": 1
},
{
@@ -4281,7 +5324,7 @@
"name": "tests/integration/targets/setup_docker_registry/tasks/setup.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "35b7f4aab9306e42354462b5a1fb9795fd00321596a26483d971e907ed1718ec",
+ "chksum_sha256": "41e6a5d9cfc661c70c418c31e3ff1d02310fd05f5e5317f8d011857352cceaae",
"format": 1
},
{
@@ -4295,14 +5338,98 @@
"name": "tests/integration/targets/setup_docker_registry/vars/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "14638ce9bffa141ed24360a6b3829bc932cc92d32534849dff7e47c8dbd4d337",
+ "chksum_sha256": "5f127d1b97bf228ef19a0c0c998f7a7611f43087865121d35beec0fb44a07a25",
"format": 1
},
{
"name": "tests/integration/targets/setup_docker_registry/aliases",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d1b7da6a77f85a946d3fb9c0413c8ef74fce16c441a9327fa51ffab1098589a3",
+ "chksum_sha256": "9261aed0af24389371a0ac5c0b56cd61997059af5220a337b12a98abe1943cb4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/defaults/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "73546253591c2bccf84f689e9199ee47090ac74ee12cbf2d15af209064e74910",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb68a78cb264725dfaa8d3647048f08b136626454fb58e349c909e13b19d4be1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c624239e18818059907db67e112f49bfd6eb478836ff51c5e94326e80f01805",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "82c26f13d94c77a379869f352eb627928a151649bc4035af2063eee6b177316e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/vars/Ubuntu-14.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db950d02e92758a200434ecf25d81c90e7f076466be75332673c714b6be638a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/vars/default.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/setup_docker_sdk_for_python/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb09ffab7e455855046b8e8ef753c031bcd11a625c879517fa98335d23b15af8",
"format": 1
},
{
@@ -4561,7 +5688,7 @@
"name": "tests/integration/requirements.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "39735683a98661e03467f5ff49ebf18fc44d981d0c5d63ab2aaa07cf69bd1ab5",
+ "chksum_sha256": "d17176cccf067bce53bc57f15ed98cc91ce74d1f79f6e122558117fe75565687",
"format": 1
},
{
@@ -4579,6 +5706,27 @@
"format": 1
},
{
+ "name": "tests/sanity/extra/action-group.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8db6b6d605787776bb1fa0be5bc4eb52a89fc896f5d3b5fff13d943035e5905f",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/extra/action-group.json.license",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/extra/action-group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43418297dc51c6b51bb746189d9045c1650b6d7de373e926798e3773eb2fd3c1",
+ "format": 1
+ },
+ {
"name": "tests/sanity/extra/extra-docs.json",
"ftype": "file",
"chksum_type": "sha256",
@@ -4596,7 +5744,7 @@
"name": "tests/sanity/extra/extra-docs.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0fbd87476e9c35e4c5feb31be4aa1e8fc6aebf0de13058e5a267879f741ec0bf",
+ "chksum_sha256": "c52e316daf1292bbb063be19429fd1f06e02bce3c9d4622a8dfc61fa3af06688",
"format": 1
},
{
@@ -4649,24 +5797,10 @@
"format": 1
},
{
- "name": "tests/sanity/ignore-2.10.txt",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "f29b7fd15a448c7e4db863939b521ba515ca347a04feec3904926f36d1df667b",
- "format": 1
- },
- {
- "name": "tests/sanity/ignore-2.10.txt.license",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1",
- "format": 1
- },
- {
"name": "tests/sanity/ignore-2.11.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f29b7fd15a448c7e4db863939b521ba515ca347a04feec3904926f36d1df667b",
+ "chksum_sha256": "9a24bca3a941c3895d8443f5467ad500972776bf79973430315dc60666ca395d",
"format": 1
},
{
@@ -4680,7 +5814,7 @@
"name": "tests/sanity/ignore-2.12.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b6df9bd553d2e95b00295bd64ea2ad10e6925108616c3ee435091d9936035937",
+ "chksum_sha256": "253e2f40d466107ec1ec5ec4a936056f7a25a47c9eff9c1541faed239e954847",
"format": 1
},
{
@@ -4694,7 +5828,7 @@
"name": "tests/sanity/ignore-2.13.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ccc7d836b365401a29253c3db1fef85f976a8977eb57332de1136187ac45f39a",
+ "chksum_sha256": "7633370c8868422bb5746752325d5799c4054b89347bfe284a5d562f1aa1ca75",
"format": 1
},
{
@@ -4736,7 +5870,7 @@
"name": "tests/sanity/ignore-2.16.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ccc7d836b365401a29253c3db1fef85f976a8977eb57332de1136187ac45f39a",
+ "chksum_sha256": "77e2580c039e9062bb354b79bad043392a7e343f11e1797b35b3d28b6955de79",
"format": 1
},
{
@@ -4747,14 +5881,14 @@
"format": 1
},
{
- "name": "tests/sanity/ignore-2.9.txt",
+ "name": "tests/sanity/ignore-2.17.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d49ed4d275b233af4655cbd623246de96dd7e5aff9356a409f4a8ea7c3cdb215",
+ "chksum_sha256": "77e2580c039e9062bb354b79bad043392a7e343f11e1797b35b3d28b6955de79",
"format": 1
},
{
- "name": "tests/sanity/ignore-2.9.txt.license",
+ "name": "tests/sanity/ignore-2.17.txt.license",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1",
@@ -4820,7 +5954,7 @@
"name": "tests/unit/plugins/connection/test_docker.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6935ce21e236c76bbca4f6013b0cda317c825e89d6e2216b995e3ff72b01155f",
+ "chksum_sha256": "fca32d195d2be88e7728ce148fb170721db4ba7745ca162f1ed86e3b2145b93e",
"format": 1
},
{
@@ -4834,7 +5968,7 @@
"name": "tests/unit/plugins/inventory/test_docker_containers.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a267a4fb74b88a5069b0991f2d307234291e5e05735a4a363bde0bbdc73ac438",
+ "chksum_sha256": "87571060e81b9ed77b5332a56e5c6b5fbeba60201a07e20882b57944e5a13aaf",
"format": 1
},
{
@@ -4862,7 +5996,7 @@
"name": "tests/unit/plugins/module_utils/_api/api/test_client.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cca7fe225e44648e6ecc14ee76480d0e9b07850b0df54f5ea797f0d8df0112ed",
+ "chksum_sha256": "5114474e56b443ac90b48d2ce7d140c825da8cf52cc9d12f1285fd868089a2d2",
"format": 1
},
{
@@ -4883,7 +6017,7 @@
"name": "tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "81cd1cd14e699a58eff8a368477dc036bc68c74f37c6e2840b29dca4bc7c5dc9",
+ "chksum_sha256": "493f208f91caa26637ce2b5d7d4b7bafe0a5702baaa71ce34c2159c3f56e4588",
"format": 1
},
{
@@ -5006,6 +6140,20 @@
"format": 1
},
{
+ "name": "tests/unit/plugins/module_utils/compose_v2_test_cases.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "33aa50ee3a08c4615898083b9ac016ccd15dbcb0f3d6c2789123e480eab32439",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/module_utils/test__logfmt.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b9953396f57500b205a31805597a1c990d2aa80404ea2952494d5b129460758",
+ "format": 1
+ },
+ {
"name": "tests/unit/plugins/module_utils/test__scramble.py",
"ftype": "file",
"chksum_type": "sha256",
@@ -5013,6 +6161,13 @@
"format": 1
},
{
+ "name": "tests/unit/plugins/module_utils/test_compose_v2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e0edcf037a5b0a6925584b4241888f095067fb3dc1d8e9f0b870f50343e6c997",
+ "format": 1
+ },
+ {
"name": "tests/unit/plugins/module_utils/test_copy.py",
"ftype": "file",
"chksum_type": "sha256",
@@ -5093,7 +6248,7 @@
"name": "tests/unit/requirements.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "999b6bb4a4234b1f38abb63cbd57d40af2d93bcff2260ab088e09157a055abaf",
+ "chksum_sha256": "12b0e4bf7113bf7fbdab69a78078c507a37a366cf4539d8f6ceab7ee2c3d46f3",
"format": 1
},
{
@@ -5170,7 +6325,7 @@
"name": "tests/utils/shippable/shippable.sh",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "59171fc13d0e2c92443c4e9d807a0c5b4143f59120c4e2bb1415a35474233cec",
+ "chksum_sha256": "db01bed83cdeff8d87b90c222cb84a5661680c9dd733f4ed5929dc7d44fc8636",
"format": 1
},
{
@@ -5195,10 +6350,31 @@
"format": 1
},
{
+ "name": "tests/galaxy-importer.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d4e70c7540d2f405f079373fea81ee9be93021d051333797b20e756212ce3f0f",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a454d168d730e40228bc1b635787e39f4f1dd9561117c1c0472203fb3850ea45",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.md.license",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1",
+ "format": 1
+ },
+ {
"name": "CHANGELOG.rst",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c5ffd8701fda79eab260f17b11aa04ba6750abfbda47be69a3cf8c468541c281",
+ "chksum_sha256": "c0938e99f68c7ca4fce239f527e9a251a8c32562d4f89065fd2f4b53187f6408",
"format": 1
},
{
@@ -5219,7 +6395,7 @@
"name": "README.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d2110bcce37881a4a9a62c36821e188e5173be767b8b3ea483b82257b05006db",
+ "chksum_sha256": "f2ed87985a5ed9319821b58e4f4e124db2e06f1b6c60a28c9f50a2666d37ca6f",
"format": 1
}
],
diff --git a/ansible_collections/community/docker/LICENSES/Apache-2.0.txt b/ansible_collections/community/docker/LICENSES/Apache-2.0.txt
index 75191a4dc..6276c238f 100644
--- a/ansible_collections/community/docker/LICENSES/Apache-2.0.txt
+++ b/ansible_collections/community/docker/LICENSES/Apache-2.0.txt
@@ -1,7 +1,7 @@
Apache License
Version 2.0, January 2004
- http://www.apache.org/licenses/
+ https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@@ -176,13 +176,13 @@
END OF TERMS AND CONDITIONS
- Copyright 2016 Docker, Inc.
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/ansible_collections/community/docker/MANIFEST.json b/ansible_collections/community/docker/MANIFEST.json
index 86c6e45ef..ac81cb0ff 100644
--- a/ansible_collections/community/docker/MANIFEST.json
+++ b/ansible_collections/community/docker/MANIFEST.json
@@ -2,7 +2,7 @@
"collection_info": {
"namespace": "community",
"name": "docker",
- "version": "3.4.7",
+ "version": "3.8.1",
"authors": [
"Ansible Docker Working Group"
],
@@ -16,9 +16,11 @@
"Apache-2.0"
],
"license_file": null,
- "dependencies": {},
+ "dependencies": {
+ "community.library_inventory_filtering_v1": ">=1.0.0"
+ },
"repository": "https://github.com/ansible-collections/community.docker",
- "documentation": null,
+ "documentation": "https://docs.ansible.com/ansible/latest/collections/community/docker/",
"homepage": "https://github.com/ansible-collections/community.docker",
"issues": "https://github.com/ansible-collections/community.docker/issues"
},
@@ -26,7 +28,7 @@
"name": "FILES.json",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "304daad33746f1615fd5ad546cd59d0779efa14114acba510189c8c34784b7f1",
+ "chksum_sha256": "b8f523a2e97dadfa557a707eca6cb96b06b64396f46e33fb6c9bfcb200345094",
"format": 1
},
"format": 1
diff --git a/ansible_collections/community/docker/README.md b/ansible_collections/community/docker/README.md
index e82e0a8ed..1bee82833 100644
--- a/ansible_collections/community/docker/README.md
+++ b/ansible_collections/community/docker/README.md
@@ -16,7 +16,7 @@ Please note that this collection does **not** support Windows targets. The conne
## Tested with Ansible
-Tested with the current ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, and ansible-core 2.14 releases, and the current development version of ansible-core. Ansible/ansible-base versions before 2.11.0 are not supported.
+Tested with the current ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14, ansible-core 2.15, and ansible-core 2.16 releases, and the current development version of ansible-core. Ansible/ansible-base versions before 2.11.0 are not supported.
Please note that Ansible 2.9 and ansible-base 2.10 are no longer supported. If you need to use them, use community.docker 2.x.y. Also note that this collection does not work with ansible-core 2.11 (this includes ansible-base and Ansible 2.9) on Python 3.12+.
@@ -62,8 +62,14 @@ If you use the Ansible package and do not update collections independently, use
- community.docker.docker_container_info: retrieve information on Docker containers
- community.docker.docker_host_info: retrieve information on the Docker daemon
- community.docker.docker_image: manage Docker images
+ - community.docker.docker_image_build: build Docker images using Docker buildx
+ - community.docker.docker_image_export: export (archive) Docker images
- community.docker.docker_image_info: retrieve information on Docker images
- community.docker.docker_image_load: load Docker images from archives
+ - community.docker.docker_image_pull: pull Docker images from registries
+ - community.docker.docker_image_push: push Docker images to registries
+ - community.docker.docker_image_remove: remove Docker images
+ - community.docker.docker_image_tag: tag Docker images with new names and/or tags
- community.docker.docker_login: log in and out to/from registries
- community.docker.docker_network: manage Docker networks
- community.docker.docker_network_info: retrieve information on Docker networks
@@ -72,7 +78,9 @@ If you use the Ansible package and do not update collections independently, use
- community.docker.docker_volume: manage Docker volumes
- community.docker.docker_volume_info: retrieve information on Docker volumes
* Docker Compose:
- - community.docker.docker_compose: manage Docker Compose files
+ - community.docker.docker_compose: manage Docker Compose files (legacy Docker Compose v1)
+ - community.docker.docker_compose_v2: manage Docker Compose files (Docker compose CLI plugin)
+ - community.docker.docker_compose_v2_pull: pull a Docker compose project
* Docker Swarm:
- community.docker.docker_config: manage configurations
- community.docker.docker_node: manage Docker Swarm nodes
@@ -112,7 +120,7 @@ You can find more information in the [developer guide for collections](https://d
## Release notes
-See the [changelog](https://github.com/ansible-collections/community.docker/tree/main/CHANGELOG.rst).
+See the [changelog](https://github.com/ansible-collections/community.docker/tree/main/CHANGELOG.md).
## More information
diff --git a/ansible_collections/community/docker/changelogs/changelog.yaml b/ansible_collections/community/docker/changelogs/changelog.yaml
index 9b479daab..db03d2485 100644
--- a/ansible_collections/community/docker/changelogs/changelog.yaml
+++ b/ansible_collections/community/docker/changelogs/changelog.yaml
@@ -36,7 +36,7 @@ releases:
instead (https://github.com/ansible-collections/community.docker/pull/1).
- docker_image - the default of the ``build.pull`` option changed to ``false``
(https://github.com/ansible-collections/community.docker/pull/1).
- - docker_image_facts - this alias is on longer availabe, use ``docker_image_info``
+ - docker_image_facts - this alias is on longer available, use ``docker_image_info``
instead (https://github.com/ansible-collections/community.docker/pull/1).
- docker_network - no longer returns ``ansible_facts`` (https://github.com/ansible-collections/community.docker/pull/1).
- docker_network - the ``ipam_options`` option has been removed. Use ``ipam_config``
@@ -213,11 +213,11 @@ releases:
comparison (https://github.com/ansible-collections/community.docker/issues/85).
- docker_image - prevent module failure when removing image that is removed
between inspection and removal (https://github.com/ansible-collections/community.docker/pull/87).
- - docker_image - prevent module failure when removing non-existant image by
+ - docker_image - prevent module failure when removing non-existent image by
ID (https://github.com/ansible-collections/community.docker/pull/87).
- docker_image_info - prevent module failure when image vanishes between listing
and inspection (https://github.com/ansible-collections/community.docker/pull/87).
- - docker_image_info - prevent module failure when querying non-existant image
+ - docker_image_info - prevent module failure when querying non-existent image
by ID (https://github.com/ansible-collections/community.docker/pull/87).
minor_changes:
- docker_container - add ``storage_opts`` option to specify storage options
@@ -475,7 +475,7 @@ releases:
module (https://github.com/ansible-collections/community.docker/pull/243,
https://github.com/ansible-collections/community.docker/issues/242).
- nsenter connection plugin - ensure the ``nsenter_pid`` option is retrieved
- in ``_connect`` instead of ``__init__`` to prevent a crasher due to bad initialization
+ in ``_connect`` instead of ``__init__`` to prevent a crash due to bad initialization
order (https://github.com/ansible-collections/community.docker/pull/249).
- nsenter connection plugin - replace the use of ``--all-namespaces`` with specific
namespaces to support compatibility with Busybox nsenter (used on, for example,
@@ -528,7 +528,7 @@ releases:
2.2.0:
changes:
bugfixes:
- - docker_container, docker_image - adjust image finding code to pecularities
+ - docker_container, docker_image - adjust image finding code to peculiarities
of ``podman-docker``'s API emulation when Docker short names like ``redis``
are used (https://github.com/ansible-collections/community.docker/issues/292).
minor_changes:
@@ -791,7 +791,7 @@ releases:
with ansible-core 2.12+. For ansible-core 2.11, uses ``distutils.version``
for Python < 3.12. There is no support for ansible-core 2.11 with Python 3.12+
(https://github.com/ansible-collections/community.docker/pull/271).
- - socker_handler and socket_helper module utils - improve Python forward compatibilty,
+ - socker_handler and socket_helper module utils - improve Python forward compatibility,
create helper functions for file blocking/unblocking (https://github.com/ansible-collections/community.docker/pull/415).
release_summary: First alpha prerelease of community.docker 3.0.0. This version
has several breaking changes and features rewrites of several modules to directly
@@ -1129,6 +1129,28 @@ releases:
- fix-tmpfs_size-and-tmpfs_mode.yml
- remove-unneeded-imports.yml
release_date: '2023-02-20'
+ 3.4.10:
+ changes:
+ bugfixes:
+ - docker_swarm - make init and join operations work again with Docker SDK for
+ Python before 4.0.0 (https://github.com/ansible-collections/community.docker/issues/695,
+ https://github.com/ansible-collections/community.docker/pull/696).
+ release_summary: Bugfix release.
+ fragments:
+ - 3.4.10.yml
+ - 696-docker_swarm-data_addr_path.yml
+ release_date: '2023-10-29'
+ 3.4.11:
+ changes:
+ bugfixes:
+ - docker_volume - fix crash caused by accessing an empty dictionary. The ``has_different_config()``
+ was raising an ``AttributeError`` because the ``self.existing_volume["Labels"]``
+ dictionary was ``None`` (https://github.com/ansible-collections/community.docker/pull/702).
+ release_summary: Bugfix release.
+ fragments:
+ - 3.4.11.yml
+ - 702-docker-volume-label-none.yaml
+ release_date: '2023-11-12'
3.4.2:
changes:
bugfixes:
@@ -1214,3 +1236,390 @@ releases:
- 3.4.7.yml
- 637-swarm_info-endpoint_spec.yml
release_date: '2023-06-15'
+ 3.4.8:
+ changes:
+ known_issues:
+ - Ansible markup will show up in raw form on ansible-doc text output for ansible-core
+ before 2.15. If you have trouble deciphering the documentation markup, please
+ upgrade to ansible-core 2.15 (or newer), or read the HTML documentation on
+ https://docs.ansible.com/ansible/devel/collections/community/docker/.
+ release_summary: 'Maintenance release with updated documentation.
+
+
+ From this version on, community.docker is using the new `Ansible semantic
+ markup
+
+ <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#semantic-markup-within-module-documentation>`__
+
+ in its documentation. If you look at documentation with the ansible-doc CLI
+ tool
+
+ from ansible-core before 2.15, please note that it does not render the markup
+
+ correctly. You should be still able to read it in most cases, but you need
+
+ ansible-core 2.15 or later to see it as it is intended. Alternatively you
+ can
+
+ look at `the devel docsite <https://docs.ansible.com/ansible/devel/collections/community/docker/>`__
+
+ for the rendered HTML version of the documentation of the latest release.
+
+ '
+ fragments:
+ - 3.4.8.yml
+ release_date: '2023-06-22'
+ 3.4.9:
+ changes:
+ bugfixes:
+ - vendored Docker SDK for Python code - cherry-pick changes from the Docker
+ SDK for Python code to align code. These changes should not affect the parts
+ used by the collection's code (https://github.com/ansible-collections/community.docker/pull/694).
+ release_summary: Maintenance release with updated documentation and vendored
+ Docker SDK for Python code.
+ fragments:
+ - 3.4.9.yml
+ - 694-docker-py.yml
+ release_date: '2023-10-08'
+ 3.5.0:
+ changes:
+ bugfixes:
+ - modules and plugins using the Docker SDK for Python - remove ``ssl_version``
+ from the parameters passed to Docker SDK for Python 7.0.0+. Explicitly fail
+ with a nicer error message if it was explicitly set in this case (https://github.com/ansible-collections/community.docker/pull/715).
+ - modules and plugins using the Docker SDK for Python - remove ``tls_hostname``
+ from the parameters passed to Docker SDK for Python 7.0.0+. Explicitly fail
+ with a nicer error message if it was explicitly set in this case (https://github.com/ansible-collections/community.docker/pull/721).
+ - vendored Docker SDK for Python - avoid passing on ``ssl_version`` and ``tls_hostname``
+ if they were not provided by the user. Remove dead code. (https://github.com/ansible-collections/community.docker/pull/722).
+ deprecated_features:
+ - docker_container - the default ``ignore`` for the ``image_name_mismatch``
+ parameter has been deprecated and will switch to ``recreate`` in community.docker
+ 4.0.0. A deprecation warning will be printed in situations where the default
+ value is used and where a behavior would change once the default changes (https://github.com/ansible-collections/community.docker/pull/703).
+ minor_changes:
+ - docker_container - implement better ``platform`` string comparisons to improve
+ idempotency (https://github.com/ansible-collections/community.docker/issues/654,
+ https://github.com/ansible-collections/community.docker/pull/705).
+ - docker_container - internal refactorings which allow comparisons to use more
+ information like details of the current image or the Docker host config (https://github.com/ansible-collections/community.docker/pull/713).
+ release_summary: Bugfix and feature release.
+ fragments:
+ - 3.5.0.yml
+ - 703-docker_container-image_name_mismatch.yml
+ - 705-docker_container-platform.yml
+ - 713-docker_container-refactoring.yml
+ - 715-docker-7.yml
+ - 721-docker-7.yml
+ - 722-tls.yml
+ release_date: '2023-12-10'
+ 3.6.0:
+ changes:
+ bugfixes:
+ - docker_image - fix archiving idempotency with Docker API 1.44 or later (https://github.com/ansible-collections/community.docker/pull/765).
+ minor_changes:
+ - docker_container - add ``networks[].mac_address`` option for Docker API 1.44+.
+ Note that Docker API 1.44 no longer uses the global ``mac_address`` option,
+ this new option is the only way to set the MAC address for a container (https://github.com/ansible-collections/community.docker/pull/763).
+ release_summary: 'Bugfix and feature release.
+
+
+ The collection now includes a bunch of new ``docker_image_*`` modules that
+ move features out of the
+
+ rather complex ``docker_image`` module. These new modules are easier to use
+ and can better declare whether
+
+ they support check mode, diff mode, or none of them.
+
+
+ This version also features modules that support the Docker CLI plugins ``buildx``
+ and ``compose``.
+
+ The ``docker_image_build`` module uses the ``docker buildx`` command under
+ the hood, and the ``docker_compose_v2``
+
+ and ``docker_compose_v2_pull`` modules uses the ``docker compose`` command.
+ All these modules use the Docker CLI
+
+ instead of directly talking to the API. The modules support mostly the same
+ interface as the API based modules,
+
+ so the main difference is that instead of some Python requirements, they depend
+ on the Docker CLI tool ``docker``.
+
+ '
+ fragments:
+ - 3.6.0.yml
+ - 763-docker_container-mac_address.yml
+ - 765-docker_image-archive.yml
+ release_date: '2024-01-21'
+ 3.6.0-b1:
+ changes:
+ bugfixes:
+ - Use ``unix:///var/run/docker.sock`` instead of the legacy ``unix://var/run/docker.sock``
+ as default for ``docker_host`` (https://github.com/ansible-collections/community.docker/pull/736).
+ minor_changes:
+ - docker_image - allow to specify labels and ``/dev/shm`` size when building
+ images (https://github.com/ansible-collections/community.docker/issues/726,
+ https://github.com/ansible-collections/community.docker/pull/727).
+ - docker_image - allow to specify memory size and swap memory size in other
+ units than bytes (https://github.com/ansible-collections/community.docker/pull/727).
+ release_summary: 'Prerelease of the upcoming 3.6.0 bugfix and feature release.
+
+
+ The collection now includes a bunch of new ``docker_image_*`` modules that
+ move features out of the
+
+ rather complex ``docker_image`` module. These new modules are easier to use
+ and can better declare whether
+
+ they support check mode, diff mode, or none of them.
+
+
+ This version also features modules that support the Docker CLI plugins ``buildx``
+ and ``compose``.
+
+ The ``docker_image_build`` module uses the ``docker buildx`` command under
+ the hood, and the ``docker_compose_v2``
+
+ module uses the ``docker compose`` command. Both these modules use the Docker
+ CLI instead of directly talking
+
+ to the API. The modules support mostly the same interface as the API based
+ modules, so the main difference is that
+
+ instead of some Python requirements, they depend on the Docker CLI tool ``docker``.
+
+ '
+ fragments:
+ - 3.6.0-b1.yml
+ - 727-docker_image-build.yml
+ - host.yml
+ modules:
+ - description: Manage multi-container Docker applications with Docker Compose
+ CLI plugin
+ name: docker_compose_v2
+ namespace: ''
+ - description: Build Docker images using Docker buildx
+ name: docker_image_build
+ namespace: ''
+ - description: Pull Docker images from registries
+ name: docker_image_pull
+ namespace: ''
+ - description: Push Docker images to registries
+ name: docker_image_push
+ namespace: ''
+ - description: Remove Docker images
+ name: docker_image_remove
+ namespace: ''
+ - description: Tag Docker images with new names and/or tags
+ name: docker_image_tag
+ namespace: ''
+ release_date: '2024-01-04'
+ 3.6.0-b2:
+ changes:
+ major_changes:
+ - The ``community.docker`` collection now depends on the ``community.library_inventory_filtering_v1``
+ collection. This utility collection provides host filtering functionality
+ for inventory plugins. If you use the Ansible community package, both collections
+ are included and you do not have to do anything special. If you install the
+ collection with ``ansible-galaxy collection install``, it will be installed
+ automatically. If you install the collection by copying the files of the collection
+ to a place where ansible-core can find it, for example by cloning the git
+ repository, you need to make sure that you also have to install the dependency
+ if you are using the inventory plugins (https://github.com/ansible-collections/community.docker/pull/698).
+ minor_changes:
+ - The ``ca_cert`` option available to almost all modules and plugins has been
+ renamed to ``ca_path``. The name ``ca_path`` is also used for similar options
+ in ansible-core and other collections. The old name has been added as an alias
+ and can still be used (https://github.com/ansible-collections/community.docker/pull/744).
+ - The ``docker_stack*`` modules now use the common CLI-based module code added
+ for the ``docker_image_build`` and ``docker_compose_v2`` modules. This means
+ that the modules now have various more configuration options with respect
+ to talking to the Docker Daemon, and now also are part of the ``community.docker.docker``
+ and ``docker`` module default groups (https://github.com/ansible-collections/community.docker/pull/745).
+ - inventory plugins - add ``filter`` option which allows to include and exclude
+ hosts based on Jinja2 conditions (https://github.com/ansible-collections/community.docker/pull/698,
+ https://github.com/ansible-collections/community.docker/issues/610).
+ release_summary: 'Second prerelease of the upcoming 3.6.0 bugfix and feature
+ release.
+
+
+ The collection now includes a bunch of new ``docker_image_*`` modules that
+ move features out of the
+
+ rather complex ``docker_image`` module. These new modules are easier to use
+ and can better declare whether
+
+ they support check mode, diff mode, or none of them.
+
+
+ This version also features modules that support the Docker CLI plugins ``buildx``
+ and ``compose``.
+
+ The ``docker_image_build`` module uses the ``docker buildx`` command under
+ the hood, and the ``docker_compose_v2``
+
+ and ``docker_compose_v2_pull`` modules uses the ``docker compose`` command.
+ All these modules use the Docker CLI
+
+ instead of directly talking to the API. The modules support mostly the same
+ interface as the API based modules,
+
+ so the main difference is that instead of some Python requirements, they depend
+ on the Docker CLI tool ``docker``.
+
+
+ Other changes to the collection since the last prerelease:
+
+
+ * docker_compose_v2 allows to specify the pull policy
+
+ '
+ fragments:
+ - 3.6.0-b2.yml
+ - 698-filter.yml
+ - 744-ca_path.yml
+ - 745-docker_stack.yml
+ modules:
+ - description: Pull a Docker compose project
+ name: docker_compose_v2_pull
+ namespace: ''
+ release_date: '2024-01-14'
+ 3.6.0-rc1:
+ changes:
+ release_summary: 'First release candidate of the latest bugfix and feature release.
+
+ No more features will be added before the final release, which will likely
+ happen on Sunday or Monday.
+
+
+ The collection now includes a bunch of new ``docker_image_*`` modules that
+ move features out of the
+
+ rather complex ``docker_image`` module. These new modules are easier to use
+ and can better declare whether
+
+ they support check mode, diff mode, or none of them.
+
+
+ This version also features modules that support the Docker CLI plugins ``buildx``
+ and ``compose``.
+
+ The ``docker_image_build`` module uses the ``docker buildx`` command under
+ the hood, and the ``docker_compose_v2``
+
+ and ``docker_compose_v2_pull`` modules uses the ``docker compose`` command.
+ All these modules use the Docker CLI
+
+ instead of directly talking to the API. The modules support mostly the same
+ interface as the API based modules,
+
+ so the main difference is that instead of some Python requirements, they depend
+ on the Docker CLI tool ``docker``.
+
+
+ Changes since the last beta:
+
+ * The ``docker_compose_v2*`` modules also checks for ``compose.yaml`` and
+ ``compose.yml``, not only for ``docker-compose.yaml`` and ``docker-compose.yml``.
+
+ * You can now specify ``services`` in the ``docker_compose_v2`` module.
+
+ * You can now specify ``build`` in the ``docker_compose_v2`` module (allows
+ to pass ``--build`` or ``--no-build`` depending on its value).
+
+ '
+ fragments:
+ - 3.6.0-rc1.yml
+ release_date: '2024-01-18'
+ 3.7.0:
+ changes:
+ bugfixes:
+ - docker_compose_v2 - properly parse dry-run build events from ``stderr`` (https://github.com/ansible-collections/community.docker/issues/778,
+ https://github.com/ansible-collections/community.docker/pull/779).
+ - docker_compose_v2_pull - the module was documented as part of the ``community.docker.docker``
+ action group, but was not actually part of it. That has now been fixed (https://github.com/ansible-collections/community.docker/pull/773).
+ minor_changes:
+ - docker_compose_v2 - add ``scale`` option to allow to explicitly scale services
+ (https://github.com/ansible-collections/community.docker/pull/776).
+ - docker_compose_v2, docker_compose_v2_pull - support ``files`` parameter to
+ specify multiple Compose files (https://github.com/ansible-collections/community.docker/issues/772,
+ https://github.com/ansible-collections/community.docker/pull/775).
+ release_summary: Bugfix and feature release.
+ fragments:
+ - 3.7.0.yml
+ - 773-docker_compose_v2_pull-action-group.yml
+ - 775-docker_compose-files.yml
+ - 776-docker_compose-scale.yml
+ - 779-compose-v2-build.yml
+ modules:
+ - description: Export (archive) Docker images
+ name: docker_image_export
+ namespace: ''
+ release_date: '2024-01-27'
+ 3.8.0:
+ changes:
+ bugfixes:
+ - docker_compose_v2 - do not consider a ``Waiting`` event as an action/change
+ (https://github.com/ansible-collections/community.docker/pull/804).
+ - docker_compose_v2 - do not treat service-level pull events as changes to avoid
+ incorrect ``changed=true`` return value of ``pull=always`` (https://github.com/ansible-collections/community.docker/issues/802,
+ https://github.com/ansible-collections/community.docker/pull/803).
+ - docker_compose_v2, docker_compose_v2_pull - fix parsing of pull messages for
+ Docker Compose 2.20.0 (https://github.com/ansible-collections/community.docker/issues/785,
+ https://github.com/ansible-collections/community.docker/pull/786).
+ minor_changes:
+ - docker_compose_v2 - allow to wait until containers are running/health when
+ running ``docker compose up`` with the new ``wait`` option (https://github.com/ansible-collections/community.docker/issues/794,
+ https://github.com/ansible-collections/community.docker/pull/796).
+ - docker_container - the ``pull_check_mode_behavior`` option now allows to control
+ the module's behavior in check mode when ``pull=always`` (https://github.com/ansible-collections/community.docker/issues/792,
+ https://github.com/ansible-collections/community.docker/pull/797).
+ - docker_container - the ``pull`` option now accepts the three values ``never``,
+ ``missing_image`` (default), and ``never``, next to the previously valid values
+ ``true`` (equivalent to ``always``) and ``false`` (equivalent to ``missing_image``).
+ This allows the equivalent to ``--pull=never`` from the Docker command line
+ (https://github.com/ansible-collections/community.docker/issues/783, https://github.com/ansible-collections/community.docker/pull/797).
+ release_summary: Bugfix and feature release.
+ fragments:
+ - 3.8.0.yml
+ - 786-docker_v2.yml
+ - 796-docker_compose_v2-wait.yml
+ - 797-docker_container-pull.yml
+ - 803-compose-v2-pull.yml
+ - 804-compose-v2-waiting.yml
+ release_date: '2024-02-25'
+ 3.8.1:
+ changes:
+ bugfixes:
+ - docker_compose_v2 - do not fail when non-fatal errors occur. This can happen
+ when pulling an image fails, but then the image can be built for another service.
+ Docker Compose emits an error in that case, but ``docker compose up`` still
+ completes successfully (https://github.com/ansible-collections/community.docker/issues/807,
+ https://github.com/ansible-collections/community.docker/pull/810, https://github.com/ansible-collections/community.docker/pull/811).
+ - docker_compose_v2* modules - correctly parse ``Warning`` events emitted by
+ Docker Compose (https://github.com/ansible-collections/community.docker/issues/807,
+ https://github.com/ansible-collections/community.docker/pull/811).
+ - docker_compose_v2* modules - parse ``logfmt`` warnings emitted by Docker Compose
+ (https://github.com/ansible-collections/community.docker/issues/787, https://github.com/ansible-collections/community.docker/pull/811).
+ - docker_compose_v2_pull - fixing idempotence by checking actual pull progress
+ events instead of service-level pull request when ``policy=always``. This
+ stops the module from reporting ``changed=true`` if no actual change happened
+ when pulling. In check mode, it has to assume that a change happens though
+ (https://github.com/ansible-collections/community.docker/issues/813, https://github.com/ansible-collections/community.docker/pull/814).
+ release_summary: Bugfix release
+ security_fixes:
+ - docker_containers, docker_machine, and docker_swarm inventory plugins - make
+ sure all data received from the Docker daemon / Docker machine is marked as
+ unsafe, so remote code execution by obtaining texts that can be evaluated
+ as templates is not possible (https://www.die-welt.net/2024/03/remote-code-execution-in-ansible-dynamic-inventory-plugins/,
+ https://github.com/ansible-collections/community.docker/pull/815).
+ fragments:
+ - 3.8.1.yml
+ - 810-compose-errors.yml
+ - 811-compose-v2-logfmt.yml
+ - 814-docker_compose_v2_pull-idem.yml
+ - inventory-rce.yml
+ release_date: '2024-03-16'
diff --git a/ansible_collections/community/docker/changelogs/config.yaml b/ansible_collections/community/docker/changelogs/config.yaml
index 1c0c2d208..1fd1d794d 100644
--- a/ansible_collections/community/docker/changelogs/config.yaml
+++ b/ansible_collections/community/docker/changelogs/config.yaml
@@ -11,6 +11,9 @@ keep_fragments: false
mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments
+output_formats:
+ - md
+ - rst
prelude_section_name: release_summary
prelude_section_title: Release Summary
sections:
diff --git a/ansible_collections/community/docker/docs/docsite/config.yml b/ansible_collections/community/docker/docs/docsite/config.yml
new file mode 100644
index 000000000..846b95f62
--- /dev/null
+++ b/ansible_collections/community/docker/docs/docsite/config.yml
@@ -0,0 +1,15 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# The following `.. envvar::` directives are defined in the extra docsite docs:
+envvar_directives:
+ - DOCKER_HOST
+ - DOCKER_API_VERSION
+ - DOCKER_TIMEOUT
+ - DOCKER_CERT_PATH
+ - DOCKER_SSL_VERSION
+ - DOCKER_TLS
+ - DOCKER_TLS_HOSTNAME
+ - DOCKER_TLS_VERIFY
diff --git a/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst b/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst
index e4b84431f..203aa57d2 100644
--- a/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst
+++ b/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst
@@ -8,7 +8,7 @@
Docker Guide
============
-The `community.docker collection <https://galaxy.ansible.com/community/docker>`_ offers several modules and plugins for orchestrating Docker containers and Docker Swarm.
+The `community.docker collection <https://galaxy.ansible.com/ui/repo/published/community/docker/>`_ offers several modules and plugins for orchestrating Docker containers and Docker Swarm.
.. contents::
:local:
@@ -18,7 +18,7 @@ The `community.docker collection <https://galaxy.ansible.com/community/docker>`_
Requirements
------------
-Most of the modules and plugins in community.docker require the `Docker SDK for Python <https://docker-py.readthedocs.io/en/stable/>`_. The SDK needs to be installed on the machines where the modules and plugins are executed, and for the Python version(s) with which the modules and plugins are executed. You can use the :ref:`community.general.python_requirements_info module <ansible_collections.community.general.python_requirements_info_module>` to make sure that the Docker SDK for Python is installed on the correct machine and for the Python version used by Ansible.
+Most of the modules and plugins in community.docker require the `Docker SDK for Python <https://docker-py.readthedocs.io/en/stable/>`_. The SDK needs to be installed on the machines where the modules and plugins are executed, and for the Python version(s) with which the modules and plugins are executed. You can use the :ansplugin:`community.general.python_requirements_info module <community.general.python_requirements_info#module>` to make sure that the Docker SDK for Python is installed on the correct machine and for the Python version used by Ansible.
Note that plugins (inventory plugins and connection plugins) are always executed in the context of Ansible itself. If you use a plugin that requires the Docker SDK for Python, you need to install it on the machine running ``ansible`` or ``ansible-playbook`` and for the same Python interpreter used by Ansible. To see which Python is used, run ``ansible --version``.
@@ -49,7 +49,7 @@ Parameters
Most plugins and modules can be configured by the following parameters:
docker_host
- The URL or Unix socket path used to connect to the Docker API. Defaults to ``unix://var/run/docker.sock``. To connect to a remote host, provide the TCP connection string (for example: ``tcp://192.0.2.23:2376``). If TLS is used to encrypt the connection to the API, then the module will automatically replace 'tcp' in the connection URL with 'https'.
+ The URL or Unix socket path used to connect to the Docker API. Defaults to ``unix:///var/run/docker.sock``. To connect to a remote host, provide the TCP connection string (for example: ``tcp://192.0.2.23:2376``). If TLS is used to encrypt the connection to the API, then the module will automatically replace ``tcp`` in the connection URL with ``https``.
api_version
The version of the Docker API running on the Docker Host. Defaults to the latest version of the API supported by the Docker SDK for Python installed.
@@ -63,7 +63,7 @@ Most plugins and modules can be configured by the following parameters:
validate_certs
Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server. Default is ``false``.
- cacert_path
+ ca_path
Use a CA certificate when performing server verification by providing the path to a CA certificate file.
cert_path
@@ -78,6 +78,58 @@ Most plugins and modules can be configured by the following parameters:
ssl_version
Provide a valid SSL version number. The default value is determined by the Docker SDK for Python.
+ This option is not available for the CLI based plugins. It is mainly needed for legacy systems and should be avoided.
+
+
+Module default group
+....................
+
+To avoid having to specify common parameters for all the modules in every task, you can use the ``community.docker.docker`` :ref:`module defaults group <module_defaults_groups>`, or its short name ``docker``.
+
+.. note::
+
+ Module default groups only work for modules, not for plugins (connection and inventory plugins).
+
+The following example shows how the module default group can be used in a playbook:
+
+.. code-block:: yaml+jinja
+
+ ---
+ - name: Pull and image and start the container
+ hosts: localhost
+ gather_facts: false
+ module_defaults:
+ group/community.docker.docker:
+ # Select Docker Daemon on other host
+ docker_host: tcp://192.0.2.23:2376
+ # Configure TLS
+ tls: true
+ validate_certs: true
+ tls_hostname: docker.example.com
+ ca_path: /path/to/cacert.pem
+ # Increase timeout
+ timeout: 120
+ tasks:
+ - name: Pull image
+ community.docker.docker_image_pull:
+ name: python
+ tag: 3.12
+
+ - name: Start container
+ community.docker.docker_container:
+ cleanup: true
+ command: python --version
+ detach: false
+ image: python:3.12
+ name: my-python-container
+ output_logs: true
+
+ - name: Show output
+ ansible.builtin.debug:
+ msg: "{{ output.container.Output }}"
+
+Here the two ``community.docker`` tasks will use the options set for the module defaults group.
+
Environment variables
.....................
@@ -86,27 +138,38 @@ You can also control how the plugins and modules connect to the Docker API by se
For plugins, they have to be set for the environment Ansible itself runs in. For modules, they have to be set for the environment the modules are executed in. For modules running on remote machines, the environment variables have to be set on that machine for the user used to execute the modules with.
- DOCKER_HOST
- The URL or Unix socket path used to connect to the Docker API.
+.. envvar:: DOCKER_HOST
+
+ The URL or Unix socket path used to connect to the Docker API.
+
+.. envvar:: DOCKER_API_VERSION
+
+ The version of the Docker API running on the Docker Host. Defaults to the latest version of the API supported
+ by Docker SDK for Python.
+
+.. envvar:: DOCKER_TIMEOUT
+
+ The maximum amount of time in seconds to wait on a response from the API.
- DOCKER_API_VERSION
- The version of the Docker API running on the Docker Host. Defaults to the latest version of the API supported
- by Docker SDK for Python.
+.. envvar:: DOCKER_CERT_PATH
- DOCKER_TIMEOUT
- The maximum amount of time in seconds to wait on a response from the API.
+ Path to the directory containing the client certificate, client key and CA certificate.
- DOCKER_CERT_PATH
- Path to the directory containing the client certificate, client key and CA certificate.
+.. envvar:: DOCKER_SSL_VERSION
- DOCKER_SSL_VERSION
- Provide a valid SSL version number.
+ Provide a valid SSL version number.
- DOCKER_TLS
- Secure the connection to the API by using TLS without verifying the authenticity of the Docker Host.
+.. envvar:: DOCKER_TLS
- DOCKER_TLS_VERIFY
- Secure the connection to the API by using TLS and verify the authenticity of the Docker Host.
+ Secure the connection to the API by using TLS without verifying the authenticity of the Docker Host.
+
+.. envvar:: DOCKER_TLS_HOSTNAME
+
+ When verifying the authenticity of the Docker Host, uses this hostname to compare to the host's certificate.
+
+.. envvar:: DOCKER_TLS_VERIFY
+
+ Secure the connection to the API by using TLS and verify the authenticity of the Docker Host.
Plain Docker daemon: images, networks, volumes, and containers
@@ -115,70 +178,118 @@ Plain Docker daemon: images, networks, volumes, and containers
For working with a plain Docker daemon, that is without Swarm, there are connection plugins, an inventory plugin, and several modules available:
docker connection plugin
- The :ref:`community.docker.docker connection plugin <ansible_collections.community.docker.docker_connection>` uses the Docker CLI utility to connect to Docker containers and execute modules in them. It essentially wraps ``docker exec`` and ``docker cp``. This connection plugin is supported by the :ref:`ansible.posix.synchronize module <ansible_collections.ansible.posix.synchronize_module>`.
+ The :ansplugin:`community.docker.docker connection plugin <community.docker.docker#connection>` uses the Docker CLI utility to connect to Docker containers and execute modules in them. It essentially wraps ``docker exec`` and ``docker cp``. This connection plugin is supported by the :ansplugin:`ansible.posix.synchronize module <ansible.posix.synchronize#module>`.
docker_api connection plugin
- The :ref:`community.docker.docker_api connection plugin <ansible_collections.community.docker.docker_api_connection>` talks directly to the Docker daemon to connect to Docker containers and execute modules in them.
+ The :ansplugin:`community.docker.docker_api connection plugin <community.docker.docker_api#connection>` talks directly to the Docker daemon to connect to Docker containers and execute modules in them.
docker_containers inventory plugin
- The :ref:`community.docker.docker_containers inventory plugin <ansible_collections.community.docker.docker_containers_inventory>` allows you to dynamically add Docker containers from a Docker Daemon to your Ansible inventory. See :ref:`dynamic_inventory` for details on dynamic inventories.
+ The :ansplugin:`community.docker.docker_containers inventory plugin <community.docker.docker_containers#inventory>` allows you to dynamically add Docker containers from a Docker Daemon to your Ansible inventory. See :ref:`dynamic_inventory` for details on dynamic inventories.
The `docker inventory script <https://github.com/ansible-community/contrib-scripts/blob/main/inventory/docker.py>`_ is deprecated. Please use the inventory plugin instead. The inventory plugin has several compatibility options. If you need to collect Docker containers from multiple Docker daemons, you need to add every Docker daemon as an individual inventory source.
docker_host_info module
- The :ref:`community.docker.docker_host_info module <ansible_collections.community.docker.docker_host_info_module>` allows you to retrieve information on a Docker daemon, such as all containers, images, volumes, networks and so on.
+ The :ansplugin:`community.docker.docker_host_info module <community.docker.docker_host_info#module>` allows you to retrieve information on a Docker daemon, such as all containers, images, volumes, networks and so on.
docker_login module
- The :ref:`community.docker.docker_login module <ansible_collections.community.docker.docker_login_module>` allows you to log in and out of a remote registry, such as Docker Hub or a private registry. It provides similar functionality to the ``docker login`` and ``docker logout`` CLI commands.
+ The :ansplugin:`community.docker.docker_login module <community.docker.docker_login#module>` allows you to log in and out of a remote registry, such as Docker Hub or a private registry. It provides similar functionality to the ``docker login`` and ``docker logout`` CLI commands.
docker_prune module
- The :ref:`community.docker.docker_prune module <ansible_collections.community.docker.docker_prune_module>` allows you to prune no longer needed containers, images, volumes and so on. It provides similar functionality to the ``docker prune`` CLI command.
+ The :ansplugin:`community.docker.docker_prune module <community.docker.docker_prune#module>` allows you to prune no longer needed containers, images, volumes and so on. It provides similar functionality to the ``docker prune`` CLI command.
docker_image module
- The :ref:`community.docker.docker_image module <ansible_collections.community.docker.docker_image_module>` provides full control over images, including: build, pull, push, tag and remove.
+ The :ansplugin:`community.docker.docker_image module <community.docker.docker_image#module>` provides full control over images, including: build, pull, push, tag and remove.
+
+ docker_image_build
+ The :ansplugin:`community.docker.docker_image_build module <community.docker.docker_image_build#module>` allows you to build a Docker image using Docker buildx.
+
+ docker_image_export module
+ The :ansplugin:`community.docker.docker_image_export module <community.docker.docker_image_export#module>` allows you to export (archive) images.
docker_image_info module
- The :ref:`community.docker.docker_image_info module <ansible_collections.community.docker.docker_image_info_module>` allows you to list and inspect images.
+ The :ansplugin:`community.docker.docker_image_info module <community.docker.docker_image_info#module>` allows you to list and inspect images.
+
+ docker_image_load
+ The :ansplugin:`community.docker.docker_image_load module <community.docker.docker_image_load#module>` allows you to import one or multiple images from tarballs.
+
+ docker_image_pull
+ The :ansplugin:`community.docker.docker_image_pull module <community.docker.docker_image_pull#module>` allows you to pull a Docker image from a registry.
+
+ docker_image_push
+ The :ansplugin:`community.docker.docker_image_push module <community.docker.docker_image_push#module>` allows you to push a Docker image to a registry.
+
+ docker_image_remove
+ The :ansplugin:`community.docker.docker_image_remove module <community.docker.docker_image_remove#module>` allows you to remove and/or untag a Docker image from the Docker daemon.
+
+ docker_image_tag
+ The :ansplugin:`community.docker.docker_image_tag module <community.docker.docker_image_tag#module>` allows you to tag a Docker image with additional names and/or tags.
docker_network module
- The :ref:`community.docker.docker_network module <ansible_collections.community.docker.docker_network_module>` provides full control over Docker networks.
+ The :ansplugin:`community.docker.docker_network module <community.docker.docker_network#module>` provides full control over Docker networks.
docker_network_info module
- The :ref:`community.docker.docker_network_info module <ansible_collections.community.docker.docker_network_info_module>` allows you to inspect Docker networks.
+ The :ansplugin:`community.docker.docker_network_info module <community.docker.docker_network_info#module>` allows you to inspect Docker networks.
docker_volume_info module
- The :ref:`community.docker.docker_volume_info module <ansible_collections.community.docker.docker_volume_info_module>` provides full control over Docker volumes.
+ The :ansplugin:`community.docker.docker_volume_info module <community.docker.docker_volume_info#module>` provides full control over Docker volumes.
docker_volume module
- The :ref:`community.docker.docker_volume module <ansible_collections.community.docker.docker_volume_module>` allows you to inspect Docker volumes.
+ The :ansplugin:`community.docker.docker_volume module <community.docker.docker_volume#module>` allows you to inspect Docker volumes.
docker_container module
- The :ref:`community.docker.docker_container module <ansible_collections.community.docker.docker_container_module>` manages the container lifecycle by providing the ability to create, update, stop, start and destroy a Docker container.
+ The :ansplugin:`community.docker.docker_container module <community.docker.docker_container#module>` manages the container lifecycle by providing the ability to create, update, stop, start and destroy a Docker container.
+
+ docker_container_copy_into
+ The :ansplugin:`community.docker.docker_container_copy_into module <community.docker.docker_container_copy_into#module>` allows you to copy files from the control node into a container.
+
+ docker_container_exec
+ The :ansplugin:`community.docker.docker_container_exec module <community.docker.docker_container_exec#module>` allows you to execute commands in a running container.
docker_container_info module
- The :ref:`community.docker.docker_container_info module <ansible_collections.community.docker.docker_container_info_module>` allows you to inspect a Docker container.
+ The :ansplugin:`community.docker.docker_container_info module <community.docker.docker_container_info#module>` allows you to inspect a Docker container.
+
+ docker_plugin
+ The :ansplugin:`community.docker.docker_plugin module <community.docker.docker_plugin#module>` allows you to manage Docker plugins.
Docker Compose
--------------
-The :ref:`community.docker.docker_compose module <ansible_collections.community.docker.docker_compose_module>`
+Docker Compose v2
+.................
+
+There are two modules for working with Docker compose projects:
+
+ community.docker.docker_compose_v2
+ The :ansplugin:`community.docker.docker_compose_v2 module <community.docker.docker_compose_v2#module>` allows you to use your existing Docker compose files to orchestrate containers on a single Docker daemon or on Swarm.
+
+ community.docker.docker_compose_v2_pull
+ The :ansplugin:`community.docker.docker_compose_v2_pull module <community.docker.docker_compose_v2_pull#module>` allows you to pull Docker compose projects.
+
+These modules use the Docker CLI "compose" plugin (``docker compose``), and thus needs access to the Docker CLI tool.
+No further requirements next to to the CLI tool and its Docker Compose plugin are needed.
+
+Docker Compose v1
+.................
+
+The :ansplugin:`community.docker.docker_compose module <community.docker.docker_compose#module>`
allows you to use your existing Docker compose files to orchestrate containers on a single Docker daemon or on Swarm.
-Supports compose versions 1 and 2.
+This module uses the out-dated and End of Life version 1.x of Docker Compose. It should mainly be used for legacy systems
+which still have to use that version of Docker Compose.
-Next to Docker SDK for Python, you need to install `docker-compose <https://github.com/docker/compose>`_ on the remote machines to use the module.
+You need to install the `old Python docker-compose <https://pypi.org/project/docker-compose/>`_ on the remote machines to use the module.
Docker Machine
--------------
-The :ref:`community.docker.docker_machine inventory plugin <ansible_collections.community.docker.docker_machine_inventory>` allows you to dynamically add Docker Machine hosts to your Ansible inventory.
+The :ansplugin:`community.docker.docker_machine inventory plugin <community.docker.docker_machine#inventory>` allows you to dynamically add Docker Machine hosts to your Ansible inventory.
-Docker stack
-------------
+Docker Swarm stack
+------------------
-The :ref:`community.docker.docker_stack module <ansible_collections.community.docker.docker_stack_module>` module allows you to control Docker stacks. Information on stacks can be retrieved by the :ref:`community.docker.docker_stack_info module <ansible_collections.community.docker.docker_stack_info_module>`, and information on stack tasks can be retrieved by the :ref:`community.docker.docker_stack_task_info module <ansible_collections.community.docker.docker_stack_task_info_module>`.
+The :ansplugin:`community.docker.docker_stack module <community.docker.docker_stack#module>` module allows you to control Docker Swarm stacks. Information on Swarm stacks can be retrieved by the :ansplugin:`community.docker.docker_stack_info module <community.docker.docker_stack_info#module>`, and information on Swarm stack tasks can be retrieved by the :ansplugin:`community.docker.docker_stack_task_info module <community.docker.docker_stack_task_info#module>`.
Docker Swarm
@@ -192,19 +303,19 @@ Swarm management
One inventory plugin and several modules are provided to manage Docker Swarms:
docker_swarm inventory plugin
- The :ref:`community.docker.docker_swarm inventory plugin <ansible_collections.community.docker.docker_swarm_inventory>` allows you to dynamically add all Docker Swarm nodes to your Ansible inventory.
+ The :ansplugin:`community.docker.docker_swarm inventory plugin <community.docker.docker_swarm#inventory>` allows you to dynamically add all Docker Swarm nodes to your Ansible inventory.
docker_swarm module
- The :ref:`community.docker.docker_swarm module <ansible_collections.community.docker.docker_swarm_module>` allows you to globally configure Docker Swarm manager nodes to join and leave swarms, and to change the Docker Swarm configuration.
+ The :ansplugin:`community.docker.docker_swarm module <community.docker.docker_swarm#module>` allows you to globally configure Docker Swarm manager nodes to join and leave swarms, and to change the Docker Swarm configuration.
docker_swarm_info module
- The :ref:`community.docker.docker_swarm_info module <ansible_collections.community.docker.docker_swarm_info_module>` allows you to retrieve information on Docker Swarm.
+ The :ansplugin:`community.docker.docker_swarm_info module <community.docker.docker_swarm_info#module>` allows you to retrieve information on Docker Swarm.
docker_node module
- The :ref:`community.docker.docker_node module <ansible_collections.community.docker.docker_node_module>` allows you to manage Docker Swarm nodes.
+ The :ansplugin:`community.docker.docker_node module <community.docker.docker_node#module>` allows you to manage Docker Swarm nodes.
docker_node_info module
- The :ref:`community.docker.docker_node_info module <ansible_collections.community.docker.docker_node_info_module>` allows you to retrieve information on Docker Swarm nodes.
+ The :ansplugin:`community.docker.docker_node_info module <community.docker.docker_node_info#module>` allows you to retrieve information on Docker Swarm nodes.
Configuration management
........................
@@ -212,21 +323,12 @@ Configuration management
The community.docker collection offers modules to manage Docker Swarm configurations and secrets:
docker_config module
- The :ref:`community.docker.docker_config module <ansible_collections.community.docker.docker_config_module>` allows you to create and modify Docker Swarm configs.
+ The :ansplugin:`community.docker.docker_config module <community.docker.docker_config#module>` allows you to create and modify Docker Swarm configs.
docker_secret module
- The :ref:`community.docker.docker_secret module <ansible_collections.community.docker.docker_secret_module>` allows you to create and modify Docker Swarm secrets.
-
+ The :ansplugin:`community.docker.docker_secret module <community.docker.docker_secret#module>` allows you to create and modify Docker Swarm secrets.
Swarm services
..............
-Docker Swarm services can be created and updated with the :ref:`community.docker.docker_swarm_service module <ansible_collections.community.docker.docker_swarm_service_module>`, and information on them can be queried by the :ref:`community.docker.docker_swarm_service_info module <ansible_collections.community.docker.docker_swarm_service_info_module>`.
-
-
-Helpful links
--------------
-
-Still using Dockerfile to build images? Check out `ansible-bender <https://github.com/ansible-community/ansible-bender>`_, and start building images from your Ansible playbooks.
-
-Use `Ansible Operator <https://learn.openshift.com/ansibleop/ansible-operator-overview/>`_ to launch your docker-compose file on `OpenShift <https://www.okd.io/>`_. Go from an app on your laptop to a fully scalable app in the cloud with Kubernetes in just a few moments.
+Docker Swarm services can be created and updated with the :ansplugin:`community.docker.docker_swarm_service module <community.docker.docker_swarm_service#module>`, and information on them can be queried by the :ansplugin:`community.docker.docker_swarm_service_info module <community.docker.docker_swarm_service_info#module>`.
diff --git a/ansible_collections/community/docker/meta/runtime.yml b/ansible_collections/community/docker/meta/runtime.yml
index 7616e6fea..0ddd09fa3 100644
--- a/ansible_collections/community/docker/meta/runtime.yml
+++ b/ansible_collections/community/docker/meta/runtime.yml
@@ -7,6 +7,8 @@ requires_ansible: '>=2.11.0'
action_groups:
docker:
- docker_compose
+ - docker_compose_v2
+ - docker_compose_v2_pull
- docker_config
- docker_container
- docker_container_copy_into
@@ -14,8 +16,14 @@ action_groups:
- docker_container_info
- docker_host_info
- docker_image
+ - docker_image_build
+ - docker_image_export
- docker_image_info
- docker_image_load
+ - docker_image_pull
+ - docker_image_push
+ - docker_image_remove
+ - docker_image_tag
- docker_login
- docker_network
- docker_network_info
@@ -24,6 +32,9 @@ action_groups:
- docker_plugin
- docker_prune
- docker_secret
+ - docker_stack
+ - docker_stack_info
+ - docker_stack_task_info
- docker_swarm
- docker_swarm_info
- docker_swarm_service
diff --git a/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py b/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py
index 372cbd0a3..fed0af00b 100644
--- a/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py
+++ b/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py
@@ -15,7 +15,7 @@ from ansible_collections.community.docker.plugins.module_utils._scramble import
class ActionModule(ActionBase):
- # Set to True when transfering files to the remote
+ # Set to True when transferring files to the remote
TRANSFERS_FILES = False
def run(self, tmp=None, task_vars=None):
diff --git a/ansible_collections/community/docker/plugins/connection/docker.py b/ansible_collections/community/docker/plugins/connection/docker.py
index ba2249299..68247dae2 100644
--- a/ansible_collections/community/docker/plugins/connection/docker.py
+++ b/ansible_collections/community/docker/plugins/connection/docker.py
@@ -20,8 +20,7 @@ description:
- Run commands or put/fetch files to an existing docker container.
- Uses the Docker CLI to execute commands in the container. If you prefer
to directly connect to the Docker daemon, use the
- R(community.docker.docker_api,ansible_collections.community.docker.docker_api_connection)
- connection plugin.
+ P(community.docker.docker_api#connection) connection plugin.
options:
remote_addr:
description:
diff --git a/ansible_collections/community/docker/plugins/connection/docker_api.py b/ansible_collections/community/docker/plugins/connection/docker_api.py
index 24c95f55a..3b99281c3 100644
--- a/ansible_collections/community/docker/plugins/connection/docker_api.py
+++ b/ansible_collections/community/docker/plugins/connection/docker_api.py
@@ -15,8 +15,7 @@ description:
- Run commands or put/fetch files to an existing docker container.
- Uses the L(requests library,https://pypi.org/project/requests/) to interact
directly with the Docker daemon instead of using the Docker CLI. Use the
- R(community.docker.docker,ansible_collections.community.docker.docker_connection)
- connection plugin if you want to use the Docker CLI.
+ P(community.docker.docker#connection) connection plugin if you want to use the Docker CLI.
notes:
- Does B(not work with TCP TLS sockets)! This is caused by the inability to send C(close_notify) without closing the connection
with Python's C(SSLSocket)s. See U(https://github.com/ansible-collections/community.docker/issues/605) for more information.
diff --git a/ansible_collections/community/docker/plugins/connection/nsenter.py b/ansible_collections/community/docker/plugins/connection/nsenter.py
index fff36afbb..f429f8cef 100644
--- a/ansible_collections/community/docker/plugins/connection/nsenter.py
+++ b/ansible_collections/community/docker/plugins/connection/nsenter.py
@@ -128,7 +128,7 @@ class Connection(ConnectionBase):
# This plugin does not support pipelining. This diverges from the behavior of
# the core "local" connection plugin that this one derives from.
if sudoable and self.become and self.become.expect_prompt():
- # Create a pty if sudoable for privlege escalation that needs it.
+ # Create a pty if sudoable for privilege escalation that needs it.
# Falls back to using a standard pipe if this fails, which may
# cause the command to fail in certain situations where we are escalating
# privileges or the command otherwise needs a pty.
diff --git a/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py b/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py
new file mode 100644
index 000000000..4e21f974c
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+
+class ModuleDocFragment(object):
+
+ # Docker doc fragment
+ DOCUMENTATION = r'''
+options:
+ project_src:
+ description:
+ - Path to a directory containing a Compose file
+ (C(compose.yml), C(compose.yaml), C(docker-compose.yml), or C(docker-compose.yaml)).
+ - If O(files) is provided, will look for these files in this directory instead.
+ type: path
+ required: true
+ project_name:
+ description:
+ - Provide a project name. If not provided, the project name is taken from the basename of O(project_src).
+ type: str
+ files:
+ description:
+ - List of Compose file names relative to O(project_src) to be used instead of the main Compose file
+ (C(compose.yml), C(compose.yaml), C(docker-compose.yml), or C(docker-compose.yaml)).
+ - Files are loaded and merged in the order given.
+ type: list
+ elements: path
+ version_added: 3.7.0
+ env_files:
+ description:
+ - By default environment files are loaded from a C(.env) file located directly under the O(project_src) directory.
+ - O(env_files) can be used to specify the path of one or multiple custom environment files instead.
+ - The path is relative to the O(project_src) directory.
+ type: list
+ elements: path
+ profiles:
+ description:
+ - List of profiles to enable when starting services.
+ - Equivalent to C(docker compose --profile).
+ type: list
+ elements: str
+notes:
+ - |-
+ The Docker compose CLI plugin has no stable output format (see for example U(https://github.com/docker/compose/issues/10872)),
+ and for the main operations also no machine friendly output format. The module tries to accomodate this with various
+ version-dependent behavior adjustments and with testing older and newer versions of the Docker compose CLI plugin.
+
+ Currently the module is tested with multiple plugin versions between 2.18.1 and 2.23.3. The exact list of plugin versions
+ will change over time. New releases of the Docker compose CLI plugin can break this module at any time.
+'''
+
+ # The following needs to be kept in sync with the compose_v2 module utils
+ MINIMUM_VERSION = r'''
+options: {}
+requirements:
+ - "Docker CLI with Docker compose plugin 2.18.0 or later"
+'''
diff --git a/ansible_collections/community/docker/plugins/doc_fragments/docker.py b/ansible_collections/community/docker/plugins/doc_fragments/docker.py
index 4c537850e..92989a97b 100644
--- a/ansible_collections/community/docker/plugins/doc_fragments/docker.py
+++ b/ansible_collections/community/docker/plugins/doc_fragments/docker.py
@@ -16,25 +16,27 @@ options:
docker_host:
description:
- The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the
- TCP connection string. For example, C(tcp://192.0.2.23:2376). If TLS is used to encrypt the connection,
+ TCP connection string. For example, V(tcp://192.0.2.23:2376). If TLS is used to encrypt the connection,
the module will automatically replace C(tcp) in the connection URL with C(https).
- - If the value is not specified in the task, the value of environment variable C(DOCKER_HOST) will be used
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_HOST) will be used
instead. If the environment variable is not set, the default value will be used.
type: str
- default: unix://var/run/docker.sock
+ default: unix:///var/run/docker.sock
aliases: [ docker_url ]
tls_hostname:
description:
- When verifying the authenticity of the Docker Host server, provide the expected name of the server.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TLS_HOSTNAME) will
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS_HOSTNAME) will
be used instead. If the environment variable is not set, the default value will be used.
- - Note that this option had a default value C(localhost) in older versions. It was removed in community.docker 3.0.0.
+ - Note that this option had a default value V(localhost) in older versions. It was removed in community.docker 3.0.0.
+ - B(Note:) this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for
+ Python 7.0.0 or newer will lead to an error.
type: str
api_version:
description:
- The version of the Docker API running on the Docker Host.
- Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_API_VERSION) will be
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_API_VERSION) will be
used instead. If the environment variable is not set, the default value will be used.
type: str
default: auto
@@ -42,42 +44,46 @@ options:
timeout:
description:
- The maximum amount of time in seconds to wait on a response from the API.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TIMEOUT) will be used
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TIMEOUT) will be used
instead. If the environment variable is not set, the default value will be used.
type: int
default: 60
- ca_cert:
+ ca_path:
description:
- Use a CA certificate when performing server verification by providing the path to a CA certificate file.
- - If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
- the file C(ca.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(ca.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
+ - This option was called O(ca_cert) and got renamed to O(ca_path) in community.docker 3.6.0. The old name has
+ been added as an alias and can still be used.
type: path
- aliases: [ tls_ca_cert, cacert_path ]
+ aliases: [ ca_cert, tls_ca_cert, cacert_path ]
client_cert:
description:
- Path to the client's TLS certificate file.
- - If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
- the file C(cert.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(cert.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
type: path
aliases: [ tls_client_cert, cert_path ]
client_key:
description:
- Path to the client's TLS key file.
- - If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
- the file C(key.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(key.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
type: path
aliases: [ tls_client_key, key_path ]
ssl_version:
description:
- - Provide a valid SSL version number. Default value determined by ssl.py module.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_SSL_VERSION) will be
+ - Provide a valid SSL version number. Default value determined by L(SSL Python module, https://docs.python.org/3/library/ssl.html).
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_SSL_VERSION) will be
used instead.
+ - B(Note:) this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for
+ Python 7.0.0 or newer will lead to an error.
type: str
tls:
description:
- Secure the connection to the API by using TLS without verifying the authenticity of the Docker host
- server. Note that if I(validate_certs) is set to C(true) as well, it will take precedence.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TLS) will be used
+ server. Note that if O(validate_certs) is set to V(true) as well, it will take precedence.
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS) will be used
instead. If the environment variable is not set, the default value will be used.
type: bool
default: false
@@ -91,7 +97,7 @@ options:
validate_certs:
description:
- Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TLS_VERIFY) will be
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS_VERIFY) will be
used instead. If the environment variable is not set, the default value will be used.
type: bool
default: false
@@ -104,14 +110,14 @@ options:
notes:
- Connect to the Docker daemon by providing parameters with each task or by defining environment variables.
- You can define C(DOCKER_HOST), C(DOCKER_TLS_HOSTNAME), C(DOCKER_API_VERSION), C(DOCKER_CERT_PATH), C(DOCKER_SSL_VERSION),
- C(DOCKER_TLS), C(DOCKER_TLS_VERIFY) and C(DOCKER_TIMEOUT). If you are using docker machine, run the script shipped
+ You can define E(DOCKER_HOST), E(DOCKER_TLS_HOSTNAME), E(DOCKER_API_VERSION), E(DOCKER_CERT_PATH), E(DOCKER_SSL_VERSION),
+ E(DOCKER_TLS), E(DOCKER_TLS_VERIFY) and E(DOCKER_TIMEOUT). If you are using docker machine, run the script shipped
with the product that sets up the environment. It will set these variables for you. See
U(https://docs.docker.com/machine/reference/env/) for more details.
- When connecting to Docker daemon with TLS, you might need to install additional Python packages.
For the Docker SDK for Python, version 2.4 or newer, this can be done by installing C(docker[tls]) with M(ansible.builtin.pip).
- Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions.
- In general, it will use C($HOME/.docker/config.json) if the C(DOCKER_CONFIG) environment variable is not specified,
+ In general, it will use C($HOME/.docker/config.json) if the E(DOCKER_CONFIG) environment variable is not specified,
and use C($DOCKER_CONFIG/config.json) otherwise.
'''
@@ -131,9 +137,11 @@ options:
timeout:
vars:
- name: ansible_docker_timeout
- ca_cert:
+ ca_path:
vars:
- name: ansible_docker_ca_cert
+ - name: ansible_docker_ca_path
+ version_added: 3.6.0
client_cert:
vars:
- name: ansible_docker_client_cert
@@ -189,25 +197,25 @@ options:
docker_host:
description:
- The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the
- TCP connection string. For example, C(tcp://192.0.2.23:2376). If TLS is used to encrypt the connection,
+ TCP connection string. For example, V(tcp://192.0.2.23:2376). If TLS is used to encrypt the connection,
the module will automatically replace C(tcp) in the connection URL with C(https).
- - If the value is not specified in the task, the value of environment variable C(DOCKER_HOST) will be used
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_HOST) will be used
instead. If the environment variable is not set, the default value will be used.
type: str
- default: unix://var/run/docker.sock
+ default: unix:///var/run/docker.sock
aliases: [ docker_url ]
tls_hostname:
description:
- When verifying the authenticity of the Docker Host server, provide the expected name of the server.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TLS_HOSTNAME) will
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS_HOSTNAME) will
be used instead. If the environment variable is not set, the default value will be used.
- - Note that this option had a default value C(localhost) in older versions. It was removed in community.docker 3.0.0.
+ - Note that this option had a default value V(localhost) in older versions. It was removed in community.docker 3.0.0.
type: str
api_version:
description:
- The version of the Docker API running on the Docker Host.
- Defaults to the latest version of the API supported by this collection and the docker daemon.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_API_VERSION) will be
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_API_VERSION) will be
used instead. If the environment variable is not set, the default value will be used.
type: str
default: auto
@@ -215,42 +223,44 @@ options:
timeout:
description:
- The maximum amount of time in seconds to wait on a response from the API.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TIMEOUT) will be used
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TIMEOUT) will be used
instead. If the environment variable is not set, the default value will be used.
type: int
default: 60
- ca_cert:
+ ca_path:
description:
- Use a CA certificate when performing server verification by providing the path to a CA certificate file.
- - If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
- the file C(ca.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(ca.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
+ - This option was called O(ca_cert) and got renamed to O(ca_path) in community.docker 3.6.0. The old name has
+ been added as an alias and can still be used.
type: path
- aliases: [ tls_ca_cert, cacert_path ]
+ aliases: [ ca_cert, tls_ca_cert, cacert_path ]
client_cert:
description:
- Path to the client's TLS certificate file.
- - If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
- the file C(cert.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(cert.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
type: path
aliases: [ tls_client_cert, cert_path ]
client_key:
description:
- Path to the client's TLS key file.
- - If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
- the file C(key.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(key.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
type: path
aliases: [ tls_client_key, key_path ]
ssl_version:
description:
- - Provide a valid SSL version number. Default value determined by ssl.py module.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_SSL_VERSION) will be
+ - Provide a valid SSL version number. Default value determined by L(SSL Python module, https://docs.python.org/3/library/ssl.html).
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_SSL_VERSION) will be
used instead.
type: str
tls:
description:
- Secure the connection to the API by using TLS without verifying the authenticity of the Docker host
- server. Note that if I(validate_certs) is set to C(true) as well, it will take precedence.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TLS) will be used
+ server. Note that if O(validate_certs) is set to V(true) as well, it will take precedence.
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS) will be used
instead. If the environment variable is not set, the default value will be used.
type: bool
default: false
@@ -263,7 +273,7 @@ options:
validate_certs:
description:
- Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TLS_VERIFY) will be
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS_VERIFY) will be
used instead. If the environment variable is not set, the default value will be used.
type: bool
default: false
@@ -276,14 +286,12 @@ options:
notes:
- Connect to the Docker daemon by providing parameters with each task or by defining environment variables.
- You can define C(DOCKER_HOST), C(DOCKER_TLS_HOSTNAME), C(DOCKER_API_VERSION), C(DOCKER_CERT_PATH), C(DOCKER_SSL_VERSION),
- C(DOCKER_TLS), C(DOCKER_TLS_VERIFY) and C(DOCKER_TIMEOUT). If you are using docker machine, run the script shipped
+ You can define E(DOCKER_HOST), E(DOCKER_TLS_HOSTNAME), E(DOCKER_API_VERSION), E(DOCKER_CERT_PATH), E(DOCKER_SSL_VERSION),
+ E(DOCKER_TLS), E(DOCKER_TLS_VERIFY) and E(DOCKER_TIMEOUT). If you are using docker machine, run the script shipped
with the product that sets up the environment. It will set these variables for you. See
U(https://docs.docker.com/machine/reference/env/) for more details.
-# - When connecting to Docker daemon with TLS, you might need to install additional Python packages.
-# For the Docker SDK for Python, version 2.4 or newer, this can be done by installing C(docker[tls]) with M(ansible.builtin.pip).
# - Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions.
-# In general, it will use C($HOME/.docker/config.json) if the C(DOCKER_CONFIG) environment variable is not specified,
+# In general, it will use C($HOME/.docker/config.json) if the E(DOCKER_CONFIG) environment variable is not specified,
# and use C($DOCKER_CONFIG/config.json) otherwise.
- This module does B(not) use the L(Docker SDK for Python,https://docker-py.readthedocs.io/en/stable/) to
communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this
@@ -291,7 +299,96 @@ notes:
requirements:
- requests
- pywin32 (when using named pipes on Windows 32)
- - paramiko (when using SSH with I(use_ssh_client=false))
+ - paramiko (when using SSH with O(use_ssh_client=false))
- pyOpenSSL (when using TLS)
- backports.ssl_match_hostname (when using TLS on Python 2)
'''
+
+ # Docker doc fragment when using the Docker CLI
+ CLI_DOCUMENTATION = r'''
+options:
+ docker_cli:
+ description:
+ - Path to the Docker CLI. If not provided, will search for Docker CLI on the E(PATH).
+ type: path
+ docker_host:
+ description:
+ - The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the
+ TCP connection string. For example, V(tcp://192.0.2.23:2376). If TLS is used to encrypt the connection,
+ the module will automatically replace C(tcp) in the connection URL with C(https).
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_HOST) will be used
+ instead. If the environment variable is not set, the default value will be used.
+ type: str
+ default: unix:///var/run/docker.sock
+ aliases: [ docker_url ]
+ tls_hostname:
+ description:
+ - When verifying the authenticity of the Docker Host server, provide the expected name of the server.
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS_HOSTNAME) will
+ be used instead. If the environment variable is not set, the default value will be used.
+ type: str
+ api_version:
+ description:
+ - The version of the Docker API running on the Docker Host.
+ - Defaults to the latest version of the API supported by this collection and the docker daemon.
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_API_VERSION) will be
+ used instead. If the environment variable is not set, the default value will be used.
+ type: str
+ default: auto
+ aliases: [ docker_api_version ]
+ ca_path:
+ description:
+ - Use a CA certificate when performing server verification by providing the path to a CA certificate file.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(ca.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
+ type: path
+ aliases: [ ca_cert, tls_ca_cert, cacert_path ]
+ client_cert:
+ description:
+ - Path to the client's TLS certificate file.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(cert.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
+ type: path
+ aliases: [ tls_client_cert, cert_path ]
+ client_key:
+ description:
+ - Path to the client's TLS key file.
+ - If the value is not specified in the task and the environment variable E(DOCKER_CERT_PATH) is set,
+ the file C(key.pem) from the directory specified in the environment variable E(DOCKER_CERT_PATH) will be used.
+ type: path
+ aliases: [ tls_client_key, key_path ]
+ tls:
+ description:
+ - Secure the connection to the API by using TLS without verifying the authenticity of the Docker host
+ server. Note that if O(validate_certs) is set to V(true) as well, it will take precedence.
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS) will be used
+ instead. If the environment variable is not set, the default value will be used.
+ type: bool
+ default: false
+ validate_certs:
+ description:
+ - Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TLS_VERIFY) will be
+ used instead. If the environment variable is not set, the default value will be used.
+ type: bool
+ default: false
+ aliases: [ tls_verify ]
+ # debug:
+ # description:
+ # - Debug mode
+ # type: bool
+ # default: false
+ cli_context:
+ description:
+ - The Docker CLI context to use.
+ type: str
+
+notes:
+ - Connect to the Docker daemon by providing parameters with each task or by defining environment variables.
+ You can define E(DOCKER_HOST), E(DOCKER_TLS_HOSTNAME), E(DOCKER_API_VERSION), E(DOCKER_CERT_PATH),
+ E(DOCKER_TLS), E(DOCKER_TLS_VERIFY) and E(DOCKER_TIMEOUT). If you are using docker machine, run the script shipped
+ with the product that sets up the environment. It will set these variables for you. See
+ U(https://docs.docker.com/machine/reference/env/) for more details.
+ - This module does B(not) use the L(Docker SDK for Python,https://docker-py.readthedocs.io/en/stable/) to
+ communicate with the Docker daemon. It directly calls the Docker CLI program.
+'''
diff --git a/ansible_collections/community/docker/plugins/inventory/docker_containers.py b/ansible_collections/community/docker/plugins/inventory/docker_containers.py
index a82cda955..75b49ff92 100644
--- a/ansible_collections/community/docker/plugins/inventory/docker_containers.py
+++ b/ansible_collections/community/docker/plugins/inventory/docker_containers.py
@@ -21,13 +21,14 @@ author:
extends_documentation_fragment:
- ansible.builtin.constructed
- community.docker.docker.api_documentation
+ - community.library_inventory_filtering_v1.inventory_filter
description:
- Reads inventories from the Docker API.
- Uses a YAML configuration file that ends with C(docker.[yml|yaml]).
options:
plugin:
description:
- - The name of this plugin, it should always be set to C(community.docker.docker_containers)
+ - The name of this plugin, it should always be set to V(community.docker.docker_containers)
for this plugin to recognize it as it's own.
type: str
required: true
@@ -36,17 +37,14 @@ options:
connection_type:
description:
- Which connection type to use the containers.
- - One way to connect to containers is to use SSH (C(ssh)). For this, the options I(default_ip) and
- I(private_ssh_port) are used. This requires that a SSH daemon is running inside the containers.
- - Alternatively, C(docker-cli) selects the
- R(docker connection plugin,ansible_collections.community.docker.docker_connection),
- and C(docker-api) (default) selects the
- R(docker_api connection plugin,ansible_collections.community.docker.docker_api_connection).
- - When C(docker-api) is used, all Docker daemon configuration values are passed from the inventory plugin
- to the connection plugin. This can be controlled with I(configure_docker_daemon).
- - Note that the R(docker_api connection plugin,ansible_collections.community.docker.docker_api_connection)
- does B(not work with TCP TLS sockets)! See U(https://github.com/ansible-collections/community.docker/issues/605)
- for more information.
+ - One way to connect to containers is to use SSH (V(ssh)). For this, the options O(default_ip) and
+ O(private_ssh_port) are used. This requires that a SSH daemon is running inside the containers.
+ - Alternatively, V(docker-cli) selects the P(community.docker.docker#connection) connection plugin,
+ and V(docker-api) (default) selects the P(community.docker.docker_api#connection) connection plugin.
+ - When V(docker-api) is used, all Docker daemon configuration values are passed from the inventory plugin
+ to the connection plugin. This can be controlled with O(configure_docker_daemon).
+ - Note that the P(community.docker.docker_api#connection) does B(not work with TCP TLS sockets)!
+ See U(https://github.com/ansible-collections/community.docker/issues/605) for more information.
type: str
default: docker-api
choices:
@@ -57,7 +55,7 @@ options:
configure_docker_daemon:
description:
- Whether to pass all Docker daemon configuration from the inventory plugin to the connection plugin.
- - Only used when I(connection_type=docker-api).
+ - Only used when O(connection_type=docker-api).
type: bool
default: true
version_added: 1.8.0
@@ -67,8 +65,8 @@ options:
- Toggle to (not) include all available inspection metadata.
- Note that all top-level keys will be transformed to the format C(docker_xxx).
For example, C(HostConfig) is converted to C(docker_hostconfig).
- - If this is C(false), these values can only be used during I(constructed), I(groups), and I(keyed_groups).
- - The C(docker) inventory script always added these variables, so for compatibility set this to C(true).
+ - If this is V(false), these values can only be used during O(compose), O(groups), and O(keyed_groups).
+ - The C(docker) inventory script always added these variables, so for compatibility set this to V(true).
type: bool
default: false
@@ -76,14 +74,14 @@ options:
description:
- The IP address to assign to ansible_host when the container's SSH port is mapped to interface
'0.0.0.0'.
- - Only used if I(connection_type) is C(ssh).
+ - Only used if O(connection_type) is V(ssh).
type: str
default: 127.0.0.1
private_ssh_port:
description:
- The port containers use for SSH.
- - Only used if I(connection_type) is C(ssh).
+ - Only used if O(connection_type) is V(ssh).
type: int
default: 22
@@ -96,20 +94,23 @@ options:
- "C(image_<image name>): contains the containers that have the image C(<image name>)."
- "C(stack_<stack name>): contains the containers that belong to the stack C(<stack name>)."
- "C(service_<service name>): contains the containers that belong to the service C(<service name>)"
- - "C(<docker_host>): contains the containers which belong to the Docker daemon I(docker_host).
+ - "C(<docker_host>): contains the containers which belong to the Docker daemon O(docker_host).
Useful if you run this plugin against multiple Docker daemons."
- "C(running): contains all containers that are running."
- "C(stopped): contains all containers that are not running."
- - If this is not set to C(true), you should use keyed groups to add the containers to groups.
+ - If this is not set to V(true), you should use keyed groups to add the containers to groups.
See the examples for how to do that.
type: bool
default: false
+
+ filters:
+ version_added: 3.5.0
'''
EXAMPLES = '''
# Minimal example using local Docker daemon
plugin: community.docker.docker_containers
-docker_host: unix://var/run/docker.sock
+docker_host: unix:///var/run/docker.sock
# Minimal example using remote Docker daemon
plugin: community.docker.docker_containers
@@ -124,7 +125,7 @@ tls: true
plugin: community.docker.docker_containers
docker_host: tcp://my-docker-host:2376
validate_certs: true
-ca_cert: /somewhere/ca.pem
+ca_path: /somewhere/ca.pem
client_key: /somewhere/key.pem
client_cert: /somewhere/cert.pem
@@ -147,6 +148,18 @@ connection_type: ssh
compose:
ansible_ssh_host: ansible_ssh_host | default(docker_name[1:], true)
ansible_ssh_port: ansible_ssh_port | default(22, true)
+
+# Only consider containers which have a label 'foo', or whose name starts with 'a'
+plugin: community.docker.docker_containers
+filters:
+ # Accept all containers which have a label called 'foo'
+ - include: >-
+ "foo" in docker_config.Labels
+ # Next accept all containers whose inventory_hostname starts with 'a'
+ - include: >-
+ inventory_hostname.startswith("a")
+ # Exclude all containers that didn't match any of the above filters
+ - exclude: true
'''
import re
@@ -154,6 +167,7 @@ import re
from ansible.errors import AnsibleError
from ansible.module_utils.common.text.converters import to_native
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
+from ansible.utils.unsafe_proxy import wrap_var as make_unsafe
from ansible_collections.community.docker.plugins.module_utils.common_api import (
RequestException,
@@ -166,6 +180,7 @@ from ansible_collections.community.docker.plugins.plugin_utils.common_api import
)
from ansible_collections.community.docker.plugins.module_utils._api.errors import APIError, DockerException
+from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import parse_filters, filter_host
MIN_DOCKER_API = None
@@ -212,6 +227,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
if value is not None:
extra_facts[var_name] = value
+ filters = parse_filters(self.get_option('filters'))
for container in containers:
id = container.get('Id')
short_id = id[:13]
@@ -223,10 +239,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
name = short_id
full_name = id
- self.inventory.add_host(name)
facts = dict(
- docker_name=name,
- docker_short_id=short_id
+ docker_name=make_unsafe(name),
+ docker_short_id=make_unsafe(short_id),
)
full_facts = dict()
@@ -241,26 +256,26 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
running = state.get('Running')
+ groups = []
+
# Add container to groups
image_name = config.get('Image')
if image_name and add_legacy_groups:
- self.inventory.add_group('image_{0}'.format(image_name))
- self.inventory.add_host(name, group='image_{0}'.format(image_name))
+ groups.append('image_{0}'.format(image_name))
stack_name = labels.get('com.docker.stack.namespace')
if stack_name:
full_facts['docker_stack'] = stack_name
if add_legacy_groups:
- self.inventory.add_group('stack_{0}'.format(stack_name))
- self.inventory.add_host(name, group='stack_{0}'.format(stack_name))
+ groups.append('stack_{0}'.format(stack_name))
service_name = labels.get('com.docker.swarm.service.name')
if service_name:
full_facts['docker_service'] = service_name
if add_legacy_groups:
- self.inventory.add_group('service_{0}'.format(service_name))
- self.inventory.add_host(name, group='service_{0}'.format(service_name))
+ groups.append('service_{0}'.format(service_name))
+ ansible_connection = None
if connection_type == 'ssh':
# Figure out ssh IP and Port
try:
@@ -283,23 +298,38 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
elif connection_type == 'docker-cli':
facts.update(dict(
ansible_host=full_name,
- ansible_connection='community.docker.docker',
))
+ ansible_connection = 'community.docker.docker'
elif connection_type == 'docker-api':
facts.update(dict(
ansible_host=full_name,
- ansible_connection='community.docker.docker_api',
))
facts.update(extra_facts)
+ ansible_connection = 'community.docker.docker_api'
full_facts.update(facts)
for key, value in inspect.items():
fact_key = self._slugify(key)
full_facts[fact_key] = value
+ full_facts = make_unsafe(full_facts)
+
+ if ansible_connection:
+ for d in (facts, full_facts):
+ if 'ansible_connection' not in d:
+ d['ansible_connection'] = ansible_connection
+
+ if not filter_host(self, name, full_facts, filters):
+ continue
+
if verbose_output:
facts.update(full_facts)
+ self.inventory.add_host(name)
+ for group in groups:
+ self.inventory.add_group(group)
+ self.inventory.add_host(name, group=group)
+
for key, value in facts.items():
self.inventory.set_variable(name, key, value)
diff --git a/ansible_collections/community/docker/plugins/inventory/docker_machine.py b/ansible_collections/community/docker/plugins/inventory/docker_machine.py
index 69d946100..e3330a339 100644
--- a/ansible_collections/community/docker/plugins/inventory/docker_machine.py
+++ b/ansible_collections/community/docker/plugins/inventory/docker_machine.py
@@ -13,12 +13,13 @@ DOCUMENTATION = '''
requirements:
- L(Docker Machine,https://docs.docker.com/machine/)
extends_documentation_fragment:
- - constructed
+ - ansible.builtin.constructed
+ - community.library_inventory_filtering_v1.inventory_filter
description:
- Get inventory hosts from Docker Machine.
- Uses a YAML configuration file that ends with docker_machine.(yml|yaml).
- The plugin sets standard host variables C(ansible_host), C(ansible_port), C(ansible_user) and C(ansible_ssh_private_key).
- - The plugin stores the Docker Machine 'env' output variables in I(dm_) prefixed host variables.
+ - The plugin stores the Docker Machine 'env' output variables in C(dm_) prefixed host variables.
options:
plugin:
@@ -28,12 +29,12 @@ DOCUMENTATION = '''
daemon_env:
description:
- Whether docker daemon connection environment variables should be fetched, and how to behave if they cannot be fetched.
- - With C(require) and C(require-silently), fetch them and skip any host for which they cannot be fetched.
- A warning will be issued for any skipped host if the choice is C(require).
- - With C(optional) and C(optional-silently), fetch them and not skip hosts for which they cannot be fetched.
- A warning will be issued for hosts where they cannot be fetched if the choice is C(optional).
- - With C(skip), do not attempt to fetch the docker daemon connection environment variables.
- - If fetched successfully, the variables will be prefixed with I(dm_) and stored as host variables.
+ - With V(require) and V(require-silently), fetch them and skip any host for which they cannot be fetched.
+ A warning will be issued for any skipped host if the choice is V(require).
+ - With V(optional) and V(optional-silently), fetch them and not skip hosts for which they cannot be fetched.
+ A warning will be issued for hosts where they cannot be fetched if the choice is V(optional).
+ - With V(skip), do not attempt to fetch the docker daemon connection environment variables.
+ - If fetched successfully, the variables will be prefixed with C(dm_) and stored as host variables.
type: str
choices:
- require
@@ -44,15 +45,17 @@ DOCUMENTATION = '''
default: require
running_required:
description:
- - When C(true), hosts which Docker Machine indicates are in a state other than C(running) will be skipped.
+ - When V(true), hosts which Docker Machine indicates are in a state other than C(running) will be skipped.
type: bool
default: true
verbose_output:
description:
- - When C(true), include all available nodes metadata (for exmaple C(Image), C(Region), C(Size)) as a JSON object
+ - When V(true), include all available nodes metadata (for example C(Image), C(Region), C(Size)) as a JSON object
named C(docker_machine_node_attributes).
type: bool
default: true
+ filters:
+ version_added: 3.5.0
'''
EXAMPLES = '''
@@ -93,6 +96,9 @@ from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.common.process import get_bin_path
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
from ansible.utils.display import Display
+from ansible.utils.unsafe_proxy import wrap_var as make_unsafe
+
+from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import parse_filters, filter_host
import json
import re
@@ -173,7 +179,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
def _inspect_docker_machine_host(self, node):
try:
- inspect_lines = self._run_command(['inspect', self.node])
+ inspect_lines = self._run_command(['inspect', node])
except subprocess.CalledProcessError:
return None
@@ -181,7 +187,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
def _ip_addr_docker_machine_host(self, node):
try:
- ip_addr = self._run_command(['ip', self.node])
+ ip_addr = self._run_command(['ip', node])
except subprocess.CalledProcessError:
return None
@@ -201,13 +207,18 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
def _populate(self):
daemon_env = self.get_option('daemon_env')
+ filters = parse_filters(self.get_option('filters'))
try:
- for self.node in self._get_machine_names():
- self.node_attrs = self._inspect_docker_machine_host(self.node)
- if not self.node_attrs:
+ for node in self._get_machine_names():
+ node_attrs = self._inspect_docker_machine_host(node)
+ if not node_attrs:
continue
- machine_name = self.node_attrs['Driver']['MachineName']
+ unsafe_node_attrs = make_unsafe(node_attrs)
+
+ machine_name = unsafe_node_attrs['Driver']['MachineName']
+ if not filter_host(self, machine_name, unsafe_node_attrs, filters):
+ continue
# query `docker-machine env` to obtain remote Docker daemon connection settings in the form of commands
# that could be used to set environment variables to influence a local Docker client:
@@ -224,40 +235,40 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
# check for valid ip address from inspect output, else explicitly use ip command to find host ip address
# this works around an issue seen with Google Compute Platform where the IP address was not available
# via the 'inspect' subcommand but was via the 'ip' subcomannd.
- if self.node_attrs['Driver']['IPAddress']:
- ip_addr = self.node_attrs['Driver']['IPAddress']
+ if unsafe_node_attrs['Driver']['IPAddress']:
+ ip_addr = unsafe_node_attrs['Driver']['IPAddress']
else:
- ip_addr = self._ip_addr_docker_machine_host(self.node)
+ ip_addr = self._ip_addr_docker_machine_host(node)
# set standard Ansible remote host connection settings to details captured from `docker-machine`
# see: https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
- self.inventory.set_variable(machine_name, 'ansible_host', ip_addr)
- self.inventory.set_variable(machine_name, 'ansible_port', self.node_attrs['Driver']['SSHPort'])
- self.inventory.set_variable(machine_name, 'ansible_user', self.node_attrs['Driver']['SSHUser'])
- self.inventory.set_variable(machine_name, 'ansible_ssh_private_key_file', self.node_attrs['Driver']['SSHKeyPath'])
+ self.inventory.set_variable(machine_name, 'ansible_host', make_unsafe(ip_addr))
+ self.inventory.set_variable(machine_name, 'ansible_port', unsafe_node_attrs['Driver']['SSHPort'])
+ self.inventory.set_variable(machine_name, 'ansible_user', unsafe_node_attrs['Driver']['SSHUser'])
+ self.inventory.set_variable(machine_name, 'ansible_ssh_private_key_file', unsafe_node_attrs['Driver']['SSHKeyPath'])
# set variables based on Docker Machine tags
- tags = self.node_attrs['Driver'].get('Tags') or ''
- self.inventory.set_variable(machine_name, 'dm_tags', tags)
+ tags = unsafe_node_attrs['Driver'].get('Tags') or ''
+ self.inventory.set_variable(machine_name, 'dm_tags', make_unsafe(tags))
# set variables based on Docker Machine env variables
for kv in env_var_tuples:
- self.inventory.set_variable(machine_name, 'dm_{0}'.format(kv[0]), kv[1])
+ self.inventory.set_variable(machine_name, 'dm_{0}'.format(kv[0]), make_unsafe(kv[1]))
if self.get_option('verbose_output'):
- self.inventory.set_variable(machine_name, 'docker_machine_node_attributes', self.node_attrs)
+ self.inventory.set_variable(machine_name, 'docker_machine_node_attributes', unsafe_node_attrs)
# Use constructed if applicable
strict = self.get_option('strict')
# Composed variables
- self._set_composite_vars(self.get_option('compose'), self.node_attrs, machine_name, strict=strict)
+ self._set_composite_vars(self.get_option('compose'), unsafe_node_attrs, machine_name, strict=strict)
# Complex groups based on jinja2 conditionals, hosts that meet the conditional are added to group
- self._add_host_to_composed_groups(self.get_option('groups'), self.node_attrs, machine_name, strict=strict)
+ self._add_host_to_composed_groups(self.get_option('groups'), unsafe_node_attrs, machine_name, strict=strict)
# Create groups based on variable values and add the corresponding hosts to it
- self._add_host_to_keyed_groups(self.get_option('keyed_groups'), self.node_attrs, machine_name, strict=strict)
+ self._add_host_to_keyed_groups(self.get_option('keyed_groups'), unsafe_node_attrs, machine_name, strict=strict)
except Exception as e:
raise AnsibleError('Unable to fetch hosts from Docker Machine, this was the original exception: %s' %
diff --git a/ansible_collections/community/docker/plugins/inventory/docker_swarm.py b/ansible_collections/community/docker/plugins/inventory/docker_swarm.py
index ebb1da15c..0d60033f9 100644
--- a/ansible_collections/community/docker/plugins/inventory/docker_swarm.py
+++ b/ansible_collections/community/docker/plugins/inventory/docker_swarm.py
@@ -17,16 +17,17 @@ DOCUMENTATION = '''
- python >= 2.7
- L(Docker SDK for Python,https://docker-py.readthedocs.io/en/stable/) >= 1.10.0
extends_documentation_fragment:
- - constructed
+ - ansible.builtin.constructed
+ - community.library_inventory_filtering_v1.inventory_filter
description:
- Reads inventories from the Docker swarm API.
- Uses a YAML configuration file docker_swarm.[yml|yaml].
- - "The plugin returns following groups of swarm nodes: I(all) - all hosts; I(workers) - all worker nodes;
- I(managers) - all manager nodes; I(leader) - the swarm leader node;
- I(nonleaders) - all nodes except the swarm leader."
+ - "The plugin returns following groups of swarm nodes: C(all) - all hosts; C(workers) - all worker nodes;
+ C(managers) - all manager nodes; C(leader) - the swarm leader node;
+ C(nonleaders) - all nodes except the swarm leader."
options:
plugin:
- description: The name of this plugin, it should always be set to C(community.docker.docker_swarm)
+ description: The name of this plugin, it should always be set to V(community.docker.docker_swarm)
for this plugin to recognize it as it's own.
type: str
required: true
@@ -34,13 +35,13 @@ DOCUMENTATION = '''
docker_host:
description:
- Socket of a Docker swarm manager node (C(tcp), C(unix)).
- - "Use C(unix://var/run/docker.sock) to connect via local socket."
+ - "Use V(unix:///var/run/docker.sock) to connect via local socket."
type: str
required: true
aliases: [ docker_url ]
verbose_output:
description: Toggle to (not) include all available nodes metadata (for example C(Platform), C(Architecture), C(OS),
- C(EngineVersion))
+ C(EngineVersion)).
type: bool
default: true
tls:
@@ -57,11 +58,13 @@ DOCUMENTATION = '''
description: Path to the client's TLS key file.
type: path
aliases: [ tls_client_key, key_path ]
- ca_cert:
- description: Use a CA certificate when performing server verification by providing the path to a CA
- certificate file.
+ ca_path:
+ description:
+ - Use a CA certificate when performing server verification by providing the path to a CA certificate file.
+ - This option was called O(ca_cert) and got renamed to O(ca_path) in community.docker 3.6.0. The old name has
+ been added as an alias and can still be used.
type: path
- aliases: [ tls_ca_cert, cacert_path ]
+ aliases: [ ca_cert, tls_ca_cert, cacert_path ]
client_cert:
description: Path to the client's TLS certificate file.
type: path
@@ -71,7 +74,9 @@ DOCUMENTATION = '''
the server.
type: str
ssl_version:
- description: Provide a valid SSL version number. Default value determined by ssl.py module.
+ description:
+ - Provide a valid SSL version number. Default value determined
+ by L(SSL Python module, https://docs.python.org/3/library/ssl.html).
type: str
api_version:
description:
@@ -82,7 +87,7 @@ DOCUMENTATION = '''
timeout:
description:
- The maximum amount of time in seconds to wait on a response from the API.
- - If the value is not specified in the task, the value of environment variable C(DOCKER_TIMEOUT)
+ - If the value is not specified in the task, the value of environment variable E(DOCKER_TIMEOUT).
will be used instead. If the environment variable is not set, the default value will be used.
type: int
default: 60
@@ -96,20 +101,22 @@ DOCUMENTATION = '''
version_added: 1.5.0
include_host_uri:
description: Toggle to return the additional attribute C(ansible_host_uri) which contains the URI of the
- swarm leader in format of C(tcp://172.16.0.1:2376). This value may be used without additional
- modification as value of option I(docker_host) in Docker Swarm modules when connecting via API.
- The port always defaults to C(2376).
+ swarm leader in format of V(tcp://172.16.0.1:2376). This value may be used without additional
+ modification as value of option O(docker_host) in Docker Swarm modules when connecting via API.
+ The port always defaults to V(2376).
type: bool
default: false
include_host_uri_port:
- description: Override the detected port number included in I(ansible_host_uri)
+ description: Override the detected port number included in C(ansible_host_uri).
type: int
+ filters:
+ version_added: 3.5.0
'''
EXAMPLES = '''
# Minimal example using local docker
plugin: community.docker.docker_swarm
-docker_host: unix://var/run/docker.sock
+docker_host: unix:///var/run/docker.sock
# Minimal example using remote docker
plugin: community.docker.docker_swarm
@@ -124,7 +131,7 @@ tls: true
plugin: community.docker.docker_swarm
docker_host: tcp://my-docker-host:2376
validate_certs: true
-ca_cert: /somewhere/ca.pem
+ca_path: /somewhere/ca.pem
client_key: /somewhere/key.pem
client_cert: /somewhere/cert.pem
@@ -152,6 +159,9 @@ from ansible_collections.community.docker.plugins.module_utils.common import get
from ansible_collections.community.docker.plugins.module_utils.util import update_tls_hostname
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
from ansible.parsing.utils.addresses import parse_address
+from ansible.utils.unsafe_proxy import wrap_var as make_unsafe
+
+from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import parse_filters, filter_host
try:
import docker
@@ -174,7 +184,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
tls=self.get_option('tls'),
tls_verify=self.get_option('validate_certs'),
key_path=self.get_option('client_key'),
- cacert_path=self.get_option('ca_cert'),
+ cacert_path=self.get_option('ca_path'),
cert_path=self.get_option('client_cert'),
tls_hostname=self.get_option('tls_hostname'),
api_version=self.get_option('api_version'),
@@ -192,6 +202,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
self.inventory.add_group('leader')
self.inventory.add_group('nonleaders')
+ filters = parse_filters(self.get_option('filters'))
+
if self.get_option('include_host_uri'):
if self.get_option('include_host_uri_port'):
host_uri_port = str(self.get_option('include_host_uri_port'))
@@ -202,48 +214,51 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
try:
self.nodes = self.client.nodes.list()
- for self.node in self.nodes:
- self.node_attrs = self.client.nodes.get(self.node.id).attrs
- self.inventory.add_host(self.node_attrs['ID'])
- self.inventory.add_host(self.node_attrs['ID'], group=self.node_attrs['Spec']['Role'])
- self.inventory.set_variable(self.node_attrs['ID'], 'ansible_host',
- self.node_attrs['Status']['Addr'])
+ for node in self.nodes:
+ node_attrs = self.client.nodes.get(node.id).attrs
+ unsafe_node_attrs = make_unsafe(node_attrs)
+ if not filter_host(self, unsafe_node_attrs['ID'], unsafe_node_attrs, filters):
+ continue
+ self.inventory.add_host(unsafe_node_attrs['ID'])
+ self.inventory.add_host(unsafe_node_attrs['ID'], group=unsafe_node_attrs['Spec']['Role'])
+ self.inventory.set_variable(unsafe_node_attrs['ID'], 'ansible_host',
+ unsafe_node_attrs['Status']['Addr'])
if self.get_option('include_host_uri'):
- self.inventory.set_variable(self.node_attrs['ID'], 'ansible_host_uri',
- 'tcp://' + self.node_attrs['Status']['Addr'] + ':' + host_uri_port)
+ self.inventory.set_variable(unsafe_node_attrs['ID'], 'ansible_host_uri',
+ make_unsafe('tcp://' + unsafe_node_attrs['Status']['Addr'] + ':' + host_uri_port))
if self.get_option('verbose_output'):
- self.inventory.set_variable(self.node_attrs['ID'], 'docker_swarm_node_attributes', self.node_attrs)
- if 'ManagerStatus' in self.node_attrs:
- if self.node_attrs['ManagerStatus'].get('Leader'):
+ self.inventory.set_variable(unsafe_node_attrs['ID'], 'docker_swarm_node_attributes', unsafe_node_attrs)
+ if 'ManagerStatus' in unsafe_node_attrs:
+ if unsafe_node_attrs['ManagerStatus'].get('Leader'):
# This is workaround of bug in Docker when in some cases the Leader IP is 0.0.0.0
# Check moby/moby#35437 for details
- swarm_leader_ip = parse_address(self.node_attrs['ManagerStatus']['Addr'])[0] or \
- self.node_attrs['Status']['Addr']
+ swarm_leader_ip = parse_address(node_attrs['ManagerStatus']['Addr'])[0] or \
+ unsafe_node_attrs['Status']['Addr']
if self.get_option('include_host_uri'):
- self.inventory.set_variable(self.node_attrs['ID'], 'ansible_host_uri',
- 'tcp://' + swarm_leader_ip + ':' + host_uri_port)
- self.inventory.set_variable(self.node_attrs['ID'], 'ansible_host', swarm_leader_ip)
- self.inventory.add_host(self.node_attrs['ID'], group='leader')
+ self.inventory.set_variable(unsafe_node_attrs['ID'], 'ansible_host_uri',
+ make_unsafe('tcp://' + swarm_leader_ip + ':' + host_uri_port))
+ self.inventory.set_variable(unsafe_node_attrs['ID'], 'ansible_host', make_unsafe(swarm_leader_ip))
+ self.inventory.add_host(unsafe_node_attrs['ID'], group='leader')
else:
- self.inventory.add_host(self.node_attrs['ID'], group='nonleaders')
+ self.inventory.add_host(unsafe_node_attrs['ID'], group='nonleaders')
else:
- self.inventory.add_host(self.node_attrs['ID'], group='nonleaders')
+ self.inventory.add_host(unsafe_node_attrs['ID'], group='nonleaders')
# Use constructed if applicable
strict = self.get_option('strict')
# Composed variables
self._set_composite_vars(self.get_option('compose'),
- self.node_attrs,
- self.node_attrs['ID'],
+ unsafe_node_attrs,
+ unsafe_node_attrs['ID'],
strict=strict)
# Complex groups based on jinja2 conditionals, hosts that meet the conditional are added to group
self._add_host_to_composed_groups(self.get_option('groups'),
- self.node_attrs,
- self.node_attrs['ID'],
+ unsafe_node_attrs,
+ unsafe_node_attrs['ID'],
strict=strict)
# Create groups based on variable values and add the corresponding hosts to it
self._add_host_to_keyed_groups(self.get_option('keyed_groups'),
- self.node_attrs,
- self.node_attrs['ID'],
+ unsafe_node_attrs,
+ unsafe_node_attrs['ID'],
strict=strict)
except Exception as e:
raise AnsibleError('Unable to fetch hosts from Docker swarm API, this was the original exception: %s' %
diff --git a/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py b/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py
index d9ec5870d..44f17924f 100644
--- a/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py
+++ b/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py
@@ -455,7 +455,7 @@ class APIClient(
return self._get_result_tty(stream, res, self._check_is_tty(container))
def _get_result_tty(self, stream, res, is_tty):
- # We should also use raw streaming (without keep-alives)
+ # We should also use raw streaming (without keep-alive)
# if we're dealing with a tty-enabled container.
if is_tty:
return self._stream_raw_result(res) if stream else \
diff --git a/ansible_collections/community/docker/plugins/module_utils/_api/errors.py b/ansible_collections/community/docker/plugins/module_utils/_api/errors.py
index 90dd5aada..47c284d39 100644
--- a/ansible_collections/community/docker/plugins/module_utils/_api/errors.py
+++ b/ansible_collections/community/docker/plugins/module_utils/_api/errors.py
@@ -12,6 +12,7 @@ __metaclass__ = type
from ._import_helper import HTTPError as _HTTPError
+from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.six import raise_from
@@ -32,7 +33,7 @@ def create_api_error_from_http_exception(e):
try:
explanation = response.json()['message']
except ValueError:
- explanation = (response.content or '').strip()
+ explanation = to_native((response.content or '').strip())
cls = APIError
if response.status_code == 404:
if explanation and ('No such image' in str(explanation) or
diff --git a/ansible_collections/community/docker/plugins/module_utils/_api/tls.py b/ansible_collections/community/docker/plugins/module_utils/_api/tls.py
index ed5416d82..b1e284a5d 100644
--- a/ansible_collections/community/docker/plugins/module_utils/_api/tls.py
+++ b/ansible_collections/community/docker/plugins/module_utils/_api/tls.py
@@ -39,8 +39,7 @@ class TLSConfig(object):
ssl_version = None
def __init__(self, client_cert=None, ca_cert=None, verify=None,
- ssl_version=None, assert_hostname=None,
- assert_fingerprint=None):
+ ssl_version=None, assert_hostname=None):
# Argument compatibility/mapping with
# https://docs.docker.com/engine/articles/https/
# This diverges from the Docker CLI in that users can specify 'tls'
@@ -48,7 +47,6 @@ class TLSConfig(object):
# leaving verify=False
self.assert_hostname = assert_hostname
- self.assert_fingerprint = assert_fingerprint
# If the user provides an SSL version, we should use their preference
if ssl_version:
@@ -118,5 +116,4 @@ class TLSConfig(object):
client.mount('https://', SSLHTTPAdapter(
ssl_version=self.ssl_version,
assert_hostname=self.assert_hostname,
- assert_fingerprint=self.assert_fingerprint,
))
diff --git a/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py b/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py
index e1b5ce020..ed9250d6a 100644
--- a/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py
+++ b/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py
@@ -27,15 +27,11 @@ PoolManager = urllib3.poolmanager.PoolManager
class SSLHTTPAdapter(BaseHTTPAdapter):
'''An HTTPS Transport Adapter that uses an arbitrary SSL version.'''
- __attrs__ = HTTPAdapter.__attrs__ + ['assert_fingerprint',
- 'assert_hostname',
- 'ssl_version']
+ __attrs__ = HTTPAdapter.__attrs__ + ['assert_hostname', 'ssl_version']
- def __init__(self, ssl_version=None, assert_hostname=None,
- assert_fingerprint=None, **kwargs):
+ def __init__(self, ssl_version=None, assert_hostname=None, **kwargs):
self.ssl_version = ssl_version
self.assert_hostname = assert_hostname
- self.assert_fingerprint = assert_fingerprint
super(SSLHTTPAdapter, self).__init__(**kwargs)
def init_poolmanager(self, connections, maxsize, block=False):
@@ -43,9 +39,9 @@ class SSLHTTPAdapter(BaseHTTPAdapter):
'num_pools': connections,
'maxsize': maxsize,
'block': block,
- 'assert_hostname': self.assert_hostname,
- 'assert_fingerprint': self.assert_fingerprint,
}
+ if self.assert_hostname is not None:
+ kwargs['assert_hostname'] = self.assert_hostname
if self.ssl_version and self.can_override_ssl_version():
kwargs['ssl_version'] = self.ssl_version
@@ -60,7 +56,7 @@ class SSLHTTPAdapter(BaseHTTPAdapter):
But we still need to take care of when there is a proxy poolmanager
"""
conn = super(SSLHTTPAdapter, self).get_connection(*args, **kwargs)
- if conn.assert_hostname != self.assert_hostname:
+ if self.assert_hostname is not None and conn.assert_hostname != self.assert_hostname:
conn.assert_hostname = self.assert_hostname
return conn
diff --git a/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py b/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py
index 9193ce30e..792aa0cb5 100644
--- a/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py
+++ b/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py
@@ -15,7 +15,6 @@ import os
import select
import socket as pysocket
import struct
-import sys
from ansible.module_utils.six import PY3, binary_type
@@ -43,7 +42,7 @@ def read(socket, n=4096):
recoverable_errors = (errno.EINTR, errno.EDEADLK, errno.EWOULDBLOCK)
if PY3 and not isinstance(socket, NpipeSocket):
- if sys.platform == 'win32':
+ if not hasattr(select, "poll"):
# Limited to 1024
select.select([socket], [], [])
else:
diff --git a/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py b/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py
index 910b0dc35..db3718d4d 100644
--- a/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py
+++ b/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py
@@ -160,6 +160,22 @@ def convert_volume_binds(binds):
else:
mode = 'rw'
+ # NOTE: this is only relevant for Linux hosts
+ # (doesn't apply in Docker Desktop)
+ propagation_modes = [
+ 'rshared',
+ 'shared',
+ 'rslave',
+ 'slave',
+ 'rprivate',
+ 'private',
+ ]
+ if 'propagation' in v and v['propagation'] in propagation_modes:
+ if mode:
+ mode = ','.join([mode, v['propagation']])
+ else:
+ mode = v['propagation']
+
result.append(
text_type('{0}:{1}:{2}').format(k, bind, mode)
)
diff --git a/ansible_collections/community/docker/plugins/module_utils/_logfmt.py b/ansible_collections/community/docker/plugins/module_utils/_logfmt.py
new file mode 100644
index 000000000..fa45b5754
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/module_utils/_logfmt.py
@@ -0,0 +1,208 @@
+# Copyright (c) 2024, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+"""
+Parse go logfmt messages.
+
+See https://pkg.go.dev/github.com/kr/logfmt?utm_source=godoc for information on the format.
+"""
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+
+# The format is defined in https://pkg.go.dev/github.com/kr/logfmt?utm_source=godoc
+# (look for "EBNFish")
+
+
+class InvalidLogFmt(Exception):
+ pass
+
+
+class _Mode(object):
+ GARBAGE = 0
+ KEY = 1
+ EQUAL = 2
+ IDENT_VALUE = 3
+ QUOTED_VALUE = 4
+
+
+_ESCAPE_DICT = {
+ '"': '"',
+ '\\': '\\',
+ "'": "'",
+ '/': '/',
+ 'b': '\b',
+ 'f': '\f',
+ 'n': '\n',
+ 'r': '\r',
+ 't': '\t',
+}
+
+_HEX_DICT = {
+ '0': 0,
+ '1': 1,
+ '2': 2,
+ '3': 3,
+ '4': 4,
+ '5': 5,
+ '6': 6,
+ '7': 7,
+ '8': 8,
+ '9': 9,
+ 'a': 0xA,
+ 'b': 0xB,
+ 'c': 0xC,
+ 'd': 0xD,
+ 'e': 0xE,
+ 'f': 0xF,
+ 'A': 0xA,
+ 'B': 0xB,
+ 'C': 0xC,
+ 'D': 0xD,
+ 'E': 0xE,
+ 'F': 0xF,
+}
+
+
+def _is_ident(cur):
+ return cur > ' ' and cur not in ('"', '=')
+
+
+class _Parser(object):
+ def __init__(self, line):
+ self.line = line
+ self.index = 0
+ self.length = len(line)
+
+ def done(self):
+ return self.index >= self.length
+
+ def cur(self):
+ return self.line[self.index]
+
+ def next(self):
+ self.index += 1
+
+ def prev(self):
+ self.index -= 1
+
+ def parse_unicode_sequence(self):
+ if self.index + 6 > self.length:
+ raise InvalidLogFmt('Not enough space for unicode escape')
+ if self.line[self.index:self.index + 2] != '\\u':
+ raise InvalidLogFmt('Invalid unicode escape start')
+ v = 0
+ for i in range(self.index + 2, self.index + 6):
+ v <<= 4
+ try:
+ v += _HEX_DICT[self.line[self.index]]
+ except KeyError:
+ raise InvalidLogFmt('Invalid unicode escape digit {digit!r}'.format(digit=self.line[self.index]))
+ self.index += 6
+ return chr(v)
+
+
+def parse_line(line, logrus_mode=False):
+ result = {}
+ parser = _Parser(line)
+ key = []
+ value = []
+ mode = _Mode.GARBAGE
+
+ def handle_kv(has_no_value=False):
+ k = ''.join(key)
+ v = None if has_no_value else ''.join(value)
+ result[k] = v
+ del key[:]
+ del value[:]
+
+ def parse_garbage(cur):
+ if _is_ident(cur):
+ return _Mode.KEY
+ parser.next()
+ return _Mode.GARBAGE
+
+ def parse_key(cur):
+ if _is_ident(cur):
+ key.append(cur)
+ parser.next()
+ return _Mode.KEY
+ elif cur == '=':
+ parser.next()
+ return _Mode.EQUAL
+ else:
+ if logrus_mode:
+ raise InvalidLogFmt('Key must always be followed by "=" in logrus mode')
+ handle_kv(has_no_value=True)
+ parser.next()
+ return _Mode.GARBAGE
+
+ def parse_equal(cur):
+ if _is_ident(cur):
+ value.append(cur)
+ parser.next()
+ return _Mode.IDENT_VALUE
+ elif cur == '"':
+ parser.next()
+ return _Mode.QUOTED_VALUE
+ else:
+ handle_kv()
+ parser.next()
+ return _Mode.GARBAGE
+
+ def parse_ident_value(cur):
+ if _is_ident(cur):
+ value.append(cur)
+ parser.next()
+ return _Mode.IDENT_VALUE
+ else:
+ handle_kv()
+ parser.next()
+ return _Mode.GARBAGE
+
+ def parse_quoted_value(cur):
+ if cur == '\\':
+ parser.next()
+ if parser.done():
+ raise InvalidLogFmt('Unterminated escape sequence in quoted string')
+ cur = parser.cur()
+ if cur in _ESCAPE_DICT:
+ value.append(_ESCAPE_DICT[cur])
+ elif cur != 'u':
+ raise InvalidLogFmt('Unknown escape sequence {seq!r}'.format(seq='\\' + cur))
+ else:
+ parser.prev()
+ value.append(parser.parse_unicode_sequence())
+ parser.next()
+ return _Mode.QUOTED_VALUE
+ elif cur == '"':
+ handle_kv()
+ parser.next()
+ return _Mode.GARBAGE
+ elif cur < ' ':
+ raise InvalidLogFmt('Control characters in quoted string are not allowed')
+ else:
+ value.append(cur)
+ parser.next()
+ return _Mode.QUOTED_VALUE
+
+ parsers = {
+ _Mode.GARBAGE: parse_garbage,
+ _Mode.KEY: parse_key,
+ _Mode.EQUAL: parse_equal,
+ _Mode.IDENT_VALUE: parse_ident_value,
+ _Mode.QUOTED_VALUE: parse_quoted_value,
+ }
+ while not parser.done():
+ mode = parsers[mode](parser.cur())
+ if mode == _Mode.KEY and logrus_mode:
+ raise InvalidLogFmt('Key must always be followed by "=" in logrus mode')
+ if mode == _Mode.KEY or mode == _Mode.EQUAL:
+ handle_kv(has_no_value=True)
+ elif mode == _Mode.IDENT_VALUE:
+ handle_kv()
+ elif mode == _Mode.QUOTED_VALUE:
+ raise InvalidLogFmt('Unterminated quoted string')
+ return result
diff --git a/ansible_collections/community/docker/plugins/module_utils/_platform.py b/ansible_collections/community/docker/plugins/module_utils/_platform.py
new file mode 100644
index 000000000..4b6216f74
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/module_utils/_platform.py
@@ -0,0 +1,179 @@
+# This code is part of the Ansible collection community.docker, but is an independent component.
+# This particular file, and this file only, is based on containerd's platforms Go module
+# (https://github.com/containerd/containerd/tree/main/platforms)
+#
+# Copyright (c) 2023 Felix Fontein <felix@fontein.de>
+# Copyright The containerd Authors
+#
+# It is licensed under the Apache 2.0 license (see LICENSES/Apache-2.0.txt in this collection)
+# SPDX-License-Identifier: Apache-2.0
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import re
+
+
+_VALID_STR = re.compile('^[A-Za-z0-9_-]+$')
+
+
+def _validate_part(string, part, part_name):
+ if not part:
+ raise ValueError('Invalid platform string "{string}": {part} is empty'.format(string=string, part=part_name))
+ if not _VALID_STR.match(part):
+ raise ValueError('Invalid platform string "{string}": {part} has invalid characters'.format(string=string, part=part_name))
+ return part
+
+
+# See https://github.com/containerd/containerd/blob/main/platforms/database.go#L32-L38
+_KNOWN_OS = (
+ "aix", "android", "darwin", "dragonfly", "freebsd", "hurd", "illumos", "ios", "js",
+ "linux", "nacl", "netbsd", "openbsd", "plan9", "solaris", "windows", "zos",
+)
+
+# See https://github.com/containerd/containerd/blob/main/platforms/database.go#L54-L60
+_KNOWN_ARCH = (
+ "386", "amd64", "amd64p32", "arm", "armbe", "arm64", "arm64be", "ppc64", "ppc64le",
+ "loong64", "mips", "mipsle", "mips64", "mips64le", "mips64p32", "mips64p32le",
+ "ppc", "riscv", "riscv64", "s390", "s390x", "sparc", "sparc64", "wasm",
+)
+
+
+def _normalize_os(os_str):
+ # See normalizeOS() in https://github.com/containerd/containerd/blob/main/platforms/database.go
+ os_str = os_str.lower()
+ if os_str == 'macos':
+ os_str = 'darwin'
+ return os_str
+
+
+_NORMALIZE_ARCH = {
+ ("i386", None): ("386", ""),
+ ("x86_64", "v1"): ("amd64", ""),
+ ("x86-64", "v1"): ("amd64", ""),
+ ("amd64", "v1"): ("amd64", ""),
+ ("x86_64", None): ("amd64", None),
+ ("x86-64", None): ("amd64", None),
+ ("amd64", None): ("amd64", None),
+ ("aarch64", "8"): ("arm64", ""),
+ ("arm64", "8"): ("arm64", ""),
+ ("aarch64", "v8"): ("arm64", ""),
+ ("arm64", "v8"): ("arm64", ""),
+ ("aarch64", None): ("arm64", None),
+ ("arm64", None): ("arm64", None),
+ ("armhf", None): ("arm", "v7"),
+ ("armel", None): ("arm", "v6"),
+ ("arm", ""): ("arm", "v7"),
+ ("arm", "5"): ("arm", "v5"),
+ ("arm", "6"): ("arm", "v6"),
+ ("arm", "7"): ("arm", "v7"),
+ ("arm", "8"): ("arm", "v8"),
+ ("arm", None): ("arm", None),
+}
+
+
+def _normalize_arch(arch_str, variant_str):
+ # See normalizeArch() in https://github.com/containerd/containerd/blob/main/platforms/database.go
+ arch_str = arch_str.lower()
+ variant_str = variant_str.lower()
+ res = _NORMALIZE_ARCH.get((arch_str, variant_str))
+ if res is None:
+ res = _NORMALIZE_ARCH.get((arch_str, None))
+ if res is None:
+ return arch_str, variant_str
+ if res is not None:
+ arch_str = res[0]
+ if res[1] is not None:
+ variant_str = res[1]
+ return arch_str, variant_str
+
+
+class _Platform(object):
+ def __init__(self, os=None, arch=None, variant=None):
+ self.os = os
+ self.arch = arch
+ self.variant = variant
+ if variant is not None:
+ if arch is None:
+ raise ValueError('If variant is given, architecture must be given too')
+ if os is None:
+ raise ValueError('If variant is given, os must be given too')
+
+ @classmethod
+ def parse_platform_string(cls, string, daemon_os=None, daemon_arch=None):
+ # See Parse() in https://github.com/containerd/containerd/blob/main/platforms/platforms.go
+ if string is None:
+ return cls()
+ if not string:
+ raise ValueError('Platform string must be non-empty')
+ parts = string.split('/', 2)
+ arch = None
+ variant = None
+ if len(parts) == 1:
+ _validate_part(string, string, 'OS/architecture')
+ # The part is either OS or architecture
+ os = _normalize_os(string)
+ if os in _KNOWN_OS:
+ if daemon_arch is not None:
+ arch, variant = _normalize_arch(daemon_arch, '')
+ return cls(os=os, arch=arch, variant=variant)
+ arch, variant = _normalize_arch(os, '')
+ if arch in _KNOWN_ARCH:
+ return cls(
+ os=_normalize_os(daemon_os) if daemon_os else None,
+ arch=arch or None,
+ variant=variant or None,
+ )
+ raise ValueError('Invalid platform string "{0}": unknown OS or architecture'.format(string))
+ os = _validate_part(string, parts[0], 'OS')
+ if not os:
+ raise ValueError('Invalid platform string "{0}": OS is empty'.format(string))
+ arch = _validate_part(string, parts[1], 'architecture') if len(parts) > 1 else None
+ if arch is not None and not arch:
+ raise ValueError('Invalid platform string "{0}": architecture is empty'.format(string))
+ variant = _validate_part(string, parts[2], 'variant') if len(parts) > 2 else None
+ if variant is not None and not variant:
+ raise ValueError('Invalid platform string "{0}": variant is empty'.format(string))
+ arch, variant = _normalize_arch(arch, variant or '')
+ if len(parts) == 2 and arch == 'arm' and variant == 'v7':
+ variant = None
+ if len(parts) == 3 and arch == 'arm64' and variant == '':
+ variant = 'v8'
+ return cls(os=_normalize_os(os), arch=arch, variant=variant or None)
+
+ def __str__(self):
+ if self.variant:
+ parts = [self.os, self.arch, self.variant]
+ elif self.os:
+ if self.arch:
+ parts = [self.os, self.arch]
+ else:
+ parts = [self.os]
+ elif self.arch is not None:
+ parts = [self.arch]
+ else:
+ parts = []
+ return '/'.join(parts)
+
+ def __repr__(self):
+ return '_Platform(os={os!r}, arch={arch!r}, variant={variant!r})'.format(os=self.os, arch=self.arch, variant=self.variant)
+
+ def __eq__(self, other):
+ return self.os == other.os and self.arch == other.arch and self.variant == other.variant
+
+
+def normalize_platform_string(string, daemon_os=None, daemon_arch=None):
+ return str(_Platform.parse_platform_string(string, daemon_os=daemon_os, daemon_arch=daemon_arch))
+
+
+def compose_platform_string(os=None, arch=None, variant=None, daemon_os=None, daemon_arch=None):
+ if os is None and daemon_os is not None:
+ os = _normalize_os(daemon_os)
+ if arch is None and daemon_arch is not None:
+ arch, variant = _normalize_arch(daemon_arch, variant or '')
+ variant = variant or None
+ return str(_Platform(os=os, arch=arch, variant=variant or None))
+
+
+def compare_platform_strings(string1, string2):
+ return _Platform.parse_platform_string(string1) == _Platform.parse_platform_string(string2)
diff --git a/ansible_collections/community/docker/plugins/module_utils/common.py b/ansible_collections/community/docker/plugins/module_utils/common.py
index e6a06ed65..d1dcf3e60 100644
--- a/ansible_collections/community/docker/plugins/module_utils/common.py
+++ b/ansible_collections/community/docker/plugins/module_utils/common.py
@@ -122,6 +122,32 @@ if not HAS_DOCKER_PY:
def _get_tls_config(fail_function, **kwargs):
+ if 'ssl_version' in kwargs and LooseVersion(docker_version) >= LooseVersion('7.0.0b1'):
+ ssl_version = kwargs.pop('ssl_version')
+ if ssl_version is not None:
+ fail_function(
+ "ssl_version is not compatible with Docker SDK for Python 7.0.0+. You are using"
+ " Docker SDK for Python {docker_py_version}. The ssl_version option (value: {ssl_version})"
+ " has either been set directly or with the environment variable DOCKER_SSL_VERSION."
+ " Make sure it is not set, or switch to an older version of Docker SDK for Python.".format(
+ docker_py_version=docker_version,
+ ssl_version=ssl_version,
+ )
+ )
+ if 'assert_hostname' in kwargs and LooseVersion(docker_version) >= LooseVersion('7.0.0b1'):
+ assert_hostname = kwargs.pop('assert_hostname')
+ if assert_hostname is not None:
+ fail_function(
+ "tls_hostname is not compatible with Docker SDK for Python 7.0.0+. You are using"
+ " Docker SDK for Python {docker_py_version}. The tls_hostname option (value: {tls_hostname})"
+ " has either been set directly or with the environment variable DOCKER_TLS_HOSTNAME."
+ " Make sure it is not set, or switch to an older version of Docker SDK for Python.".format(
+ docker_py_version=docker_version,
+ tls_hostname=assert_hostname,
+ )
+ )
+ # Filter out all None parameters
+ kwargs = dict((k, v) for k, v in kwargs.items() if v is not None)
try:
tls_config = TLSConfig(**kwargs)
return tls_config
@@ -234,12 +260,8 @@ class AnsibleDockerClientBase(Client):
def log(self, msg, pretty_print=False):
pass
# if self.debug:
- # log_file = open('docker.log', 'a')
- # if pretty_print:
- # log_file.write(json.dumps(msg, sort_keys=True, indent=4, separators=(',', ': ')))
- # log_file.write(u'\n')
- # else:
- # log_file.write(msg + u'\n')
+ # from .util import log_debug
+ # log_debug(msg, pretty_print=pretty_print)
@abc.abstractmethod
def fail(self, msg, **kwargs):
@@ -309,7 +331,7 @@ class AnsibleDockerClientBase(Client):
'DOCKER_TLS_HOSTNAME', None, type='str'),
api_version=self._get_value('api_version', params['api_version'], 'DOCKER_API_VERSION',
'auto', type='str'),
- cacert_path=self._get_value('cacert_path', params['ca_cert'], 'DOCKER_CERT_PATH', None, type='str'),
+ cacert_path=self._get_value('cacert_path', params['ca_path'], 'DOCKER_CERT_PATH', None, type='str'),
cert_path=self._get_value('cert_path', params['client_cert'], 'DOCKER_CERT_PATH', None, type='str'),
key_path=self._get_value('key_path', params['client_key'], 'DOCKER_CERT_PATH', None, type='str'),
ssl_version=self._get_value('ssl_version', params['ssl_version'], 'DOCKER_SSL_VERSION', None, type='str'),
@@ -456,7 +478,7 @@ class AnsibleDockerClientBase(Client):
images = self._image_lookup(lookup, tag)
if len(images) > 1:
- self.fail("Registry returned more than one result for %s:%s" % (name, tag))
+ self.fail("Daemon returned more than one result for %s:%s" % (name, tag))
if len(images) == 1:
try:
diff --git a/ansible_collections/community/docker/plugins/module_utils/common_api.py b/ansible_collections/community/docker/plugins/module_utils/common_api.py
index 7d46a153a..b5ea42fa3 100644
--- a/ansible_collections/community/docker/plugins/module_utils/common_api.py
+++ b/ansible_collections/community/docker/plugins/module_utils/common_api.py
@@ -131,12 +131,8 @@ class AnsibleDockerClientBase(Client):
def log(self, msg, pretty_print=False):
pass
# if self.debug:
- # log_file = open('docker.log', 'a')
- # if pretty_print:
- # log_file.write(json.dumps(msg, sort_keys=True, indent=4, separators=(',', ': ')))
- # log_file.write(u'\n')
- # else:
- # log_file.write(msg + u'\n')
+ # from .util import log_debug
+ # log_debug(msg, pretty_print=pretty_print)
@abc.abstractmethod
def fail(self, msg, **kwargs):
@@ -206,7 +202,7 @@ class AnsibleDockerClientBase(Client):
'DOCKER_TLS_HOSTNAME', None, type='str'),
api_version=self._get_value('api_version', params['api_version'], 'DOCKER_API_VERSION',
'auto', type='str'),
- cacert_path=self._get_value('cacert_path', params['ca_cert'], 'DOCKER_CERT_PATH', None, type='str'),
+ cacert_path=self._get_value('cacert_path', params['ca_path'], 'DOCKER_CERT_PATH', None, type='str'),
cert_path=self._get_value('cert_path', params['client_cert'], 'DOCKER_CERT_PATH', None, type='str'),
key_path=self._get_value('key_path', params['client_key'], 'DOCKER_CERT_PATH', None, type='str'),
ssl_version=self._get_value('ssl_version', params['ssl_version'], 'DOCKER_SSL_VERSION', None, type='str'),
@@ -396,7 +392,7 @@ class AnsibleDockerClientBase(Client):
images = self._image_lookup(lookup, tag)
if len(images) > 1:
- self.fail("Registry returned more than one result for %s:%s" % (name, tag))
+ self.fail("Daemon returned more than one result for %s:%s" % (name, tag))
if len(images) == 1:
try:
diff --git a/ansible_collections/community/docker/plugins/module_utils/common_cli.py b/ansible_collections/community/docker/plugins/module_utils/common_cli.py
new file mode 100644
index 000000000..60d539877
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/module_utils/common_cli.py
@@ -0,0 +1,339 @@
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+
+import abc
+import json
+import shlex
+
+from ansible.module_utils.basic import AnsibleModule, env_fallback
+from ansible.module_utils.common.process import get_bin_path
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.version import LooseVersion
+
+from ansible_collections.community.docker.plugins.module_utils._api.auth import resolve_repository_name
+
+from ansible_collections.community.docker.plugins.module_utils.util import ( # noqa: F401, pylint: disable=unused-import
+ DEFAULT_DOCKER_HOST,
+ DEFAULT_TLS,
+ DEFAULT_TLS_VERIFY,
+ DOCKER_MUTUALLY_EXCLUSIVE,
+ DOCKER_REQUIRED_TOGETHER,
+ sanitize_result,
+)
+
+
+DOCKER_COMMON_ARGS = dict(
+ docker_cli=dict(type='path'),
+ docker_host=dict(type='str', default=DEFAULT_DOCKER_HOST, fallback=(env_fallback, ['DOCKER_HOST']), aliases=['docker_url']),
+ tls_hostname=dict(type='str', fallback=(env_fallback, ['DOCKER_TLS_HOSTNAME'])),
+ api_version=dict(type='str', default='auto', fallback=(env_fallback, ['DOCKER_API_VERSION']), aliases=['docker_api_version']),
+ ca_path=dict(type='path', aliases=['ca_cert', 'tls_ca_cert', 'cacert_path']),
+ client_cert=dict(type='path', aliases=['tls_client_cert', 'cert_path']),
+ client_key=dict(type='path', aliases=['tls_client_key', 'key_path']),
+ tls=dict(type='bool', default=DEFAULT_TLS, fallback=(env_fallback, ['DOCKER_TLS'])),
+ validate_certs=dict(type='bool', default=DEFAULT_TLS_VERIFY, fallback=(env_fallback, ['DOCKER_TLS_VERIFY']), aliases=['tls_verify']),
+ # debug=dict(type='bool', default=False),
+ cli_context=dict(type='str'),
+)
+
+
+class DockerException(Exception):
+ pass
+
+
+class AnsibleDockerClientBase(object):
+ def __init__(self, common_args, min_docker_api_version=None):
+ self._environment = {}
+ if common_args['tls_hostname']:
+ self._environment['DOCKER_TLS_HOSTNAME'] = common_args['tls_hostname']
+ if common_args['api_version'] and common_args['api_version'] != 'auto':
+ self._environment['DOCKER_API_VERSION'] = common_args['api_version']
+ self._cli = common_args.get('docker_cli')
+ if self._cli is None:
+ try:
+ self._cli = get_bin_path('docker')
+ except ValueError:
+ self.fail('Cannot find docker CLI in path. Please provide it explicitly with the docker_cli parameter')
+
+ self._cli_base = [self._cli]
+ self._cli_base.extend(['--host', common_args['docker_host']])
+ if common_args['validate_certs']:
+ self._cli_base.append('--tlsverify')
+ elif common_args['tls']:
+ self._cli_base.append('--tls')
+ if common_args['ca_path']:
+ self._cli_base.extend(['--tlscacert', common_args['ca_path']])
+ if common_args['client_cert']:
+ self._cli_base.extend(['--tlscert', common_args['client_cert']])
+ if common_args['client_key']:
+ self._cli_base.extend(['--tlskey', common_args['client_key']])
+ if common_args['cli_context']:
+ self._cli_base.extend(['--context', common_args['cli_context']])
+
+ # `--format json` was only added as a shorthand for `--format {{ json . }}` in Docker 23.0
+ dummy, self._version, dummy = self.call_cli_json('version', '--format', '{{ json . }}', check_rc=True)
+ self._info = None
+
+ self.docker_api_version_str = self._version['Server']['ApiVersion']
+ self.docker_api_version = LooseVersion(self.docker_api_version_str)
+ min_docker_api_version = min_docker_api_version or '1.25'
+ if self.docker_api_version < LooseVersion(min_docker_api_version):
+ self.fail('Docker API version is %s. Minimum version required is %s.' % (self.docker_api_version_str, min_docker_api_version))
+
+ def log(self, msg, pretty_print=False):
+ pass
+ # if self.debug:
+ # from .util import log_debug
+ # log_debug(msg, pretty_print=pretty_print)
+
+ def get_cli(self):
+ return self._cli
+
+ def get_version_info(self):
+ return self._version
+
+ def _compose_cmd(self, args):
+ return self._cli_base + list(args)
+
+ def _compose_cmd_str(self, args):
+ return ' '.join(shlex.quote(a) for a in self._compose_cmd(args))
+
+ @abc.abstractmethod
+ # def call_cli(self, *args, check_rc=False, data=None, cwd=None, environ_update=None):
+ def call_cli(self, *args, **kwargs):
+ # Python 2.7 doesn't like anything than '**kwargs' after '*args', so we have to do this manually...
+ pass
+
+ # def call_cli_json(self, *args, check_rc=False, data=None, cwd=None, environ_update=None, warn_on_stderr=False):
+ def call_cli_json(self, *args, **kwargs):
+ warn_on_stderr = kwargs.pop('warn_on_stderr', False)
+ rc, stdout, stderr = self.call_cli(*args, **kwargs)
+ if warn_on_stderr and stderr:
+ self.warn(to_native(stderr))
+ try:
+ data = json.loads(stdout)
+ except Exception as exc:
+ self.fail('Error while parsing JSON output of {cmd}: {exc}\nJSON output: {stdout}'.format(
+ cmd=self._compose_cmd_str(args),
+ exc=to_native(exc),
+ stdout=to_native(stdout),
+ ))
+ return rc, data, stderr
+
+ # def call_cli_json_stream(self, *args, check_rc=False, data=None, cwd=None, environ_update=None, warn_on_stderr=False):
+ def call_cli_json_stream(self, *args, **kwargs):
+ warn_on_stderr = kwargs.pop('warn_on_stderr', False)
+ rc, stdout, stderr = self.call_cli(*args, **kwargs)
+ if warn_on_stderr and stderr:
+ self.warn(to_native(stderr))
+ result = []
+ try:
+ for line in stdout.splitlines():
+ line = line.strip()
+ if line.startswith(b'{'):
+ result.append(json.loads(line))
+ except Exception as exc:
+ self.fail('Error while parsing JSON output of {cmd}: {exc}\nJSON output: {stdout}'.format(
+ cmd=self._compose_cmd_str(args),
+ exc=to_native(exc),
+ stdout=to_native(stdout),
+ ))
+ return rc, result, stderr
+
+ @abc.abstractmethod
+ def fail(self, msg, **kwargs):
+ pass
+
+ @abc.abstractmethod
+ def warn(self, msg):
+ pass
+
+ @abc.abstractmethod
+ def deprecate(self, msg, version=None, date=None, collection_name=None):
+ pass
+
+ def get_cli_info(self):
+ if self._info is None:
+ dummy, self._info, dummy = self.call_cli_json('info', '--format', '{{ json . }}', check_rc=True)
+ return self._info
+
+ def get_client_plugin_info(self, component):
+ for plugin in self.get_cli_info()['ClientInfo'].get('Plugins') or []:
+ if plugin.get('Name') == component:
+ return plugin
+ return None
+
+ def _image_lookup(self, name, tag):
+ '''
+ Including a tag in the name parameter sent to the Docker SDK for Python images method
+ does not work consistently. Instead, get the result set for name and manually check
+ if the tag exists.
+ '''
+ dummy, images, dummy = self.call_cli_json_stream(
+ 'image', 'ls', '--format', '{{ json . }}', '--no-trunc', '--filter', 'reference={0}'.format(name),
+ check_rc=True,
+ )
+ if tag:
+ lookup = "%s:%s" % (name, tag)
+ lookup_digest = "%s@%s" % (name, tag)
+ response = images
+ images = []
+ for image in response:
+ if image.get('Tag') == tag or image.get('Digest') == tag:
+ images = [image]
+ break
+ return images
+
+ def find_image(self, name, tag):
+ '''
+ Lookup an image (by name and tag) and return the inspection results.
+ '''
+ if not name:
+ return None
+
+ self.log("Find image %s:%s" % (name, tag))
+ images = self._image_lookup(name, tag)
+ if not images:
+ # In API <= 1.20 seeing 'docker.io/<name>' as the name of images pulled from docker hub
+ registry, repo_name = resolve_repository_name(name)
+ if registry == 'docker.io':
+ # If docker.io is explicitly there in name, the image
+ # isn't found in some cases (#41509)
+ self.log("Check for docker.io image: %s" % repo_name)
+ images = self._image_lookup(repo_name, tag)
+ if not images and repo_name.startswith('library/'):
+ # Sometimes library/xxx images are not found
+ lookup = repo_name[len('library/'):]
+ self.log("Check for docker.io image: %s" % lookup)
+ images = self._image_lookup(lookup, tag)
+ if not images:
+ # Last case for some Docker versions: if docker.io wasn't there,
+ # it can be that the image wasn't found either
+ # (https://github.com/ansible/ansible/pull/15586)
+ lookup = "%s/%s" % (registry, repo_name)
+ self.log("Check for docker.io image: %s" % lookup)
+ images = self._image_lookup(lookup, tag)
+ if not images and '/' not in repo_name:
+ # This seems to be happening with podman-docker
+ # (https://github.com/ansible-collections/community.docker/issues/291)
+ lookup = "%s/library/%s" % (registry, repo_name)
+ self.log("Check for docker.io image: %s" % lookup)
+ images = self._image_lookup(lookup, tag)
+
+ if len(images) > 1:
+ self.fail("Daemon returned more than one result for %s:%s" % (name, tag))
+
+ if len(images) == 1:
+ rc, image, stderr = self.call_cli_json('image', 'inspect', images[0]['ID'])
+ if not image:
+ self.log("Image %s:%s not found." % (name, tag))
+ return None
+ if rc != 0:
+ self.fail("Error inspecting image %s:%s - %s" % (name, tag, to_native(stderr)))
+ return image[0]
+
+ self.log("Image %s:%s not found." % (name, tag))
+ return None
+
+ def find_image_by_id(self, image_id, accept_missing_image=False):
+ '''
+ Lookup an image (by ID) and return the inspection results.
+ '''
+ if not image_id:
+ return None
+
+ self.log("Find image %s (by ID)" % image_id)
+ rc, image, stderr = self.call_cli_json('image', 'inspect', image_id)
+ if not image:
+ if not accept_missing_image:
+ self.fail("Error inspecting image ID %s - %s" % (image_id, to_native(stderr)))
+ self.log("Image %s not found." % image_id)
+ return None
+ if rc != 0:
+ self.fail("Error inspecting image ID %s - %s" % (image_id, to_native(stderr)))
+ return image[0]
+
+
+class AnsibleModuleDockerClient(AnsibleDockerClientBase):
+ def __init__(self, argument_spec=None, supports_check_mode=False, mutually_exclusive=None,
+ required_together=None, required_if=None, required_one_of=None, required_by=None,
+ min_docker_api_version=None, fail_results=None):
+
+ # Modules can put information in here which will always be returned
+ # in case client.fail() is called.
+ self.fail_results = fail_results or {}
+
+ merged_arg_spec = dict()
+ merged_arg_spec.update(DOCKER_COMMON_ARGS)
+ if argument_spec:
+ merged_arg_spec.update(argument_spec)
+ self.arg_spec = merged_arg_spec
+
+ mutually_exclusive_params = []
+ mutually_exclusive_params += DOCKER_MUTUALLY_EXCLUSIVE
+ if mutually_exclusive:
+ mutually_exclusive_params += mutually_exclusive
+
+ required_together_params = []
+ required_together_params += DOCKER_REQUIRED_TOGETHER
+ if required_together:
+ required_together_params += required_together
+
+ self.module = AnsibleModule(
+ argument_spec=merged_arg_spec,
+ supports_check_mode=supports_check_mode,
+ mutually_exclusive=mutually_exclusive_params,
+ required_together=required_together_params,
+ required_if=required_if,
+ required_one_of=required_one_of,
+ required_by=required_by or {},
+ )
+
+ self.debug = False # self.module.params['debug']
+ self.check_mode = self.module.check_mode
+ self.diff = self.module._diff
+
+ common_args = dict((k, self.module.params[k]) for k in DOCKER_COMMON_ARGS)
+ super(AnsibleModuleDockerClient, self).__init__(common_args, min_docker_api_version=min_docker_api_version)
+
+ # def call_cli(self, *args, check_rc=False, data=None, cwd=None, environ_update=None):
+ def call_cli(self, *args, **kwargs):
+ # Python 2.7 doesn't like anything than '**kwargs' after '*args', so we have to do this manually...
+ check_rc = kwargs.pop('check_rc', False)
+ data = kwargs.pop('data', None)
+ cwd = kwargs.pop('cwd', None)
+ environ_update = kwargs.pop('environ_update', None)
+ if kwargs:
+ raise TypeError("call_cli() got an unexpected keyword argument '%s'" % list(kwargs)[0])
+
+ environment = self._environment.copy()
+ if environ_update:
+ environment.update(environ_update)
+ rc, stdout, stderr = self.module.run_command(
+ self._compose_cmd(args),
+ binary_data=True,
+ check_rc=check_rc,
+ cwd=cwd,
+ data=data,
+ encoding=None,
+ environ_update=environment,
+ expand_user_and_vars=False,
+ ignore_invalid_cwd=False,
+ )
+ return rc, stdout, stderr
+
+ def fail(self, msg, **kwargs):
+ self.fail_results.update(kwargs)
+ self.module.fail_json(msg=msg, **sanitize_result(self.fail_results))
+
+ def warn(self, msg):
+ self.module.warn(msg)
+
+ def deprecate(self, msg, version=None, date=None, collection_name=None):
+ self.module.deprecate(msg, version=version, date=date, collection_name=collection_name)
diff --git a/ansible_collections/community/docker/plugins/module_utils/compose_v2.py b/ansible_collections/community/docker/plugins/module_utils/compose_v2.py
new file mode 100644
index 000000000..92f109269
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/module_utils/compose_v2.py
@@ -0,0 +1,618 @@
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# Copyright (c) 2023, Léo El Amri (@lel-amri)
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+
+import os
+import re
+from collections import namedtuple
+
+from ansible.module_utils.common.text.converters import to_native
+from ansible.module_utils.six.moves import shlex_quote
+
+from ansible_collections.community.docker.plugins.module_utils.util import DockerBaseClass
+from ansible_collections.community.docker.plugins.module_utils.version import LooseVersion
+from ansible_collections.community.docker.plugins.module_utils._logfmt import (
+ InvalidLogFmt as _InvalidLogFmt,
+ parse_line as _parse_logfmt_line,
+)
+
+
+DOCKER_COMPOSE_FILES = ('compose.yaml', 'compose.yml', 'docker-compose.yaml', 'docker-compose.yml')
+
+DOCKER_STATUS_DONE = frozenset((
+ 'Started',
+ 'Healthy',
+ 'Exited',
+ 'Restarted',
+ 'Running',
+ 'Created',
+ 'Stopped',
+ 'Killed',
+ 'Removed',
+ # An extra, specific to containers
+ 'Recreated',
+ # Extras for pull events
+ 'Pulled',
+))
+DOCKER_STATUS_WORKING = frozenset((
+ 'Creating',
+ 'Starting',
+ 'Restarting',
+ 'Stopping',
+ 'Killing',
+ 'Removing',
+ # An extra, specific to containers
+ 'Recreate',
+ # Extras for pull events
+ 'Pulling',
+ # Extras for build start events
+ 'Building',
+))
+DOCKER_STATUS_PULL = frozenset((
+ 'Pulled',
+ 'Pulling',
+))
+DOCKER_STATUS_ERROR = frozenset((
+ 'Error',
+))
+DOCKER_STATUS_WARNING = frozenset((
+ 'Warning',
+))
+DOCKER_STATUS_WAITING = frozenset((
+ 'Waiting',
+))
+DOCKER_STATUS = frozenset(DOCKER_STATUS_DONE | DOCKER_STATUS_WORKING | DOCKER_STATUS_PULL | DOCKER_STATUS_ERROR | DOCKER_STATUS_WAITING)
+
+DOCKER_PULL_PROGRESS_DONE = frozenset((
+ 'Already exists',
+ 'Download complete',
+ 'Pull complete',
+))
+DOCKER_PULL_PROGRESS_WORKING = frozenset((
+ 'Pulling fs layer',
+ 'Waiting',
+ 'Downloading',
+ 'Verifying Checksum',
+ 'Extracting',
+))
+
+
+class ResourceType(object):
+ UNKNOWN = "unknown"
+ NETWORK = "network"
+ IMAGE = "image"
+ IMAGE_LAYER = "image-layer"
+ VOLUME = "volume"
+ CONTAINER = "container"
+ SERVICE = "service"
+
+ @classmethod
+ def from_docker_compose_event(cls, resource_type):
+ # type: (Type[ResourceType], Text) -> Any
+ return {
+ "Network": cls.NETWORK,
+ "Image": cls.IMAGE,
+ "Volume": cls.VOLUME,
+ "Container": cls.CONTAINER,
+ }[resource_type]
+
+
+Event = namedtuple(
+ 'Event',
+ ['resource_type', 'resource_id', 'status', 'msg']
+)
+
+
+_DRY_RUN_MARKER = 'DRY-RUN MODE -'
+
+_RE_RESOURCE_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'(?P<resource_type>Network|Image|Volume|Container)'
+ r'\s+'
+ r'(?P<resource_id>\S+)'
+ r'\s+'
+ r'(?P<status>\S(?:|.*\S))'
+ r'\s*'
+ r'$'
+)
+
+_RE_PULL_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'(?P<service>\S+)'
+ r'\s+'
+ r'(?P<status>%s)'
+ r'\s*'
+ r'$'
+ % '|'.join(re.escape(status) for status in DOCKER_STATUS_PULL)
+)
+
+_RE_PULL_PROGRESS = re.compile(
+ r'^'
+ r'\s*'
+ r'(?P<layer>\S+)'
+ r'\s+'
+ r'(?P<status>%s)'
+ r'\s*'
+ r'(?:|\s\[[^]]+\]\s+\S+\s*|\s+[0-9.kKmMgGbB]+/[0-9.kKmMgGbB]+\s*)'
+ r'$'
+ % '|'.join(re.escape(status) for status in sorted(DOCKER_PULL_PROGRESS_DONE | DOCKER_PULL_PROGRESS_WORKING))
+)
+
+_RE_ERROR_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'(?P<resource_id>\S+)'
+ r'\s+'
+ r'(?P<status>%s)'
+ r'\s*'
+ r'(?P<msg>\S.*\S)?'
+ r'$'
+ % '|'.join(re.escape(status) for status in DOCKER_STATUS_ERROR)
+)
+
+_RE_WARNING_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'(?P<resource_id>\S+)'
+ r'\s+'
+ r'(?P<status>%s)'
+ r'\s*'
+ r'(?P<msg>\S.*\S)?'
+ r'$'
+ % '|'.join(re.escape(status) for status in DOCKER_STATUS_WARNING)
+)
+
+_RE_CONTINUE_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'(?P<resource_id>\S+)'
+ r'\s+'
+ r'-'
+ r'\s*'
+ r'(?P<msg>\S(?:|.*\S))'
+ r'$'
+)
+
+_RE_SKIPPED_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'(?P<resource_id>\S+)'
+ r'\s+'
+ r'Skipped -'
+ r'\s*'
+ r'(?P<msg>\S(?:|.*\S))'
+ r'$'
+)
+
+_RE_BUILD_START_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'build service'
+ r'\s+'
+ r'(?P<resource_id>\S+)'
+ r'$'
+)
+
+_RE_BUILD_PROGRESS_EVENT = re.compile(
+ r'^'
+ r'\s*'
+ r'==>'
+ r'\s+'
+ r'(?P<msg>.*)'
+ r'$'
+)
+
+# The following needs to be kept in sync with the MINIMUM_VERSION compose_v2 docs fragment
+MINIMUM_COMPOSE_VERSION = '2.18.0'
+
+
+def _extract_event(line, warn_function=None):
+ match = _RE_RESOURCE_EVENT.match(line)
+ if match is not None:
+ status = match.group('status')
+ msg = None
+ if status not in DOCKER_STATUS:
+ status, msg = msg, status
+ return Event(
+ ResourceType.from_docker_compose_event(match.group('resource_type')),
+ match.group('resource_id'),
+ status,
+ msg,
+ ), True
+ match = _RE_PULL_EVENT.match(line)
+ if match:
+ return Event(
+ ResourceType.SERVICE,
+ match.group('service'),
+ match.group('status'),
+ None,
+ ), True
+ match = _RE_ERROR_EVENT.match(line)
+ if match:
+ return Event(
+ ResourceType.UNKNOWN,
+ match.group('resource_id'),
+ match.group('status'),
+ match.group('msg') or None,
+ ), True
+ match = _RE_WARNING_EVENT.match(line)
+ if match:
+ if warn_function:
+ if match.group('msg'):
+ msg = '{rid}: {msg}'
+ else:
+ msg = 'Unspecified warning for {rid}'
+ warn_function(msg.format(rid=match.group('resource_id'), msg=match.group('msg')))
+ return None, True
+ match = _RE_PULL_PROGRESS.match(line)
+ if match:
+ return Event(
+ ResourceType.IMAGE_LAYER,
+ match.group('layer'),
+ match.group('status'),
+ None,
+ ), True
+ match = _RE_SKIPPED_EVENT.match(line)
+ if match:
+ return Event(
+ ResourceType.UNKNOWN,
+ match.group('resource_id'),
+ 'Skipped',
+ match.group('msg'),
+ ), True
+ match = _RE_BUILD_START_EVENT.match(line)
+ if match:
+ return Event(
+ ResourceType.SERVICE,
+ match.group('resource_id'),
+ 'Building',
+ None,
+ ), True
+ return None, False
+
+
+def _extract_logfmt_event(line, warn_function=None):
+ try:
+ result = _parse_logfmt_line(line, logrus_mode=True)
+ except _InvalidLogFmt:
+ return None, False
+ if 'time' not in result or 'level' not in result or 'msg' not in result:
+ return None, False
+ if result['level'] == 'warning':
+ if warn_function:
+ warn_function(result['msg'])
+ return None, True
+ # TODO: no idea what to do with this
+ return None, False
+
+
+def _warn_missing_dry_run_prefix(line, warn_missing_dry_run_prefix, warn_function):
+ if warn_missing_dry_run_prefix and warn_function:
+ # This could be a bug, a change of docker compose's output format, ...
+ # Tell the user to report it to us :-)
+ warn_function(
+ 'Event line is missing dry-run mode marker: {0!r}. Please report this at '
+ 'https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&projects=&template=bug_report.md'
+ .format(line)
+ )
+
+
+def _warn_unparsable_line(line, warn_function):
+ # This could be a bug, a change of docker compose's output format, ...
+ # Tell the user to report it to us :-)
+ if warn_function:
+ warn_function(
+ 'Cannot parse event from line: {0!r}. Please report this at '
+ 'https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&projects=&template=bug_report.md'
+ .format(line)
+ )
+
+
+def _find_last_event_for(events, resource_id):
+ for index, event in enumerate(reversed(events)):
+ if event.resource_id == resource_id:
+ return len(events) - 1 - index, event
+ return None
+
+
+def _concat_event_msg(event, append_msg):
+ return Event(
+ event.resource_type,
+ event.resource_id,
+ event.status,
+ '\n'.join(msg for msg in [event.msg, append_msg] if msg is not None),
+ )
+
+
+def parse_events(stderr, dry_run=False, warn_function=None):
+ events = []
+ error_event = None
+ stderr_lines = stderr.splitlines()
+ if stderr_lines and stderr_lines[-1] == b'':
+ del stderr_lines[-1]
+ for line in stderr_lines:
+ line = to_native(line.strip())
+ if not line:
+ continue
+ warn_missing_dry_run_prefix = False
+ if dry_run:
+ if line.startswith(_DRY_RUN_MARKER):
+ line = line[len(_DRY_RUN_MARKER):].lstrip()
+ else:
+ warn_missing_dry_run_prefix = True
+ event, parsed = _extract_event(line, warn_function=warn_function)
+ if event is not None:
+ events.append(event)
+ if event.status in DOCKER_STATUS_ERROR:
+ error_event = event
+ else:
+ error_event = None
+ _warn_missing_dry_run_prefix(line, warn_missing_dry_run_prefix, warn_function)
+ continue
+ elif parsed:
+ continue
+ match = _RE_BUILD_PROGRESS_EVENT.match(line)
+ if match:
+ # Ignore this
+ continue
+ match = _RE_CONTINUE_EVENT.match(line)
+ if match:
+ # Continuing an existing event
+ index_event = _find_last_event_for(events, match.group('resource_id'))
+ if index_event is not None:
+ index, event = index_event
+ events[-1] = _concat_event_msg(event, match.group('msg'))
+ event, parsed = _extract_logfmt_event(line, warn_function=warn_function)
+ if event is not None:
+ events.append(event)
+ elif parsed:
+ continue
+ if error_event is not None:
+ # Unparsable line that apparently belongs to the previous error event
+ events[-1] = _concat_event_msg(error_event, line)
+ continue
+ if line.startswith('Error '):
+ # Error message that is independent of an error event
+ error_event = Event(
+ ResourceType.UNKNOWN,
+ '',
+ 'Error',
+ line,
+ )
+ events.append(error_event)
+ continue
+ if len(stderr_lines) == 1:
+ # **Very likely** an error message that is independent of an error event
+ error_event = Event(
+ ResourceType.UNKNOWN,
+ '',
+ 'Error',
+ line,
+ )
+ events.append(error_event)
+ continue
+ _warn_missing_dry_run_prefix(line, warn_missing_dry_run_prefix, warn_function)
+ _warn_unparsable_line(line, warn_function)
+ return events
+
+
+def has_changes(events, ignore_service_pull_events=False):
+ for event in events:
+ if event.status in DOCKER_STATUS_WORKING:
+ if ignore_service_pull_events and event.status in DOCKER_STATUS_PULL:
+ continue
+ return True
+ if event.resource_type == ResourceType.IMAGE_LAYER and event.status in DOCKER_PULL_PROGRESS_WORKING:
+ return True
+ return False
+
+
+def extract_actions(events):
+ actions = []
+ pull_actions = set()
+ for event in events:
+ if event.resource_type == ResourceType.IMAGE_LAYER and event.status in DOCKER_PULL_PROGRESS_WORKING:
+ pull_id = (event.resource_id, event.status)
+ if pull_id not in pull_actions:
+ pull_actions.add(pull_id)
+ actions.append({
+ 'what': event.resource_type,
+ 'id': event.resource_id,
+ 'status': event.status,
+ })
+ if event.resource_type != ResourceType.IMAGE_LAYER and event.status in DOCKER_STATUS_WORKING:
+ actions.append({
+ 'what': event.resource_type,
+ 'id': event.resource_id,
+ 'status': event.status,
+ })
+ return actions
+
+
+def emit_warnings(events, warn_function):
+ for event in events:
+ # If a message is present, assume it is a warning
+ if event.status is None and event.msg is not None:
+ warn_function('Docker compose: {resource_type} {resource_id}: {msg}'.format(
+ resource_type=event.resource_type,
+ resource_id=event.resource_id,
+ msg=event.msg,
+ ))
+
+
+def is_failed(events, rc):
+ if rc:
+ return True
+ return False
+
+
+def update_failed(result, events, args, stdout, stderr, rc, cli):
+ if not rc:
+ return False
+ errors = []
+ for event in events:
+ if event.status in DOCKER_STATUS_ERROR:
+ msg = 'Error when processing {resource_type} {resource_id}: '
+ if event.resource_type == 'unknown':
+ msg = 'Error when processing {resource_id}: '
+ if event.resource_id == '':
+ msg = 'General error: '
+ msg += '{status}' if event.msg is None else '{msg}'
+ errors.append(msg.format(
+ resource_type=event.resource_type,
+ resource_id=event.resource_id,
+ status=event.status,
+ msg=event.msg,
+ ))
+ if not errors:
+ errors.append('Return code {code} is non-zero'.format(code=rc))
+ result['failed'] = True
+ result['msg'] = '\n'.join(errors)
+ result['cmd'] = ' '.join(shlex_quote(arg) for arg in [cli] + args)
+ result['stdout'] = to_native(stdout)
+ result['stderr'] = to_native(stderr)
+ result['rc'] = rc
+ return True
+
+
+def common_compose_argspec():
+ return dict(
+ project_src=dict(type='path', required=True),
+ project_name=dict(type='str'),
+ files=dict(type='list', elements='path'),
+ env_files=dict(type='list', elements='path'),
+ profiles=dict(type='list', elements='str'),
+ )
+
+
+def combine_binary_output(*outputs):
+ return b'\n'.join(out for out in outputs if out)
+
+
+def combine_text_output(*outputs):
+ return '\n'.join(out for out in outputs if out)
+
+
+class BaseComposeManager(DockerBaseClass):
+ def __init__(self, client, min_version=MINIMUM_COMPOSE_VERSION):
+ super(BaseComposeManager, self).__init__()
+ self.client = client
+ self.check_mode = self.client.check_mode
+ parameters = self.client.module.params
+
+ self.project_src = parameters['project_src']
+ self.project_name = parameters['project_name']
+ self.files = parameters['files']
+ self.env_files = parameters['env_files']
+ self.profiles = parameters['profiles']
+
+ compose = self.client.get_client_plugin_info('compose')
+ if compose is None:
+ self.client.fail('Docker CLI {0} does not have the compose plugin installed'.format(self.client.get_cli()))
+ compose_version = compose['Version'].lstrip('v')
+ self.compose_version = LooseVersion(compose_version)
+ if self.compose_version < LooseVersion(min_version):
+ self.client.fail('Docker CLI {cli} has the compose plugin with version {version}; need version {min_version} or later'.format(
+ cli=self.client.get_cli(),
+ version=compose_version,
+ min_version=min_version,
+ ))
+
+ if not os.path.isdir(self.project_src):
+ self.client.fail('"{0}" is not a directory'.format(self.project_src))
+
+ if self.files:
+ for file in self.files:
+ path = os.path.join(self.project_src, file)
+ if not os.path.exists(path):
+ self.client.fail('Cannot find Compose file "{0}" relative to project directory "{1}"'.format(file, self.project_src))
+ elif all(not os.path.exists(os.path.join(self.project_src, f)) for f in DOCKER_COMPOSE_FILES):
+ filenames = ', '.join(DOCKER_COMPOSE_FILES[:-1])
+ self.client.fail('"{0}" does not contain {1}, or {2}'.format(self.project_src, filenames, DOCKER_COMPOSE_FILES[-1]))
+
+ def get_base_args(self):
+ args = ['compose', '--ansi', 'never']
+ if self.compose_version >= LooseVersion('2.19.0'):
+ # https://github.com/docker/compose/pull/10690
+ args.extend(['--progress', 'plain'])
+ args.extend(['--project-directory', self.project_src])
+ if self.project_name:
+ args.extend(['--project-name', self.project_name])
+ for file in self.files or []:
+ args.extend(['--file', file])
+ for env_file in self.env_files or []:
+ args.extend(['--env-file', env_file])
+ for profile in self.profiles or []:
+ args.extend(['--profile', profile])
+ return args
+
+ def list_containers_raw(self):
+ args = self.get_base_args() + ['ps', '--format', 'json', '--all']
+ if self.compose_version >= LooseVersion('2.23.0'):
+ # https://github.com/docker/compose/pull/11038
+ args.append('--no-trunc')
+ kwargs = dict(cwd=self.project_src, check_rc=True)
+ if self.compose_version >= LooseVersion('2.21.0'):
+ # Breaking change in 2.21.0: https://github.com/docker/compose/pull/10918
+ dummy, containers, dummy = self.client.call_cli_json_stream(*args, **kwargs)
+ else:
+ dummy, containers, dummy = self.client.call_cli_json(*args, **kwargs)
+ return containers
+
+ def list_containers(self):
+ result = []
+ for container in self.list_containers_raw():
+ labels = {}
+ if container.get('Labels'):
+ for part in container['Labels'].split(','):
+ label_value = part.split('=', 1)
+ labels[label_value[0]] = label_value[1] if len(label_value) > 1 else ''
+ container['Labels'] = labels
+ container['Names'] = container.get('Names', container['Name']).split(',')
+ container['Networks'] = container.get('Networks', '').split(',')
+ container['Publishers'] = container.get('Publishers') or []
+ result.append(container)
+ return result
+
+ def list_images(self):
+ args = self.get_base_args() + ['images', '--format', 'json']
+ kwargs = dict(cwd=self.project_src, check_rc=True)
+ dummy, images, dummy = self.client.call_cli_json(*args, **kwargs)
+ return images
+
+ def parse_events(self, stderr, dry_run=False):
+ return parse_events(stderr, dry_run=dry_run, warn_function=self.client.warn)
+
+ def emit_warnings(self, events):
+ emit_warnings(events, warn_function=self.client.warn)
+
+ def update_result(self, result, events, stdout, stderr, ignore_service_pull_events=False):
+ result['changed'] = result.get('changed', False) or has_changes(events, ignore_service_pull_events=ignore_service_pull_events)
+ result['actions'] = result.get('actions', []) + extract_actions(events)
+ result['stdout'] = combine_text_output(result.get('stdout'), to_native(stdout))
+ result['stderr'] = combine_text_output(result.get('stderr'), to_native(stderr))
+
+ def update_failed(self, result, events, args, stdout, stderr, rc):
+ return update_failed(
+ result,
+ events,
+ args=args,
+ stdout=stdout,
+ stderr=stderr,
+ rc=rc,
+ cli=self.client.get_cli(),
+ )
+
+ def cleanup_result(self, result):
+ if not result.get('failed'):
+ # Only return stdout and stderr if it's not empty
+ for res in ('stdout', 'stderr'):
+ if result.get(res) == '':
+ result.pop(res)
diff --git a/ansible_collections/community/docker/plugins/module_utils/image_archive.py b/ansible_collections/community/docker/plugins/module_utils/image_archive.py
index e174631e2..46b5abc14 100644
--- a/ansible_collections/community/docker/plugins/module_utils/image_archive.py
+++ b/ansible_collections/community/docker/plugins/module_utils/image_archive.py
@@ -23,7 +23,7 @@ class ImageArchiveManifestSummary(object):
:param image_id: File name portion of Config entry, e.g. abcde12345 from abcde12345.json
:type image_id: str
:param repo_tags Docker image names, e.g. ["hello-world:latest"]
- :type repo_tags: list
+ :type repo_tags: list[str]
'''
self.image_id = image_id
@@ -60,13 +60,13 @@ def api_image_id(archive_image_id):
return 'sha256:%s' % archive_image_id
-def archived_image_manifest(archive_path):
+def load_archived_image_manifest(archive_path):
'''
- Attempts to get Image.Id and image name from metadata stored in the image
+ Attempts to get image IDs and image names from metadata stored in the image
archive tar file.
- The tar should contain a file "manifest.json" with an array with a single entry,
- and the entry should have a Config field with the image ID in its file name, as
+ The tar should contain a file "manifest.json" with an array with one or more entries,
+ and every entry should have a Config field with the image ID in its file name, as
well as a RepoTags list, which typically has only one entry.
:raises:
@@ -75,7 +75,7 @@ def archived_image_manifest(archive_path):
:param archive_path: Tar file to read
:type archive_path: str
- :return: None, if no file at archive_path, or the extracted image ID, which will not have a sha256: prefix.
+ :return: None, if no file at archive_path, or a list of ImageArchiveManifestSummary objects.
:rtype: ImageArchiveManifestSummary
'''
@@ -100,44 +100,51 @@ def archived_image_manifest(archive_path):
# In Python 2.6, this does not have __exit__
ef.close()
- if len(manifest) != 1:
+ if len(manifest) == 0:
raise ImageArchiveInvalidException(
- "Expected to have one entry in manifest.json but found %s" % len(manifest),
+ "Expected to have at least one entry in manifest.json but found none",
None
)
- m0 = manifest[0]
-
- try:
- config_file = m0['Config']
- except KeyError as exc:
- raise ImageArchiveInvalidException(
- "Failed to get Config entry from manifest.json: %s" % to_native(exc),
- exc
- )
-
- # Extracts hash without 'sha256:' prefix
- try:
- # Strip off .json filename extension, leaving just the hash.
- image_id = os.path.splitext(config_file)[0]
- except Exception as exc:
- raise ImageArchiveInvalidException(
- "Failed to extract image id from config file name %s: %s" % (config_file, to_native(exc)),
- exc
- )
-
- try:
- repo_tags = m0['RepoTags']
- except KeyError as exc:
- raise ImageArchiveInvalidException(
- "Failed to get RepoTags entry from manifest.json: %s" % to_native(exc),
- exc
- )
-
- return ImageArchiveManifestSummary(
- image_id=image_id,
- repo_tags=repo_tags
- )
+ result = []
+ for index, meta in enumerate(manifest):
+ try:
+ config_file = meta['Config']
+ except KeyError as exc:
+ raise ImageArchiveInvalidException(
+ "Failed to get Config entry from {0}th manifest in manifest.json: {1}".format(index + 1, to_native(exc)),
+ exc
+ )
+
+ # Extracts hash without 'sha256:' prefix
+ try:
+ # Strip off .json filename extension, leaving just the hash.
+ image_id = os.path.splitext(config_file)[0]
+ except Exception as exc:
+ raise ImageArchiveInvalidException(
+ "Failed to extract image id from config file name %s: %s" % (config_file, to_native(exc)),
+ exc
+ )
+
+ for prefix in (
+ 'blobs/sha256/', # Moby 25.0.0, Docker API 1.44
+ ):
+ if image_id.startswith(prefix):
+ image_id = image_id[len(prefix):]
+
+ try:
+ repo_tags = meta['RepoTags']
+ except KeyError as exc:
+ raise ImageArchiveInvalidException(
+ "Failed to get RepoTags entry from {0}th manifest in manifest.json: {1}".format(index + 1, to_native(exc)),
+ exc
+ )
+
+ result.append(ImageArchiveManifestSummary(
+ image_id=image_id,
+ repo_tags=repo_tags
+ ))
+ return result
except ImageArchiveInvalidException:
raise
@@ -155,3 +162,33 @@ def archived_image_manifest(archive_path):
raise
except Exception as exc:
raise ImageArchiveInvalidException("Failed to open tar file %s: %s" % (archive_path, to_native(exc)), exc)
+
+
+def archived_image_manifest(archive_path):
+ '''
+ Attempts to get Image.Id and image name from metadata stored in the image
+ archive tar file.
+
+ The tar should contain a file "manifest.json" with an array with a single entry,
+ and the entry should have a Config field with the image ID in its file name, as
+ well as a RepoTags list, which typically has only one entry.
+
+ :raises:
+ ImageArchiveInvalidException: A file already exists at archive_path, but could not extract an image ID from it.
+
+ :param archive_path: Tar file to read
+ :type archive_path: str
+
+ :return: None, if no file at archive_path, or the extracted image ID, which will not have a sha256: prefix.
+ :rtype: ImageArchiveManifestSummary
+ '''
+
+ results = load_archived_image_manifest(archive_path)
+ if results is None:
+ return None
+ if len(results) == 1:
+ return results[0]
+ raise ImageArchiveInvalidException(
+ "Expected to have one entry in manifest.json but found %s" % len(results),
+ None
+ )
diff --git a/ansible_collections/community/docker/plugins/module_utils/module_container/base.py b/ansible_collections/community/docker/plugins/module_utils/module_container/base.py
index 21c29226e..0f776aa5c 100644
--- a/ansible_collections/community/docker/plugins/module_utils/module_container/base.py
+++ b/ansible_collections/community/docker/plugins/module_utils/module_container/base.py
@@ -19,10 +19,15 @@ from ansible.module_utils.six import string_types
from ansible_collections.community.docker.plugins.module_utils.util import (
clean_dict_booleans_for_docker_api,
+ compare_generic,
normalize_healthcheck,
omit_none_from_dict,
)
+from ansible_collections.community.docker.plugins.module_utils._platform import (
+ compare_platform_strings,
+)
+
from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
parse_env_file,
)
@@ -67,6 +72,7 @@ class Option(object):
not_a_container_option=False,
not_an_ansible_option=False,
copy_comparison_from=None,
+ compare=None,
):
self.name = name
self.type = type
@@ -106,6 +112,11 @@ class Option(object):
self.not_a_container_option = not_a_container_option
self.not_an_ansible_option = not_an_ansible_option
self.copy_comparison_from = copy_comparison_from
+ self.compare = (
+ lambda param_value, container_value: compare(self, param_value, container_value)
+ ) if compare else (
+ lambda param_value, container_value: compare_generic(param_value, container_value, self.comparison, self.comparison_type)
+ )
class OptionGroup(object):
@@ -166,17 +177,21 @@ class OptionGroup(object):
class Engine(object):
min_api_version = None # string or None
min_api_version_obj = None # LooseVersion object or None
+ extra_option_minimal_versions = None # dict[str, dict[str, Any]] or None
@abc.abstractmethod
- def get_value(self, module, container, api_version, options):
+ def get_value(self, module, container, api_version, options, image, host_info):
pass
+ def compare_value(self, option, param_value, container_value):
+ return option.compare(param_value, container_value)
+
@abc.abstractmethod
def set_value(self, module, data, api_version, options, values):
pass
@abc.abstractmethod
- def get_expected_values(self, module, client, api_version, options, image, values):
+ def get_expected_values(self, module, client, api_version, options, image, values, host_info):
pass
@abc.abstractmethod
@@ -199,6 +214,14 @@ class Engine(object):
def can_update_value(self, api_version):
pass
+ @abc.abstractmethod
+ def needs_container_image(self, values):
+ pass
+
+ @abc.abstractmethod
+ def needs_host_info(self, values):
+ pass
+
class EngineDriver(object):
name = None # string
@@ -209,6 +232,10 @@ class EngineDriver(object):
pass
@abc.abstractmethod
+ def get_host_info(self, client):
+ pass
+
+ @abc.abstractmethod
def get_api_version(self, client):
pass
@@ -483,6 +510,8 @@ def _preprocess_networks(module, values):
parsed_link = (link, link)
parsed_links.append(tuple(parsed_link))
network['links'] = parsed_links
+ if network['mac_address']:
+ network['mac_address'] = network['mac_address'].replace('-', ':')
return values
@@ -733,6 +762,15 @@ def _preprocess_ports(module, values):
return values
+def _compare_platform(option, param_value, container_value):
+ if option.comparison == 'ignore':
+ return True
+ try:
+ return compare_platform_strings(param_value, container_value)
+ except ValueError:
+ return param_value == container_value
+
+
OPTION_AUTO_REMOVE = (
OptionGroup()
.add_option('auto_remove', type='bool')
@@ -910,7 +948,7 @@ OPTION_HOSTNAME = (
)
OPTION_IMAGE = (
- OptionGroup(preprocess=_preprocess_networks)
+ OptionGroup()
.add_option('image', type='str')
)
@@ -984,6 +1022,7 @@ OPTION_NETWORK = (
ipv6_address=dict(type='str'),
aliases=dict(type='list', elements='str'),
links=dict(type='list', elements='str'),
+ mac_address=dict(type='str'),
))
)
@@ -1009,7 +1048,7 @@ OPTION_PIDS_LIMIT = (
OPTION_PLATFORM = (
OptionGroup()
- .add_option('platform', type='str')
+ .add_option('platform', type='str', compare=_compare_platform)
)
OPTION_PRIVILEGED = (
diff --git a/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py b/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py
index cccf72df4..61a5500c9 100644
--- a/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py
+++ b/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py
@@ -17,6 +17,11 @@ from ansible_collections.community.docker.plugins.module_utils.common_api import
RequestException,
)
+from ansible_collections.community.docker.plugins.module_utils._platform import (
+ compose_platform_string,
+ normalize_platform_string,
+)
+
from ansible_collections.community.docker.plugins.module_utils.module_container.base import (
OPTION_AUTO_REMOVE,
OPTION_BLKIO_WEIGHT,
@@ -165,6 +170,8 @@ class DockerAPIEngineDriver(EngineDriver):
for option in options.options:
if not option.not_an_ansible_option:
option_minimal_versions[option.name] = {'docker_api_version': engine.min_api_version}
+ if engine.extra_option_minimal_versions:
+ option_minimal_versions.update(engine.extra_option_minimal_versions)
active_options.append(options)
@@ -181,6 +188,9 @@ class DockerAPIEngineDriver(EngineDriver):
return client.module, active_options, client
+ def get_host_info(self, client):
+ return client.info()
+
def get_api_version(self, client):
return client.docker_api_version
@@ -216,7 +226,7 @@ class DockerAPIEngineDriver(EngineDriver):
return client.get_container_by_id(container_id)
def inspect_image_by_id(self, client, image_id):
- return client.find_image_by_id(image_id)
+ return client.find_image_by_id(image_id, accept_missing_image=True)
def inspect_image_by_name(self, client, repository, tag):
return client.find_image(repository, tag)
@@ -236,7 +246,13 @@ class DockerAPIEngineDriver(EngineDriver):
def connect_container_to_network(self, client, container_id, network_id, parameters=None):
parameters = (parameters or {}).copy()
params = {}
- for para, dest_para in {'ipv4_address': 'IPv4Address', 'ipv6_address': 'IPv6Address', 'links': 'Links', 'aliases': 'Aliases'}.items():
+ for para, dest_para in {
+ 'ipv4_address': 'IPv4Address',
+ 'ipv6_address': 'IPv6Address',
+ 'links': 'Links',
+ 'aliases': 'Aliases',
+ 'mac_address': 'MacAddress',
+ }.items():
value = parameters.pop(para, None)
if value:
if para == 'links':
@@ -387,18 +403,27 @@ class DockerAPIEngine(Engine):
can_set_value=None,
can_update_value=None,
min_api_version=None,
+ compare_value=None,
+ needs_container_image=None,
+ needs_host_info=None,
+ extra_option_minimal_versions=None,
):
self.min_api_version = min_api_version
self.min_api_version_obj = None if min_api_version is None else LooseVersion(min_api_version)
self.get_value = get_value
self.set_value = set_value
- self.get_expected_values = get_expected_values or (lambda module, client, api_version, options, image, values: values)
+ self.get_expected_values = get_expected_values or (lambda module, client, api_version, options, image, values, host_info: values)
self.ignore_mismatching_result = ignore_mismatching_result or \
(lambda module, client, api_version, option, image, container_value, expected_value: False)
self.preprocess_value = preprocess_value or (lambda module, client, api_version, options, values: values)
self.update_value = update_value
self.can_set_value = can_set_value or (lambda api_version: set_value is not None)
self.can_update_value = can_update_value or (lambda api_version: update_value is not None)
+ self.needs_container_image = needs_container_image or (lambda values: False)
+ self.needs_host_info = needs_host_info or (lambda values: False)
+ if compare_value is not None:
+ self.compare_value = compare_value
+ self.extra_option_minimal_versions = extra_option_minimal_versions
@classmethod
def config_value(
@@ -423,7 +448,7 @@ class DockerAPIEngine(Engine):
values[options[0].name] = value
return values
- def get_value(module, container, api_version, options):
+ def get_value(module, container, api_version, options, image, host_info):
if len(options) != 1:
raise AssertionError('config_value can only be used for a single option')
value = container['Config'].get(config_name, _SENTRY)
@@ -435,7 +460,7 @@ class DockerAPIEngine(Engine):
get_expected_values_ = None
if get_expected_value:
- def get_expected_values_(module, client, api_version, options, image, values):
+ def get_expected_values_(module, client, api_version, options, image, values, host_info):
if len(options) != 1:
raise AssertionError('host_config_value can only be used for a single option')
value = values.get(options[0].name, _SENTRY)
@@ -499,7 +524,7 @@ class DockerAPIEngine(Engine):
values[options[0].name] = value
return values
- def get_value(module, container, api_version, options):
+ def get_value(module, container, api_version, options, get_value, host_info):
if len(options) != 1:
raise AssertionError('host_config_value can only be used for a single option')
value = container['HostConfig'].get(host_config_name, _SENTRY)
@@ -511,7 +536,7 @@ class DockerAPIEngine(Engine):
get_expected_values_ = None
if get_expected_value:
- def get_expected_values_(module, client, api_version, options, image, values):
+ def get_expected_values_(module, client, api_version, options, image, values, host_info):
if len(options) != 1:
raise AssertionError('host_config_value can only be used for a single option')
value = values.get(options[0].name, _SENTRY)
@@ -585,7 +610,7 @@ def _get_default_host_ip(module, client):
return ip
-def _get_value_detach_interactive(module, container, api_version, options):
+def _get_value_detach_interactive(module, container, api_version, options, image, host_info):
attach_stdin = container['Config'].get('OpenStdin')
attach_stderr = container['Config'].get('AttachStderr')
attach_stdout = container['Config'].get('AttachStdout')
@@ -836,7 +861,7 @@ def _get_network_id(module, client, network_name):
client.fail("Error getting network id for %s - %s" % (network_name, to_native(exc)))
-def _get_values_network(module, container, api_version, options):
+def _get_values_network(module, container, api_version, options, image, host_info):
value = container['HostConfig'].get('NetworkMode', _SENTRY)
if value is _SENTRY:
return {}
@@ -852,7 +877,7 @@ def _set_values_network(module, data, api_version, options, values):
data['HostConfig']['NetworkMode'] = value
-def _get_values_mounts(module, container, api_version, options):
+def _get_values_mounts(module, container, api_version, options, image, host_info):
volumes = container['Config'].get('Volumes')
binds = container['HostConfig'].get('Binds')
# According to https://github.com/moby/moby/, support for HostConfig.Mounts
@@ -916,7 +941,7 @@ def _get_image_binds(volumes):
return results
-def _get_expected_values_mounts(module, client, api_version, options, image, values):
+def _get_expected_values_mounts(module, client, api_version, options, image, values, host_info):
expected_values = {}
# binds
@@ -1017,7 +1042,7 @@ def _set_values_mounts(module, data, api_version, options, values):
data['HostConfig']['Binds'] = values['volume_binds']
-def _get_values_log(module, container, api_version, options):
+def _get_values_log(module, container, api_version, options, image, host_info):
log_config = container['HostConfig'].get('LogConfig') or {}
return {
'log_driver': log_config.get('Type'),
@@ -1037,18 +1062,50 @@ def _set_values_log(module, data, api_version, options, values):
data['HostConfig']['LogConfig'] = log_config
-def _get_values_platform(module, container, api_version, options):
+def _get_values_platform(module, container, api_version, options, image, host_info):
+ if image and (image.get('Os') or image.get('Architecture') or image.get('Variant')):
+ return {
+ 'platform': compose_platform_string(
+ os=image.get('Os'),
+ arch=image.get('Architecture'),
+ variant=image.get('Variant'),
+ daemon_os=host_info.get('OSType') if host_info else None,
+ daemon_arch=host_info.get('Architecture') if host_info else None,
+ )
+ }
return {
'platform': container.get('Platform'),
}
+def _get_expected_values_platform(module, client, api_version, options, image, values, host_info):
+ expected_values = {}
+ if 'platform' in values:
+ try:
+ expected_values['platform'] = normalize_platform_string(
+ values['platform'],
+ daemon_os=host_info.get('OSType') if host_info else None,
+ daemon_arch=host_info.get('Architecture') if host_info else None,
+ )
+ except ValueError as exc:
+ module.fail_json(msg='Error while parsing platform parameer: %s' % (to_native(exc), ))
+ return expected_values
+
+
def _set_values_platform(module, data, api_version, options, values):
if 'platform' in values:
data['platform'] = values['platform']
-def _get_values_restart(module, container, api_version, options):
+def _needs_container_image_platform(values):
+ return 'platform' in values
+
+
+def _needs_host_info_platform(values):
+ return 'platform' in values
+
+
+def _get_values_restart(module, container, api_version, options, image, host_info):
restart_policy = container['HostConfig'].get('RestartPolicy') or {}
return {
'restart_policy': restart_policy.get('Name'),
@@ -1077,7 +1134,7 @@ def _update_value_restart(module, data, api_version, options, values):
}
-def _get_values_ports(module, container, api_version, options):
+def _get_values_ports(module, container, api_version, options, image, host_info):
host_config = container['HostConfig']
config = container['Config']
@@ -1094,7 +1151,7 @@ def _get_values_ports(module, container, api_version, options):
}
-def _get_expected_values_ports(module, client, api_version, options, image, values):
+def _get_expected_values_ports(module, client, api_version, options, image, values, host_info):
expected_values = {}
if 'published_ports' in values:
@@ -1283,6 +1340,12 @@ OPTION_NETWORK.add_engine('docker_api', DockerAPIEngine(
get_value=_get_values_network,
set_value=_set_values_network,
ignore_mismatching_result=_ignore_mismatching_network_result,
+ extra_option_minimal_versions={
+ 'networks.mac_address': {
+ 'docker_api_version': '1.44',
+ 'detect_usage': lambda c: any(net_info.get('mac_address') is not None for net_info in (c.module.params['networks'] or [])),
+ },
+ },
))
OPTION_OOM_KILLER.add_engine('docker_api', DockerAPIEngine.host_config_value('OomKillDisable'))
@@ -1296,6 +1359,9 @@ OPTION_PIDS_LIMIT.add_engine('docker_api', DockerAPIEngine.host_config_value('Pi
OPTION_PLATFORM.add_engine('docker_api', DockerAPIEngine(
get_value=_get_values_platform,
set_value=_set_values_platform,
+ get_expected_values=_get_expected_values_platform,
+ needs_container_image=_needs_container_image_platform,
+ needs_host_info=_needs_host_info_platform,
min_api_version='1.41',
))
diff --git a/ansible_collections/community/docker/plugins/module_utils/module_container/module.py b/ansible_collections/community/docker/plugins/module_utils/module_container/module.py
index 230dbfb40..5d819efa4 100644
--- a/ansible_collections/community/docker/plugins/module_utils/module_container/module.py
+++ b/ansible_collections/community/docker/plugins/module_utils/module_container/module.py
@@ -78,6 +78,11 @@ class ContainerManager(DockerBaseClass):
self.param_output_logs = self.module.params['output_logs']
self.param_paused = self.module.params['paused']
self.param_pull = self.module.params['pull']
+ if self.param_pull is True:
+ self.param_pull = 'always'
+ if self.param_pull is False:
+ self.param_pull = 'missing'
+ self.param_pull_check_mode_behavior = self.module.params['pull_check_mode_behavior']
self.param_recreate = self.module.params['recreate']
self.param_removal_wait_timeout = self.module.params['removal_wait_timeout']
self.param_restart = self.module.params['restart']
@@ -132,7 +137,7 @@ class ContainerManager(DockerBaseClass):
self.all_options['image'].comparison = 'ignore'
if self.module.params['purge_networks']:
self.all_options['networks'].comparison = 'strict'
- # Process comparsions specified by user
+ # Process comparisons specified by user
if self.module.params.get('comparisons'):
# If '*' appears in comparisons, process it first
if '*' in self.module.params['comparisons']:
@@ -268,6 +273,20 @@ class ContainerManager(DockerBaseClass):
parameters.append((options, values))
return parameters
+ def _needs_container_image(self):
+ for options, values in self.parameters:
+ engine = options.get_engine(self.engine_driver.name)
+ if engine.needs_container_image(values):
+ return True
+ return False
+
+ def _needs_host_info(self):
+ for options, values in self.parameters:
+ engine = options.get_engine(self.engine_driver.name)
+ if engine.needs_host_info(values):
+ return True
+ return False
+
def present(self, state):
self.parameters = self._collect_params(self.options)
container = self._get_container(self.param_name)
@@ -280,8 +299,10 @@ class ContainerManager(DockerBaseClass):
# the container already runs or not; in the former case, in case the
# container needs to be restarted, we use the existing container's
# image ID.
- image, comparison_image = self._get_image(container)
+ image, container_image, comparison_image = self._get_image(
+ container, needs_container_image=self._needs_container_image())
self.log(image, pretty_print=True)
+ host_info = self.engine_driver.get_host_info(self.client) if self._needs_host_info() else None
if not container.exists or container.removing:
# New container
if container.removing:
@@ -301,13 +322,24 @@ class ContainerManager(DockerBaseClass):
container_created = True
else:
# Existing container
- different, differences = self.has_different_configuration(container, comparison_image)
+ different, differences = self.has_different_configuration(container, container_image, comparison_image, host_info)
image_different = False
if self.all_options['image'].comparison == 'strict':
image_different = self._image_is_different(image, container)
- if self.param_image_name_mismatch == 'recreate' and self.param_image is not None and self.param_image != container.image_name:
- different = True
- self.diff_tracker.add('image_name', parameter=self.param_image, active=container.image_name)
+ if self.param_image_name_mismatch != 'ignore' and self.param_image is not None and self.param_image != container.image_name:
+ if self.param_image_name_mismatch == 'recreate':
+ different = True
+ self.diff_tracker.add('image_name', parameter=self.param_image, active=container.image_name)
+ else:
+ # The default has been deprecated!
+ self.module.deprecate(
+ 'The default value "ignore" for image_name_mismatch has been deprecated and will change to "recreate"'
+ ' in community.docker 4.0.0. In the current situation, this would cause the container to be recreated'
+ ' since the current container\'s image name "{active}" does not match the desired image name "{parameter}".'.format(
+ parameter=self.param_image, active=container.image_name),
+ version='4.0.0',
+ collection_name='community.docker',
+ )
if image_different or different or self.param_recreate:
self.diff_tracker.merge(differences)
self.diff['differences'] = differences.get_legacy_docker_container_diffs()
@@ -333,7 +365,7 @@ class ContainerManager(DockerBaseClass):
comparison_image = image
if container and container.exists:
- container = self.update_limits(container, comparison_image)
+ container = self.update_limits(container, container_image, comparison_image, host_info)
container = self.update_networks(container, container_created)
if state == 'started' and not container.running:
@@ -398,45 +430,58 @@ class ContainerManager(DockerBaseClass):
image = self.engine_driver.inspect_image_by_name(self.client, repository, tag)
return image or fallback
- def _get_image(self, container):
+ def _get_image(self, container, needs_container_image=False):
image_parameter = self.param_image
+ get_container_image = needs_container_image or not image_parameter
+ container_image = self._get_container_image(container) if get_container_image else None
+ if container_image:
+ self.log("current image")
+ self.log(container_image, pretty_print=True)
if not image_parameter:
self.log('No image specified')
- return None, self._get_container_image(container)
+ return None, container_image, container_image
if is_image_name_id(image_parameter):
image = self.engine_driver.inspect_image_by_id(self.client, image_parameter)
+ if image is None:
+ self.client.fail("Cannot find image with ID %s" % (image_parameter, ))
else:
repository, tag = parse_repository_tag(image_parameter)
if not tag:
tag = "latest"
image = self.engine_driver.inspect_image_by_name(self.client, repository, tag)
- if not image or self.param_pull:
+ if not image and self.param_pull == "never":
+ self.client.fail("Cannot find image with name %s:%s, and pull=never" % (repository, tag))
+ if not image or self.param_pull == "always":
if not self.check_mode:
self.log("Pull the image.")
image, alreadyToLatest = self.engine_driver.pull_image(
self.client, repository, tag, platform=self.module.params['platform'])
if alreadyToLatest:
self.results['changed'] = False
+ self.results['actions'].append(dict(pulled_image="%s:%s" % (repository, tag), changed=False))
else:
self.results['changed'] = True
- self.results['actions'].append(dict(pulled_image="%s:%s" % (repository, tag)))
- elif not image:
- # If the image isn't there, claim we'll pull.
- # (Implicitly: if the image is there, claim it already was latest.)
+ self.results['actions'].append(dict(pulled_image="%s:%s" % (repository, tag), changed=True))
+ elif not image or self.param_pull_check_mode_behavior == 'always':
+ # If the image isn't there, or pull_check_mode_behavior == 'always', claim we'll
+ # pull. (Implicitly: if the image is there, claim it already was latest unless
+ # pull_check_mode_behavior == 'always'.)
self.results['changed'] = True
- self.results['actions'].append(dict(pulled_image="%s:%s" % (repository, tag)))
+ action = dict(pulled_image="%s:%s" % (repository, tag))
+ if not image:
+ action['changed'] = True
+ self.results['actions'].append(action)
self.log("image")
self.log(image, pretty_print=True)
comparison_image = image
if self.param_image_comparison == 'current-image':
- comparison_image = self._get_container_image(container, image)
- if comparison_image != image:
- self.log("current image")
- self.log(comparison_image, pretty_print=True)
+ if not get_container_image:
+ container_image = self._get_container_image(container)
+ comparison_image = container_image
- return image, comparison_image
+ return image, container_image, comparison_image
def _image_is_different(self, image, container):
if image and image.get('Id'):
@@ -455,15 +500,16 @@ class ContainerManager(DockerBaseClass):
params['Image'] = image
return params
- def _record_differences(self, differences, options, param_values, engine, container, image):
- container_values = engine.get_value(self.module, container.raw, self.engine_driver.get_api_version(self.client), options.options)
+ def _record_differences(self, differences, options, param_values, engine, container, container_image, image, host_info):
+ container_values = engine.get_value(
+ self.module, container.raw, self.engine_driver.get_api_version(self.client), options.options, container_image, host_info)
expected_values = engine.get_expected_values(
- self.module, self.client, self.engine_driver.get_api_version(self.client), options.options, image, param_values.copy())
+ self.module, self.client, self.engine_driver.get_api_version(self.client), options.options, image, param_values.copy(), host_info)
for option in options.options:
if option.name in expected_values:
param_value = expected_values[option.name]
container_value = container_values.get(option.name)
- match = compare_generic(param_value, container_value, option.comparison, option.comparison_type)
+ match = engine.compare_value(option, param_value, container_value)
if not match:
# No match.
@@ -497,28 +543,28 @@ class ContainerManager(DockerBaseClass):
c = sorted(c, key=sort_key_fn)
differences.add(option.name, parameter=p, active=c)
- def has_different_configuration(self, container, image):
+ def has_different_configuration(self, container, container_image, image, host_info):
differences = DifferenceTracker()
update_differences = DifferenceTracker()
for options, param_values in self.parameters:
engine = options.get_engine(self.engine_driver.name)
if engine.can_update_value(self.engine_driver.get_api_version(self.client)):
- self._record_differences(update_differences, options, param_values, engine, container, image)
+ self._record_differences(update_differences, options, param_values, engine, container, container_image, image, host_info)
else:
- self._record_differences(differences, options, param_values, engine, container, image)
+ self._record_differences(differences, options, param_values, engine, container, container_image, image, host_info)
has_differences = not differences.empty
# Only consider differences of properties that can be updated when there are also other differences
if has_differences:
differences.merge(update_differences)
return has_differences, differences
- def has_different_resource_limits(self, container, image):
+ def has_different_resource_limits(self, container, container_image, image, host_info):
differences = DifferenceTracker()
for options, param_values in self.parameters:
engine = options.get_engine(self.engine_driver.name)
if not engine.can_update_value(self.engine_driver.get_api_version(self.client)):
continue
- self._record_differences(differences, options, param_values, engine, container, image)
+ self._record_differences(differences, options, param_values, engine, container, container_image, image, host_info)
has_differences = not differences.empty
return has_differences, differences
@@ -531,8 +577,8 @@ class ContainerManager(DockerBaseClass):
engine.update_value(self.module, result, self.engine_driver.get_api_version(self.client), options.options, values)
return result
- def update_limits(self, container, image):
- limits_differ, different_limits = self.has_different_resource_limits(container, image)
+ def update_limits(self, container, container_image, image, host_info):
+ limits_differ, different_limits = self.has_different_resource_limits(container, container_image, image, host_info)
if limits_differ:
self.log("limit differences:")
self.log(different_limits.get_legacy_docker_container_diffs(), pretty_print=True)
@@ -580,6 +626,8 @@ class ContainerManager(DockerBaseClass):
expected_links.append("%s:%s" % (link, alias))
if not compare_generic(expected_links, network_info.get('Links'), 'allow_more_present', 'set'):
diff = True
+ if network.get('mac_address') and network['mac_address'] != network_info.get('MacAddress'):
+ diff = True
if diff:
different = True
differences.append(dict(
@@ -589,7 +637,8 @@ class ContainerManager(DockerBaseClass):
ipv4_address=network_info_ipam.get('IPv4Address'),
ipv6_address=network_info_ipam.get('IPv6Address'),
aliases=network_info.get('Aliases'),
- links=network_info.get('Links')
+ links=network_info.get('Links'),
+ mac_address=network_info.get('MacAddress'),
)
))
return different, differences
@@ -816,14 +865,15 @@ def run_module(engine_driver):
image=dict(type='str'),
image_comparison=dict(type='str', choices=['desired-image', 'current-image'], default='desired-image'),
image_label_mismatch=dict(type='str', choices=['ignore', 'fail'], default='ignore'),
- image_name_mismatch=dict(type='str', choices=['ignore', 'recreate'], default='ignore'),
+ image_name_mismatch=dict(type='str', choices=['ignore', 'recreate']),
keep_volumes=dict(type='bool', default=True),
kill_signal=dict(type='str'),
name=dict(type='str', required=True),
networks_cli_compatible=dict(type='bool', default=True),
output_logs=dict(type='bool', default=False),
paused=dict(type='bool'),
- pull=dict(type='bool', default=False),
+ pull=dict(type='raw', choices=['never', 'missing', 'always', True, False], default='missing'),
+ pull_check_mode_behavior=dict(type='str', choices=['image_not_present', 'always'], default='image_not_present'),
purge_networks=dict(type='bool', default=False, removed_in_version='4.0.0', removed_from_collection='community.docker'),
recreate=dict(type='bool', default=False),
removal_wait_timeout=dict(type='float'),
diff --git a/ansible_collections/community/docker/plugins/module_utils/util.py b/ansible_collections/community/docker/plugins/module_utils/util.py
index 9c6b738c6..efd3301f1 100644
--- a/ansible_collections/community/docker/plugins/module_utils/util.py
+++ b/ansible_collections/community/docker/plugins/module_utils/util.py
@@ -6,6 +6,7 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
+import json
import re
from datetime import timedelta
@@ -14,7 +15,7 @@ from ansible.module_utils.common.collections import is_sequence
from ansible.module_utils.six.moves.urllib.parse import urlparse
-DEFAULT_DOCKER_HOST = 'unix://var/run/docker.sock'
+DEFAULT_DOCKER_HOST = 'unix:///var/run/docker.sock'
DEFAULT_TLS = False
DEFAULT_TLS_VERIFY = False
DEFAULT_TLS_HOSTNAME = 'localhost' # deprecated
@@ -25,7 +26,7 @@ DOCKER_COMMON_ARGS = dict(
tls_hostname=dict(type='str', fallback=(env_fallback, ['DOCKER_TLS_HOSTNAME'])),
api_version=dict(type='str', default='auto', fallback=(env_fallback, ['DOCKER_API_VERSION']), aliases=['docker_api_version']),
timeout=dict(type='int', default=DEFAULT_TIMEOUT_SECONDS, fallback=(env_fallback, ['DOCKER_TIMEOUT'])),
- ca_cert=dict(type='path', aliases=['tls_ca_cert', 'cacert_path']),
+ ca_path=dict(type='path', aliases=['ca_cert', 'tls_ca_cert', 'cacert_path']),
client_cert=dict(type='path', aliases=['tls_client_cert', 'cert_path']),
client_key=dict(type='path', aliases=['tls_client_key', 'key_path']),
ssl_version=dict(type='str', fallback=(env_fallback, ['DOCKER_SSL_VERSION'])),
@@ -85,6 +86,19 @@ def sanitize_result(data):
return data
+def log_debug(msg, pretty_print=False):
+ """Write a log message to docker.log.
+
+ If ``pretty_print=True``, the message will be pretty-printed as JSON.
+ """
+ with open('docker.log', 'a') as log_file:
+ if pretty_print:
+ log_file.write(json.dumps(msg, sort_keys=True, indent=4, separators=(',', ': ')))
+ log_file.write(u'\n')
+ else:
+ log_file.write(msg + u'\n')
+
+
class DockerBaseClass(object):
def __init__(self):
self.debug = False
@@ -92,12 +106,7 @@ class DockerBaseClass(object):
def log(self, msg, pretty_print=False):
pass
# if self.debug:
- # log_file = open('docker.log', 'a')
- # if pretty_print:
- # log_file.write(json.dumps(msg, sort_keys=True, indent=4, separators=(',', ': ')))
- # log_file.write(u'\n')
- # else:
- # log_file.write(msg + u'\n')
+ # log_debug(msg, pretty_print=pretty_print)
def update_tls_hostname(result, old_behavior=False, deprecate_function=None, uses_tls=True):
diff --git a/ansible_collections/community/docker/plugins/modules/current_container_facts.py b/ansible_collections/community/docker/plugins/modules/current_container_facts.py
index f2cde2b59..2daf60bb0 100644
--- a/ansible_collections/community/docker/plugins/modules/current_container_facts.py
+++ b/ansible_collections/community/docker/plugins/modules/current_container_facts.py
@@ -58,10 +58,10 @@ ansible_facts:
description:
- The detected container environment.
- Contains an empty string if no container was detected, or a non-empty string identifying the container environment.
- - C(docker) indicates that the module ran inside a regular Docker container.
- - C(azure_pipelines) indicates that the module ran on Azure Pipelines. This seems to no longer be reported.
- - C(github_actions) indicates that the module ran inside a Docker container on GitHub Actions. It is supported since community.docker 2.4.0.
- - C(podman) indicates that the module ran inside a regular Podman container. It is supported since community.docker 3.3.0.
+ - V(docker) indicates that the module ran inside a regular Docker container.
+ - V(azure_pipelines) indicates that the module ran on Azure Pipelines. This seems to no longer be reported.
+ - V(github_actions) indicates that the module ran inside a Docker container on GitHub Actions. It is supported since community.docker 2.4.0.
+ - V(podman) indicates that the module ran inside a regular Podman container. It is supported since community.docker 3.3.0.
returned: always
type: str
choices:
diff --git a/ansible_collections/community/docker/plugins/modules/docker_compose.py b/ansible_collections/community/docker/plugins/modules/docker_compose.py
index 01db6a22f..f8edbee4b 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_compose.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_compose.py
@@ -12,13 +12,14 @@ DOCUMENTATION = '''
module: docker_compose
-short_description: Manage multi-container Docker applications with Docker Compose.
+short_description: Manage multi-container Docker applications with Docker Compose V1
author: "Chris Houseknecht (@chouseknecht)"
description:
- Uses Docker Compose to start, shutdown and scale services. B(This module requires docker-compose < 2.0.0.)
- - Configuration can be read from a C(docker-compose.yml) or C(docker-compose.yaml) file or inline using the I(definition) option.
+ Use the M(community.docker.docker_compose_v2) module for using the modern Docker compose CLI plugin.
+ - Configuration can be read from a C(docker-compose.yml) or C(docker-compose.yaml) file or inline using the O(definition) option.
- See the examples for more details.
- Supports check mode.
- This module was called C(docker_service) before Ansible 2.8. The usage did not change.
@@ -39,27 +40,27 @@ options:
project_src:
description:
- Path to a directory containing a C(docker-compose.yml) or C(docker-compose.yaml) file.
- - Mutually exclusive with I(definition).
- - Required when no I(definition) is provided.
+ - Mutually exclusive with O(definition).
+ - Required when no O(definition) is provided.
type: path
project_name:
description:
- - Provide a project name. If not provided, the project name is taken from the basename of I(project_src).
- - Required when I(definition) is provided.
+ - Provide a project name. If not provided, the project name is taken from the basename of O(project_src).
+ - Required when O(definition) is provided.
type: str
env_file:
description:
- - By default environment files are loaded from a C(.env) file located directly under the I(project_src) directory.
- - I(env_file) can be used to specify the path of a custom environment file instead.
- - The path is relative to the I(project_src) directory.
+ - By default environment files are loaded from a C(.env) file located directly under the O(project_src) directory.
+ - O(env_file) can be used to specify the path of a custom environment file instead.
+ - The path is relative to the O(project_src) directory.
- Requires C(docker-compose) version 1.25.0 or greater.
- "Note: C(docker-compose) versions C(<=1.28) load the env file from the current working directory of the
- C(docker-compose) command rather than I(project_src)."
+ C(docker-compose) command rather than O(project_src)."
type: path
version_added: 1.9.0
files:
description:
- - List of Compose file names relative to I(project_src). Overrides C(docker-compose.yml) or C(docker-compose.yaml).
+ - List of Compose file names relative to O(project_src). Overrides C(docker-compose.yml) or C(docker-compose.yaml).
- Files are loaded and merged in the order given.
type: list
elements: path
@@ -74,9 +75,9 @@ options:
state:
description:
- Desired state of the project.
- - Specifying C(present) is the same as running C(docker-compose up) resp. C(docker-compose stop) (with I(stopped)) resp. C(docker-compose restart)
- (with I(restarted)).
- - Specifying C(absent) is the same as running C(docker-compose down).
+ - Specifying V(present) is the same as running C(docker-compose up) resp. C(docker-compose stop) (with O(stopped=true)) resp. C(docker-compose restart)
+ (with O(restarted=true)).
+ - Specifying V(absent) is the same as running C(docker-compose down).
type: str
default: present
choices:
@@ -84,25 +85,25 @@ options:
- present
services:
description:
- - When I(state) is C(present) run C(docker-compose up) resp. C(docker-compose stop) (with I(stopped)) resp. C(docker-compose restart) (with I(restarted))
- on a subset of services.
- - If empty, which is the default, the operation will be performed on all services defined in the Compose file (or inline I(definition)).
+ - When O(state) is V(present) run C(docker-compose up) resp. C(docker-compose stop) (with O(stopped=true)) resp.
+ C(docker-compose restart) (with O(restarted=true)) on a subset of services.
+ - If empty, which is the default, the operation will be performed on all services defined in the Compose file (or inline O(definition)).
type: list
elements: str
scale:
description:
- - When I(state) is C(present) scale services. Provide a dictionary of key/value pairs where the key
+ - When O(state) is V(present) scale services. Provide a dictionary of key/value pairs where the key
is the name of the service and the value is an integer count for the number of containers.
type: dict
dependencies:
description:
- - When I(state) is C(present) specify whether or not to include linked services.
+ - When O(state) is V(present) specify whether or not to include linked services.
type: bool
default: true
definition:
description:
- Compose file describing one or more services, networks and volumes.
- - Mutually exclusive with I(project_src) and I(files).
+ - Mutually exclusive with O(project_src) and O(files).
type: dict
hostname_check:
description:
@@ -112,8 +113,8 @@ options:
recreate:
description:
- By default containers will be recreated when their configuration differs from the service definition.
- - Setting to C(never) ignores configuration differences and leaves existing containers unchanged.
- - Setting to C(always) forces recreation of all existing containers.
+ - Setting to V(never) ignores configuration differences and leaves existing containers unchanged.
+ - Setting to V(always) forces recreation of all existing containers.
type: str
default: smart
choices:
@@ -122,49 +123,49 @@ options:
- smart
build:
description:
- - Use with I(state) C(present) to always build images prior to starting the application.
+ - Use with O(state=present) to always build images prior to starting the application.
- Same as running C(docker-compose build) with the pull option.
- Images will only be rebuilt if Docker detects a change in the Dockerfile or build directory contents.
- - Use the I(nocache) option to ignore the image cache when performing the build.
- - If an existing image is replaced, services using the image will be recreated unless I(recreate) is C(never).
+ - Use the O(nocache) option to ignore the image cache when performing the build.
+ - If an existing image is replaced, services using the image will be recreated unless O(recreate=never).
type: bool
default: false
pull:
description:
- - Use with I(state) C(present) to always pull images prior to starting the application.
+ - Use with O(state=present) to always pull images prior to starting the application.
- Same as running C(docker-compose pull).
- - When a new image is pulled, services using the image will be recreated unless I(recreate) is C(never).
+ - When a new image is pulled, services using the image will be recreated unless O(recreate=never).
type: bool
default: false
nocache:
description:
- - Use with the I(build) option to ignore the cache during the image build process.
+ - Use with the O(build) option to ignore the cache during the image build process.
type: bool
default: false
remove_images:
description:
- - Use with I(state) C(absent) to remove all images or only local images.
+ - Use with O(state=absent) to remove all images or only local images.
type: str
choices:
- 'all'
- 'local'
remove_volumes:
description:
- - Use with I(state) C(absent) to remove data volumes.
+ - Use with O(state=absent) to remove data volumes.
type: bool
default: false
stopped:
description:
- - Use with I(state) C(present) to stop all containers defined in the Compose file.
- - If I(services) is defined, only the containers listed there will be stopped.
+ - Use with O(state=present) to stop all containers defined in the Compose file.
+ - If O(services) is defined, only the containers listed there will be stopped.
- Requires C(docker-compose) version 1.17.0 or greater for full support. For older versions, the services will
first be started and then stopped when the service is supposed to be created as stopped.
type: bool
default: false
restarted:
description:
- - Use with I(state) C(present) to restart all containers defined in the Compose file.
- - If I(services) is defined, only the containers listed there will be restarted.
+ - Use with O(state=present) to restart all containers defined in the Compose file.
+ - If O(services) is defined, only the containers listed there will be restarted.
type: bool
default: false
remove_orphans:
@@ -175,8 +176,8 @@ options:
timeout:
description:
- Timeout in seconds for container shutdown when attached or when containers are already running.
- - By default C(compose) will use a C(10s) timeout unless C(default_grace_period) is defined for a
- particular service in the I(project_src).
+ - By default C(docker-compose) will use a V(10) seconds timeout unless C(default_grace_period) is defined for a
+ particular service in the O(project_src).
type: int
default: null
use_ssh_client:
@@ -184,10 +185,13 @@ options:
- Currently ignored for this module, but might suddenly be supported later on.
requirements:
- - "L(Docker SDK for Python,https://docker-py.readthedocs.io/en/stable/) >= 1.8.0"
+ - "L(Docker SDK for Python,https://docker-py.readthedocs.io/en/stable/) >= 1.8.0, < 7. Docker SDK for Python 7+ is incompatible to docker-compose v1."
- "docker-compose >= 1.7.0, < 2.0.0"
- "Docker API >= 1.25"
- "PyYAML >= 3.11"
+
+seealso:
+ - module: community.docker.docker_compose_v2
'''
EXAMPLES = '''
@@ -236,7 +240,7 @@ EXAMPLES = '''
ansible.builtin.debug:
var: output
- - name: Verify that web and db services are running
+ - name: Verify that web and db services are not running
ansible.builtin.assert:
that:
- "not output.services.web.flask_web_1.state.running"
@@ -440,7 +444,7 @@ services:
actions:
description: Provides the actions to be taken on each service as determined by compose.
- returned: when in check mode or I(debug) is C(true)
+ returned: when in check mode or O(debug=true)
type: complex
contains:
service_name:
diff --git a/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py b/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py
new file mode 100644
index 000000000..29bb81ad9
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py
@@ -0,0 +1,638 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# Copyright (c) 2023, Léo El Amri (@lel-amri)
+# Copyright 2016 Red Hat | Ansible
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+
+module: docker_compose_v2
+
+short_description: Manage multi-container Docker applications with Docker Compose CLI plugin
+
+version_added: 3.6.0
+
+description:
+ - Uses Docker Compose to start or shutdown services.
+
+extends_documentation_fragment:
+ - community.docker.compose_v2
+ - community.docker.compose_v2.minimum_version
+ - community.docker.docker.cli_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: full
+ details:
+ - In check mode, pulling the image does not result in a changed result.
+ diff_mode:
+ support: none
+
+options:
+ state:
+ description:
+ - Desired state of the project.
+ - V(present) is equivalent to running C(docker compose up).
+ - V(stopped) is equivalent to running C(docker compose stop).
+ - V(absent) is equivalent to running C(docker compose down).
+ - V(restarted) is equivalent to running C(docker compose restart).
+ type: str
+ default: present
+ choices:
+ - absent
+ - stopped
+ - restarted
+ - present
+ pull:
+ description:
+ - Whether to pull images before running. This is used when C(docker compose up) is run.
+ - V(always) ensures that the images are always pulled, even when already present on the Docker daemon.
+ - V(missing) only pulls them when they are not present on the Docker daemon.
+ - V(never) never pulls images. If they are not present, the module will fail when trying to create the containers that need them.
+ - V(policy) use the Compose file's C(pull_policy) defined for the service to figure out what to do.
+ type: str
+ choices:
+ - always
+ - missing
+ - never
+ - policy
+ default: policy
+ build:
+ description:
+ - Whether to build images before starting containers. This is used when C(docker compose up) is run.
+ - V(always) always builds before starting containers. This is equivalent to the C(--build) option of C(docker compose up).
+ - V(never) never builds before starting containers. This is equivalent to the C(--no-build) option of C(docker compose up).
+ - V(policy) uses the policy as defined in the Compose file.
+ type: str
+ choices:
+ - always
+ - never
+ - policy
+ default: policy
+ dependencies:
+ description:
+ - When O(state) is V(present) or V(restarted), specify whether or not to include linked services.
+ type: bool
+ default: true
+ recreate:
+ description:
+ - By default containers will be recreated when their configuration differs from the service definition.
+ - Setting to V(never) ignores configuration differences and leaves existing containers unchanged.
+ - Setting to V(always) forces recreation of all existing containers.
+ type: str
+ default: auto
+ choices:
+ - always
+ - never
+ - auto
+ remove_images:
+ description:
+ - Use with O(state=absent) to remove all images or only local images.
+ type: str
+ choices:
+ - all
+ - local
+ remove_volumes:
+ description:
+ - Use with O(state=absent) to remove data volumes.
+ type: bool
+ default: false
+ remove_orphans:
+ description:
+ - Remove containers for services not defined in the Compose file.
+ type: bool
+ default: false
+ timeout:
+ description:
+ - Timeout in seconds for container shutdown when attached or when containers are already running.
+ type: int
+ services:
+ description:
+ - Specifies a subset of services to be targeted.
+ type: list
+ elements: str
+ scale:
+ description:
+ - Define how to scale services when running C(docker compose up).
+ - Provide a dictionary of key/value pairs where the key is the name of the service
+ and the value is an integer count for the number of containers.
+ type: dict
+ version_added: 3.7.0
+ wait:
+ description:
+ - When running C(docker compose up), pass C(--wait) to wait for services to be running/healthy.
+ - A timeout can be set with the O(wait_timeout) option.
+ type: bool
+ default: false
+ version_added: 3.8.0
+ wait_timeout:
+ description:
+ - When O(wait=true), wait at most this amount of seconds.
+ type: int
+ version_added: 3.8.0
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_compose
+ - module: community.docker.docker_compose_v2_pull
+'''
+
+EXAMPLES = '''
+# Examples use the django example at https://docs.docker.com/compose/django. Follow it to create the
+# flask directory
+
+- name: Run using a project directory
+ hosts: localhost
+ gather_facts: false
+ tasks:
+ - name: Tear down existing services
+ community.docker.docker_compose_v2:
+ project_src: flask
+ state: absent
+
+ - name: Create and start services
+ community.docker.docker_compose_v2:
+ project_src: flask
+ register: output
+
+ - name: Show results
+ ansible.builtin.debug:
+ var: output
+
+ - name: Run `docker-compose up` again
+ community.docker.docker_compose_v2:
+ project_src: flask
+ register: output
+
+ - name: Show results
+ ansible.builtin.debug:
+ var: output
+
+ - ansible.builtin.assert:
+ that: not output.changed
+
+ - name: Stop all services
+ community.docker.docker_compose_v2:
+ project_src: flask
+ state: stopped
+ register: output
+
+ - name: Show results
+ ansible.builtin.debug:
+ var: output
+
+ - name: Verify that web and db services are not running
+ ansible.builtin.assert:
+ that:
+ - "not output.services.web.flask_web_1.state.running"
+ - "not output.services.db.flask_db_1.state.running"
+
+ - name: Restart services
+ community.docker.docker_compose_v2:
+ project_src: flask
+ state: restarted
+ register: output
+
+ - name: Show results
+ ansible.builtin.debug:
+ var: output
+
+ - name: Verify that web and db services are running
+ ansible.builtin.assert:
+ that:
+ - "output.services.web.flask_web_1.state.running"
+ - "output.services.db.flask_db_1.state.running"
+'''
+
+RETURN = '''
+containers:
+ description:
+ - A list of containers associated to the service.
+ returned: success
+ type: list
+ elements: dict
+ contains:
+ Command:
+ description:
+ - The container's command.
+ type: raw
+ CreatedAt:
+ description:
+ - The timestamp when the container was created.
+ type: str
+ sample: "2024-01-02 12:20:41 +0100 CET"
+ ExitCode:
+ description:
+ - The container's exit code.
+ type: int
+ Health:
+ description:
+ - The container's health check.
+ type: raw
+ ID:
+ description:
+ - The container's ID.
+ type: str
+ sample: "44a7d607219a60b7db0a4817fb3205dce46e91df2cb4b78a6100b6e27b0d3135"
+ Image:
+ description:
+ - The container's image.
+ type: str
+ Labels:
+ description:
+ - Labels for this container.
+ type: dict
+ LocalVolumes:
+ description:
+ - The local volumes count.
+ type: str
+ Mounts:
+ description:
+ - Mounts.
+ type: str
+ Name:
+ description:
+ - The container's primary name.
+ type: str
+ Names:
+ description:
+ - List of names of the container.
+ type: list
+ elements: str
+ Networks:
+ description:
+ - List of networks attached to this container.
+ type: list
+ elements: str
+ Ports:
+ description:
+ - List of port assignments as a string.
+ type: str
+ Publishers:
+ description:
+ - List of port assigments.
+ type: list
+ elements: dict
+ contains:
+ URL:
+ description:
+ - Interface the port is bound to.
+ type: str
+ TargetPort:
+ description:
+ - The container's port the published port maps to.
+ type: int
+ PublishedPort:
+ description:
+ - The port that is published.
+ type: int
+ Protocol:
+ description:
+ - The protocol.
+ type: str
+ choices:
+ - tcp
+ - udp
+ RunningFor:
+ description:
+ - Amount of time the container runs.
+ type: str
+ Service:
+ description:
+ - The name of the service.
+ type: str
+ Size:
+ description:
+ - The container's size.
+ type: str
+ sample: "0B"
+ State:
+ description:
+ - The container's state.
+ type: str
+ sample: running
+ Status:
+ description:
+ - The container's status.
+ type: str
+ sample: Up About a minute
+images:
+ description:
+ - A list of images associated to the service.
+ returned: success
+ type: list
+ elements: dict
+ contains:
+ ID:
+ description:
+ - The image's ID.
+ type: str
+ sample: sha256:c8bccc0af9571ec0d006a43acb5a8d08c4ce42b6cc7194dd6eb167976f501ef1
+ ContainerName:
+ description:
+ - Name of the conainer this image is used by.
+ type: str
+ Repository:
+ description:
+ - The repository where this image belongs to.
+ type: str
+ Tag:
+ description:
+ - The tag of the image.
+ type: str
+ Size:
+ description:
+ - The image's size in bytes.
+ type: int
+actions:
+ description:
+ - A list of actions that have been applied.
+ returned: success
+ type: list
+ elements: dict
+ contains:
+ what:
+ description:
+ - What kind of resource was changed.
+ type: str
+ sample: container
+ choices:
+ - container
+ - image
+ - network
+ - service
+ - unknown
+ - volume
+ id:
+ description:
+ - The ID of the resource that was changed.
+ type: str
+ sample: container
+ status:
+ description:
+ - The status change that happened.
+ type: str
+ sample: Creating
+ choices:
+ - Starting
+ - Exiting
+ - Restarting
+ - Creating
+ - Stopping
+ - Killing
+ - Removing
+ - Recreating
+ - Pulling
+ - Building
+'''
+
+import traceback
+
+from ansible.module_utils.common.validation import check_type_int
+from ansible.module_utils.common.text.converters import to_native
+from ansible.module_utils.six import string_types
+
+from ansible_collections.community.docker.plugins.module_utils.common_cli import (
+ AnsibleModuleDockerClient,
+ DockerException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.compose_v2 import (
+ BaseComposeManager,
+ common_compose_argspec,
+ is_failed,
+)
+
+
+class ServicesManager(BaseComposeManager):
+ def __init__(self, client):
+ super(ServicesManager, self).__init__(client)
+ parameters = self.client.module.params
+
+ self.state = parameters['state']
+ self.dependencies = parameters['dependencies']
+ self.pull = parameters['pull']
+ self.build = parameters['build']
+ self.recreate = parameters['recreate']
+ self.remove_images = parameters['remove_images']
+ self.remove_volumes = parameters['remove_volumes']
+ self.remove_orphans = parameters['remove_orphans']
+ self.timeout = parameters['timeout']
+ self.services = parameters['services'] or []
+ self.scale = parameters['scale'] or {}
+ self.wait = parameters['wait']
+ self.wait_timeout = parameters['wait_timeout']
+
+ for key, value in self.scale.items():
+ if not isinstance(key, string_types):
+ self.client.fail('The key %s for `scale` is not a string' % repr(key))
+ try:
+ value = check_type_int(value)
+ except TypeError as exc:
+ self.client.fail('The value %s for `scale[%s]` is not an integer' % (repr(value), repr(key)))
+ if value < 0:
+ self.client.fail('The value %s for `scale[%s]` is negative' % (repr(value), repr(key)))
+ self.scale[key] = value
+
+ def run(self):
+ if self.state == 'present':
+ result = self.cmd_up()
+ elif self.state == 'stopped':
+ result = self.cmd_stop()
+ elif self.state == 'restarted':
+ result = self.cmd_restart()
+ elif self.state == 'absent':
+ result = self.cmd_down()
+
+ result['containers'] = self.list_containers()
+ result['images'] = self.list_images()
+ self.cleanup_result(result)
+ return result
+
+ def get_up_cmd(self, dry_run, no_start=False):
+ args = self.get_base_args() + ['up', '--detach', '--no-color', '--quiet-pull']
+ if self.pull != 'policy':
+ args.extend(['--pull', self.pull])
+ if self.remove_orphans:
+ args.append('--remove-orphans')
+ if self.recreate == 'always':
+ args.append('--force-recreate')
+ if self.recreate == 'never':
+ args.append('--no-recreate')
+ if not self.dependencies:
+ args.append('--no-deps')
+ if self.timeout is not None:
+ args.extend(['--timeout', '%d' % self.timeout])
+ if self.build == 'always':
+ args.append('--build')
+ elif self.build == 'never':
+ args.append('--no-build')
+ for key, value in sorted(self.scale.items()):
+ args.extend(['--scale', '%s=%d' % (key, value)])
+ if self.wait:
+ args.append('--wait')
+ if self.wait_timeout is not None:
+ args.extend(['--wait-timeout', str(self.wait_timeout)])
+ if no_start:
+ args.append('--no-start')
+ if dry_run:
+ args.append('--dry-run')
+ for service in self.services:
+ args.append(service)
+ args.append('--')
+ return args
+
+ def cmd_up(self):
+ result = dict()
+ args = self.get_up_cmd(self.check_mode)
+ rc, stdout, stderr = self.client.call_cli(*args, cwd=self.project_src)
+ events = self.parse_events(stderr, dry_run=self.check_mode)
+ self.emit_warnings(events)
+ self.update_result(result, events, stdout, stderr, ignore_service_pull_events=True)
+ self.update_failed(result, events, args, stdout, stderr, rc)
+ return result
+
+ def get_stop_cmd(self, dry_run):
+ args = self.get_base_args() + ['stop']
+ if self.timeout is not None:
+ args.extend(['--timeout', '%d' % self.timeout])
+ if dry_run:
+ args.append('--dry-run')
+ for service in self.services:
+ args.append(service)
+ args.append('--')
+ return args
+
+ def _are_containers_stopped(self):
+ for container in self.list_containers_raw():
+ if container['State'] not in ('created', 'exited', 'stopped', 'killed'):
+ return False
+ return True
+
+ def cmd_stop(self):
+ # Since 'docker compose stop' **always** claims its stopping containers, even if they are already
+ # stopped, we have to do this a bit more complicated.
+
+ result = dict()
+ # Make sure all containers are created
+ args_1 = self.get_up_cmd(self.check_mode, no_start=True)
+ rc_1, stdout_1, stderr_1 = self.client.call_cli(*args_1, cwd=self.project_src)
+ events_1 = self.parse_events(stderr_1, dry_run=self.check_mode)
+ self.emit_warnings(events_1)
+ self.update_result(result, events_1, stdout_1, stderr_1, ignore_service_pull_events=True)
+ is_failed_1 = is_failed(events_1, rc_1)
+ if not is_failed_1 and not self._are_containers_stopped():
+ # Make sure all containers are stopped
+ args_2 = self.get_stop_cmd(self.check_mode)
+ rc_2, stdout_2, stderr_2 = self.client.call_cli(*args_2, cwd=self.project_src)
+ events_2 = self.parse_events(stderr_2, dry_run=self.check_mode)
+ self.emit_warnings(events_2)
+ self.update_result(result, events_2, stdout_2, stderr_2)
+ else:
+ args_2 = []
+ rc_2, stdout_2, stderr_2 = 0, b'', b''
+ events_2 = []
+ # Compose result
+ self.update_failed(
+ result,
+ events_1 + events_2,
+ args_1 if is_failed_1 else args_2,
+ stdout_1 if is_failed_1 else stdout_2,
+ stderr_1 if is_failed_1 else stderr_2,
+ rc_1 if is_failed_1 else rc_2,
+ )
+ return result
+
+ def get_restart_cmd(self, dry_run):
+ args = self.get_base_args() + ['restart']
+ if not self.dependencies:
+ args.append('--no-deps')
+ if self.timeout is not None:
+ args.extend(['--timeout', '%d' % self.timeout])
+ if dry_run:
+ args.append('--dry-run')
+ for service in self.services:
+ args.append(service)
+ args.append('--')
+ return args
+
+ def cmd_restart(self):
+ result = dict()
+ args = self.get_restart_cmd(self.check_mode)
+ rc, stdout, stderr = self.client.call_cli(*args, cwd=self.project_src)
+ events = self.parse_events(stderr, dry_run=self.check_mode)
+ self.emit_warnings(events)
+ self.update_result(result, events, stdout, stderr)
+ self.update_failed(result, events, args, stdout, stderr, rc)
+ return result
+
+ def get_down_cmd(self, dry_run):
+ args = self.get_base_args() + ['down']
+ if self.remove_orphans:
+ args.append('--remove-orphans')
+ if self.remove_images:
+ args.extend(['--rmi', self.remove_images])
+ if self.remove_volumes:
+ args.append('--volumes')
+ if self.timeout is not None:
+ args.extend(['--timeout', '%d' % self.timeout])
+ if dry_run:
+ args.append('--dry-run')
+ for service in self.services:
+ args.append(service)
+ args.append('--')
+ return args
+
+ def cmd_down(self):
+ result = dict()
+ args = self.get_down_cmd(self.check_mode)
+ rc, stdout, stderr = self.client.call_cli(*args, cwd=self.project_src)
+ events = self.parse_events(stderr, dry_run=self.check_mode)
+ self.emit_warnings(events)
+ self.update_result(result, events, stdout, stderr)
+ self.update_failed(result, events, args, stdout, stderr, rc)
+ return result
+
+
+def main():
+ argument_spec = dict(
+ state=dict(type='str', default='present', choices=['absent', 'present', 'stopped', 'restarted']),
+ dependencies=dict(type='bool', default=True),
+ pull=dict(type='str', choices=['always', 'missing', 'never', 'policy'], default='policy'),
+ build=dict(type='str', choices=['always', 'never', 'policy'], default='policy'),
+ recreate=dict(type='str', default='auto', choices=['always', 'never', 'auto']),
+ remove_images=dict(type='str', choices=['all', 'local']),
+ remove_volumes=dict(type='bool', default=False),
+ remove_orphans=dict(type='bool', default=False),
+ timeout=dict(type='int'),
+ services=dict(type='list', elements='str'),
+ scale=dict(type='dict'),
+ wait=dict(type='bool', default=False),
+ wait_timeout=dict(type='int'),
+ )
+ argument_spec.update(common_compose_argspec())
+
+ client = AnsibleModuleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ try:
+ result = ServicesManager(client).run()
+ client.module.exit_json(**result)
+ except DockerException as e:
+ client.fail('An unexpected docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_compose_v2_pull.py b/ansible_collections/community/docker/plugins/modules/docker_compose_v2_pull.py
new file mode 100644
index 000000000..2b1980bf6
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_compose_v2_pull.py
@@ -0,0 +1,163 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+
+module: docker_compose_v2_pull
+
+short_description: Pull a Docker compose project
+
+version_added: 3.6.0
+
+description:
+ - Uses Docker Compose to pull images for a project.
+
+extends_documentation_fragment:
+ - community.docker.compose_v2
+ - community.docker.compose_v2.minimum_version
+ - community.docker.docker.cli_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: full
+ details:
+ - If O(policy=always), the module will always indicate a change.
+ Docker Compose does not give any information whether pulling would
+ update the image or not.
+ diff_mode:
+ support: none
+
+options:
+ policy:
+ description:
+ - Whether to pull images before running. This is used when C(docker compose up) is ran.
+ - V(always) ensures that the images are always pulled, even when already present on the Docker daemon.
+ - V(missing) only pulls them when they are not present on the Docker daemon. This is only supported since Docker Compose 2.22.0.
+ type: str
+ choices:
+ - always
+ - missing
+ default: always
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_compose_v2
+'''
+
+EXAMPLES = '''
+- name: Pull images for flask project
+ community.docker.docker_compose_v2_pull:
+ project_src: /path/to/flask
+'''
+
+RETURN = '''
+actions:
+ description:
+ - A list of actions that have been applied.
+ returned: success
+ type: list
+ elements: dict
+ contains:
+ what:
+ description:
+ - What kind of resource was changed.
+ type: str
+ sample: container
+ choices:
+ - image
+ - unknown
+ id:
+ description:
+ - The ID of the resource that was changed.
+ type: str
+ sample: container
+ status:
+ description:
+ - The status change that happened.
+ type: str
+ sample: Pulling
+ choices:
+ - Pulling
+'''
+
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_cli import (
+ AnsibleModuleDockerClient,
+ DockerException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.compose_v2 import (
+ BaseComposeManager,
+ common_compose_argspec,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.version import LooseVersion
+
+
+class PullManager(BaseComposeManager):
+ def __init__(self, client):
+ super(PullManager, self).__init__(client)
+ parameters = self.client.module.params
+
+ self.policy = parameters['policy']
+
+ if self.policy != 'always' and self.compose_version < LooseVersion('2.22.0'):
+ # https://github.com/docker/compose/pull/10981 - 2.22.0
+ self.client.fail('A pull policy other than always is only supported since Docker Compose 2.22.0. {0} has version {1}'.format(
+ self.client.get_cli(), self.compose_version))
+
+ def get_pull_cmd(self, dry_run, no_start=False):
+ args = self.get_base_args() + ['pull']
+ if self.policy != 'always':
+ args.extend(['--policy', self.policy])
+ if dry_run:
+ args.append('--dry-run')
+ args.append('--')
+ return args
+
+ def run(self):
+ result = dict()
+ args = self.get_pull_cmd(self.check_mode)
+ rc, stdout, stderr = self.client.call_cli(*args, cwd=self.project_src)
+ events = self.parse_events(stderr, dry_run=self.check_mode)
+ self.emit_warnings(events)
+ self.update_result(result, events, stdout, stderr, ignore_service_pull_events=self.policy != 'missing' and not self.check_mode)
+ self.update_failed(result, events, args, stdout, stderr, rc)
+ self.cleanup_result(result)
+ return result
+
+
+def main():
+ argument_spec = dict(
+ policy=dict(type='str', choices=['always', 'missing'], default='always'),
+ )
+ argument_spec.update(common_compose_argspec())
+
+ client = AnsibleModuleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ try:
+ result = PullManager(client).run()
+ client.module.exit_json(**result)
+ except DockerException as e:
+ client.fail('An unexpected docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_config.py b/ansible_collections/community/docker/plugins/modules/docker_config.py
index 9f55e0f0d..86654e78b 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_config.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_config.py
@@ -18,7 +18,7 @@ description:
- Create and remove Docker configs in a Swarm environment. Similar to C(docker config create) and C(docker config rm).
- Adds to the metadata of new configs 'ansible_key', an encrypted hash representation of the data, which is then used
in future runs to test if a config has changed. If 'ansible_key' is not present, then a config will not be updated
- unless the I(force) option is set.
+ unless the O(force) option is set.
- Updates to configs are performed by removing the config and creating it again.
extends_documentation_fragment:
@@ -37,45 +37,45 @@ options:
data:
description:
- The value of the config.
- - Mutually exclusive with I(data_src). One of I(data) and I(data_src) is required if I(state=present).
+ - Mutually exclusive with O(data_src). One of O(data) and O(data_src) is required if O(state=present).
type: str
data_is_b64:
description:
- - If set to C(true), the data is assumed to be Base64 encoded and will be
+ - If set to V(true), the data is assumed to be Base64 encoded and will be
decoded before being used.
- - To use binary I(data), it is better to keep it Base64 encoded and let it
+ - To use binary O(data), it is better to keep it Base64 encoded and let it
be decoded by this option.
type: bool
default: false
data_src:
description:
- The file on the target from which to read the config.
- - Mutually exclusive with I(data). One of I(data) and I(data_src) is required if I(state=present).
+ - Mutually exclusive with O(data). One of O(data) and O(data_src) is required if O(state=present).
type: path
version_added: 1.10.0
labels:
description:
- - "A map of key:value meta data, where both the I(key) and I(value) are expected to be a string."
+ - "A map of key:value meta data, where both the C(key) and C(value) are expected to be a string."
- If new meta data is provided, or existing meta data is modified, the config will be updated by removing it and creating it again.
type: dict
force:
description:
- - Use with state C(present) to always remove and recreate an existing config.
- - If C(true), an existing config will be replaced, even if it has not been changed.
+ - Use with O(state=present) to always remove and recreate an existing config.
+ - If V(true), an existing config will be replaced, even if it has not been changed.
type: bool
default: false
rolling_versions:
description:
- - If set to C(true), configs are created with an increasing version number appended to their name.
+ - If set to V(true), configs are created with an increasing version number appended to their name.
- Adds a label containing the version number to the managed configs with the name C(ansible_version).
type: bool
default: false
version_added: 2.2.0
versions_to_keep:
description:
- - When using I(rolling_versions), the number of old versions of the config to keep.
+ - When using O(rolling_versions), the number of old versions of the config to keep.
- Extraneous old configs are deleted after the new one is created.
- - Set to C(-1) to keep everything or to C(0) or C(1) to keep only the current one.
+ - Set to V(-1) to keep everything or V(0) or V(1) to keep only the current one.
type: int
default: 5
version_added: 2.2.0
@@ -86,7 +86,7 @@ options:
required: true
state:
description:
- - Set to C(present), if the config should exist, and C(absent), if it should not.
+ - Set to V(present), if the config should exist, and V(absent), if it should not.
type: str
default: present
choices:
@@ -94,7 +94,7 @@ options:
- present
template_driver:
description:
- - Set to C(golang) to use a Go template in I(data) or a Go template file in I(data_src).
+ - Set to V(golang) to use a Go template in O(data) or a Go template file in O(data_src).
type: str
choices:
- golang
@@ -183,13 +183,13 @@ RETURN = '''
config_id:
description:
- The ID assigned by Docker to the config object.
- returned: success and I(state) is C(present)
+ returned: success and O(state=present)
type: str
sample: 'hzehrmyjigmcp2gb6nlhmjqcv'
config_name:
description:
- The name of the created config object.
- returned: success and I(state) is C(present)
+ returned: success and O(state=present)
type: str
sample: 'awesome_config'
version_added: 2.2.0
diff --git a/ansible_collections/community/docker/plugins/modules/docker_container.py b/ansible_collections/community/docker/plugins/modules/docker_container.py
index 9d1ed416e..d7dbc3780 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_container.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_container.py
@@ -20,11 +20,11 @@ description:
notes:
- For most config changes, the container needs to be recreated. This means that the existing container has to be destroyed and
- a new one created. This can cause unexpected data loss and downtime. You can use the I(comparisons) option to
+ a new one created. This can cause unexpected data loss and downtime. You can use the O(comparisons) option to
prevent this.
- If the module needs to recreate the container, it will only use the options provided to the module to create the
- new container (except I(image)). Therefore, always specify B(all) options relevant to the container.
- - When I(restart) is set to C(true), the module will only restart the container if no config changes are detected.
+ new container (except O(image)). Therefore, always specify B(all) options relevant to the container.
+ - When O(restart) is set to V(true), the module will only restart the container if no config changes are detected.
extends_documentation_fragment:
- community.docker.docker.api_documentation
@@ -35,7 +35,8 @@ attributes:
check_mode:
support: partial
details:
- - When trying to pull an image, the module assumes this is always changed in check mode.
+ - When trying to pull an image, the module assumes this is never changed in check mode except when the image is not present on the Docker daemon.
+ - This behavior can be configured with O(pull_check_mode_behavior).
diff_mode:
support: full
@@ -43,7 +44,7 @@ options:
auto_remove:
description:
- Enable auto-removal of the container on daemon side when the container's process exits.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(false).
+ - If O(container_default_behavior=compatibility), this option has a default of V(false).
type: bool
blkio_weight:
description:
@@ -76,14 +77,14 @@ options:
version_added: 1.1.0
cleanup:
description:
- - Use with I(detach=false) to remove the container after successful execution.
+ - Use with O(detach=false) to remove the container after successful execution.
type: bool
default: false
command:
description:
- Command to execute when the container starts. A command may be either a string or a list.
- Prior to version 2.4, strings were split on commas.
- - See I(command_handling) for differences in how strings and lists are handled.
+ - See O(command_handling) for differences in how strings and lists are handled.
type: raw
comparisons:
description:
@@ -91,30 +92,30 @@ options:
module options to decide whether the container should be recreated / updated
or not.
- Only options which correspond to the state of a container as handled by the
- Docker daemon can be specified, as well as I(networks).
- - Must be a dictionary specifying for an option one of the keys C(strict), C(ignore)
- and C(allow_more_present).
- - If C(strict) is specified, values are tested for equality, and changes always
- result in updating or restarting. If C(ignore) is specified, changes are ignored.
- - C(allow_more_present) is allowed only for lists, sets and dicts. If it is
+ Docker daemon can be specified, as well as O(networks).
+ - Must be a dictionary specifying for an option one of the keys V(strict), V(ignore)
+ and V(allow_more_present).
+ - If V(strict) is specified, values are tested for equality, and changes always
+ result in updating or restarting. If V(ignore) is specified, changes are ignored.
+ - V(allow_more_present) is allowed only for lists, sets and dicts. If it is
specified for lists or sets, the container will only be updated or restarted if
the module option contains a value which is not present in the container's
options. If the option is specified for a dict, the container will only be updated
or restarted if the module option contains a key which is not present in the
container's option, or if the value of a key present differs.
- - The wildcard option C(*) can be used to set one of the default values C(strict)
- or C(ignore) to I(all) comparisons which are not explicitly set to other values.
+ - The wildcard option C(*) can be used to set one of the default values V(strict)
+ or V(ignore) to I(all) comparisons which are not explicitly set to other values.
- See the examples for details.
type: dict
container_default_behavior:
description:
- In older versions of this module, various module options used to have default values.
This caused problems with containers which use different values for these options.
- - The default value is now C(no_defaults). To restore the old behavior, set it to
- C(compatibility), which will ensure that the default values are used when the values
+ - The default value is now V(no_defaults). To restore the old behavior, set it to
+ V(compatibility), which will ensure that the default values are used when the values
are not explicitly specified by the user.
- - This affects the I(auto_remove), I(detach), I(init), I(interactive), I(memory),
- I(paused), I(privileged), I(read_only) and I(tty) options.
+ - This affects the O(auto_remove), O(detach), O(init), O(interactive), O(memory),
+ O(paused), O(privileged), O(read_only), and O(tty) options.
type: str
choices:
- compatibility
@@ -122,15 +123,15 @@ options:
default: no_defaults
command_handling:
description:
- - The default behavior for I(command) (when provided as a list) and I(entrypoint) is to
+ - The default behavior for O(command) (when provided as a list) and O(entrypoint) is to
convert them to strings without considering shell quoting rules. (For comparing idempotency,
the resulting string is split considering shell quoting rules.)
- - Also, setting I(command) to an empty list of string, and setting I(entrypoint) to an empty
+ - Also, setting O(command) to an empty list of string, and setting O(entrypoint) to an empty
list will be handled as if these options are not specified. This is different from idempotency
handling for other container-config related options.
- - When this is set to C(compatibility), which was the default until community.docker 3.0.0, the
+ - When this is set to V(compatibility), which was the default until community.docker 3.0.0, the
current behavior will be kept.
- - When this is set to C(correct), these options are kept as lists, and an empty value or empty
+ - When this is set to V(correct), these options are kept as lists, and an empty value or empty
list will be handled correctly for idempotency checks. This has been the default since
community.docker 3.0.0.
type: str
@@ -142,25 +143,26 @@ options:
cpu_period:
description:
- Limit CPU CFS (Completely Fair Scheduler) period.
- - See I(cpus) for an easier to use alternative.
+ - See O(cpus) for an easier to use alternative.
type: int
cpu_quota:
description:
- Limit CPU CFS (Completely Fair Scheduler) quota.
- - See I(cpus) for an easier to use alternative.
+ - See O(cpus) for an easier to use alternative.
type: int
cpus:
description:
- Specify how much of the available CPU resources a container can use.
- - A value of C(1.5) means that at most one and a half CPU (core) will be used.
+ - A value of V(1.5) means that at most one and a half CPU (core) will be used.
type: float
cpuset_cpus:
description:
- - CPUs in which to allow execution C(1,3) or C(1-3).
+ - CPUs in which to allow execution.
+ - For example V(1,3) or V(1-3).
type: str
cpuset_mems:
description:
- - Memory nodes (MEMs) in which to allow execution C(0-3) or C(0,1).
+ - Memory nodes (MEMs) in which to allow execution V(0-3) or V(0,1).
type: str
cpu_shares:
description:
@@ -170,19 +172,19 @@ options:
description:
- Define the default host IP to use.
- Must be an empty string, an IPv4 address, or an IPv6 address.
- - With Docker 20.10.2 or newer, this should be set to an empty string (C("")) to avoid the
+ - With Docker 20.10.2 or newer, this should be set to an empty string (V("")) to avoid the
port bindings without an explicit IP address to only bind to IPv4.
See U(https://github.com/ansible-collections/community.docker/issues/70) for details.
- By default, the module will try to auto-detect this value from the C(bridge) network's
C(com.docker.network.bridge.host_binding_ipv4) option. If it cannot auto-detect it, it
- will fall back to C(0.0.0.0).
+ will fall back to V(0.0.0.0).
type: str
version_added: 1.2.0
detach:
description:
- Enable detached mode to leave the container running in background.
- If disabled, the task will reflect the status of the container run (failed if the command failed).
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(true).
+ - If O(container_default_behavior=compatibility), this option has a default of V(true).
type: bool
devices:
description:
@@ -204,8 +206,8 @@ options:
rate:
description:
- "Device read limit in format C(<number>[<unit>])."
- - "Number is a positive integer. Unit can be one of C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
+ - "Number is a positive integer. Unit can be one of V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
- "Omitting the unit defaults to bytes."
type: str
required: true
@@ -223,8 +225,8 @@ options:
rate:
description:
- "Device read limit in format C(<number>[<unit>])."
- - "Number is a positive integer. Unit can be one of C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
+ - "Number is a positive integer. Unit can be one of V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
- "Omitting the unit defaults to bytes."
type: str
required: true
@@ -281,7 +283,7 @@ options:
count:
description:
- Number or devices to request.
- - Set to C(-1) to request all available devices.
+ - Set to V(-1) to request all available devices.
type: int
device_ids:
description:
@@ -319,19 +321,19 @@ options:
env:
description:
- Dictionary of key,value pairs.
- - Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example C("true")) in order to avoid data loss.
- - Please note that if you are passing values in with Jinja2 templates, like C("{{ value }}"), you need to add C(| string) to prevent Ansible to
- convert strings such as C("true") back to booleans. The correct way is to use C("{{ value | string }}").
+ - Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example V("true")) in order to avoid data loss.
+ - Please note that if you are passing values in with Jinja2 templates, like V("{{ value }}"), you need to add V(| string) to prevent Ansible to
+ convert strings such as V("true") back to booleans. The correct way is to use V("{{ value | string }}").
type: dict
env_file:
description:
- - Path to a file, present on the target, containing environment variables I(FOO=BAR).
- - If variable also present in I(env), then the I(env) value will override.
+ - Path to a file, present on the target, containing environment variables C(FOO=BAR).
+ - If variable also present in O(env), then the O(env) value will override.
type: path
entrypoint:
description:
- Command that overwrites the default C(ENTRYPOINT) of the image.
- - See I(command_handling) for differences in how strings and lists are handled.
+ - See O(command_handling) for differences in how strings and lists are handled.
type: list
elements: str
etc_hosts:
@@ -367,34 +369,35 @@ options:
- Configure a check that is run to determine whether or not containers for this service are "healthy".
- "See the docs for the L(HEALTHCHECK Dockerfile instruction,https://docs.docker.com/engine/reference/builder/#healthcheck)
for details on how healthchecks work."
- - "I(interval), I(timeout) and I(start_period) are specified as durations. They accept duration as a string in a format
- that look like: C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ - "O(healthcheck.interval), O(healthcheck.timeout) and O(healthcheck.start_period) are specified as durations.
+ They accept duration as a string in a format that look like: V(5h34m56s), V(1m30s), and so on.
+ The supported units are V(us), V(ms), V(s), V(m) and V(h)."
type: dict
suboptions:
test:
description:
- Command to run to check health.
- - Must be either a string or a list. If it is a list, the first item must be one of C(NONE), C(CMD) or C(CMD-SHELL).
+ - Must be either a string or a list. If it is a list, the first item must be one of V(NONE), V(CMD) or V(CMD-SHELL).
type: raw
interval:
description:
- Time between running the check.
- - The default used by the Docker daemon is C(30s).
+ - The default used by the Docker daemon is V(30s).
type: str
timeout:
description:
- Maximum time to allow one check to run.
- - The default used by the Docker daemon is C(30s).
+ - The default used by the Docker daemon is V(30s).
type: str
retries:
description:
- Consecutive number of failures needed to report unhealthy.
- - The default used by the Docker daemon is C(3).
+ - The default used by the Docker daemon is V(3).
type: int
start_period:
description:
- Start period for the container to initialize before starting health-retries countdown.
- - The default used by the Docker daemon is C(0s).
+ - The default used by the Docker daemon is V(0s).
type: str
hostname:
description:
@@ -402,30 +405,30 @@ options:
type: str
ignore_image:
description:
- - When I(state) is C(present) or C(started), the module compares the configuration of an existing
+ - When O(state) is V(present) or V(started), the module compares the configuration of an existing
container to requested configuration. The evaluation includes the image version. If the image
version in the registry does not match the container, the container will be recreated. You can
- stop this behavior by setting I(ignore_image) to C(true).
+ stop this behavior by setting O(ignore_image) to V(true).
- "B(Warning:) This option is ignored if C(image: ignore) or C(*: ignore) is specified in the
- I(comparisons) option."
+ O(comparisons) option."
- "This option is deprecated since community.docker 3.2.0 and will be removed in community.docker 4.0.0.
- Use C(image: ignore) in I(comparisons) instead of I(ignore_image=true)."
+ Use C(image: ignore) in O(comparisons) instead of O(ignore_image=true)."
type: bool
default: false
image:
description:
- Repository path and tag used to create the container. If an image is not found or pull is true, the image
- will be pulled from the registry. If no tag is included, C(latest) will be used.
+ will be pulled from the registry. If no tag is included, V(latest) will be used.
- Can also be an image ID. If this is the case, the image is assumed to be available locally.
- The I(pull) option is ignored for this case.
+ The O(pull) option is ignored for this case.
type: str
image_comparison:
description:
- Determines which image to use for idempotency checks that depend on image parameters.
- - The default, C(desired-image), will use the image that is provided to the module via the I(image) parameter.
- - C(current-image) will use the image that the container is currently using, if the container exists. It
+ - The default, V(desired-image), will use the image that is provided to the module via the O(image) parameter.
+ - V(current-image) will use the image that the container is currently using, if the container exists. It
falls back to the image that is provided in case the container does not yet exist.
- - This affects the I(env), I(env_file), I(exposed_ports), I(labels), and I(volumes) options.
+ - This affects the O(env), O(env_file), O(exposed_ports), O(labels), and O(volumes) options.
type: str
choices:
- desired-image
@@ -435,13 +438,13 @@ options:
image_label_mismatch:
description:
- How to handle labels inherited from the image that are not set explicitly.
- - When C(ignore), labels that are present in the image but not specified in I(labels) will be
- ignored. This is useful to avoid having to specify the image labels in I(labels) while keeping
- labels I(comparisons) C(strict).
- - When C(fail), if there are labels present in the image which are not set from I(labels), the
+ - When V(ignore), labels that are present in the image but not specified in O(labels) will be
+ ignored. This is useful to avoid having to specify the image labels in O(labels) while keeping
+ labels O(comparisons) V(strict).
+ - When V(fail), if there are labels present in the image which are not set from O(labels), the
module will fail. This prevents introducing unexpected labels from the base image.
- "B(Warning:) This option is ignored unless C(labels: strict) or C(*: strict) is specified in
- the I(comparisons) option."
+ the O(comparisons) option."
type: str
choices:
- 'ignore'
@@ -452,30 +455,31 @@ options:
description:
- Determines what the module does if the image matches, but the image name in the container's configuration
does not match the image name provided to the module.
- - "This is ignored if C(image: ignore) is set in I(comparisons)."
- - If set to C(recreate) the container will be recreated.
- - If set to C(ignore) the container will not be recreated because of this. It might still get recreated for other reasons.
+ - "This is ignored if C(image: ignore) is set in O(comparisons)."
+ - If set to V(recreate) the container will be recreated.
+ - If set to V(ignore) (currently the default) the container will not be recreated because of this. It might still get recreated for other reasons.
This has been the default behavior of the module for a long time, but might not be what users expect.
+ - Since community.docker 3.5.0, the default V(ignore) has been deprecated. If not specified, a deprecation warning
+ will be emitted if this setting would make a difference. The default will change to V(recreate) in community.docker 4.0.0.
type: str
choices:
- recreate
- ignore
- default: ignore
version_added: 3.2.0
init:
description:
- Run an init inside the container that forwards signals and reaps processes.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(false).
+ - If O(container_default_behavior=compatibility), this option has a default of V(false).
type: bool
interactive:
description:
- Keep stdin open after a container is launched, even if not attached.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(false).
+ - If O(container_default_behavior=compatibility), this option has a default of V(false).
type: bool
ipc_mode:
description:
- Set the IPC mode for the container.
- - Can be one of C(container:<name|id>) to reuse another container's IPC namespace or C(host) to use
+ - Can be one of V(container:<name|id>) to reuse another container's IPC namespace or V(host) to use
the host's IPC namespace within the container.
type: str
keep_volumes:
@@ -490,8 +494,8 @@ options:
kernel_memory:
description:
- "Kernel memory limit in format C(<number>[<unit>]). Number is a positive integer.
- Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte). Minimum is C(4M)."
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte). Minimum is V(4M)."
- Omitting the unit defaults to bytes.
type: str
labels:
@@ -506,42 +510,45 @@ options:
elements: str
log_driver:
description:
- - Specify the logging driver. Docker uses C(json-file) by default.
- - See L(here,https://docs.docker.com/config/containers/logging/configure/) for possible choices.
+ - Specify the logging driver. Docker uses V(json-file) by default.
+ - See L(the Docker logging configuration documentation,https://docs.docker.com/config/containers/logging/configure/)
+ for possible choices.
type: str
log_options:
description:
- - Dictionary of options specific to the chosen I(log_driver).
+ - Dictionary of options specific to the chosen O(log_driver).
- See U(https://docs.docker.com/engine/admin/logging/overview/) for details.
- - I(log_driver) needs to be specified for I(log_options) to take effect, even if using the default C(json-file) driver.
+ - O(log_driver) needs to be specified for O(log_options) to take effect, even if using the default V(json-file) driver.
type: dict
aliases:
- log_opt
mac_address:
description:
- - Container MAC address (for example, C(92:d0:c6:0a:29:33)).
+ - Container MAC address (for example, V(92:d0:c6:0a:29:33)).
+ - Note that the global container-wide MAC address is deprecated and no longer used since Docker API version 1.44.
+ - Use O(networks[].mac_address) instead.
type: str
memory:
description:
- "Memory limit in format C(<number>[<unit>]). Number is a positive integer.
- Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
- Omitting the unit defaults to bytes.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C("0").
+ - If O(container_default_behavior=compatibility), this option has a default of V("0").
type: str
memory_reservation:
description:
- "Memory soft limit in format C(<number>[<unit>]). Number is a positive integer.
- Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
- Omitting the unit defaults to bytes.
type: str
memory_swap:
description:
- "Total memory limit (memory + swap) in format C(<number>[<unit>]), or
- the special values C(unlimited) or C(-1) for unlimited swap usage.
- Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B),
- C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte)."
+ the special values V(unlimited) or V(-1) for unlimited swap usage.
+ Number is a positive integer. Unit can be V(B) (byte), V(K) (kibibyte, 1024B),
+ V(M) (mebibyte), V(G) (gibibyte), V(T) (tebibyte), or V(P) (pebibyte)."
- Omitting the unit defaults to bytes.
type: str
memory_swappiness:
@@ -554,7 +561,7 @@ options:
type: list
elements: dict
description:
- - Specification for mounts to be added to the container. More powerful alternative to I(volumes).
+ - Specification for mounts to be added to the container. More powerful alternative to O(volumes).
suboptions:
target:
description:
@@ -565,12 +572,12 @@ options:
description:
- Mount source.
- For example, this can be a volume name or a host path.
- - If not supplied when I(type=volume) an anonymous volume will be created.
+ - If not supplied when O(mounts[].type=volume) an anonymous volume will be created.
type: str
type:
description:
- The mount type.
- - Note that C(npipe) is only supported by Docker for Windows.
+ - Note that V(npipe) is only supported by Docker for Windows.
type: str
choices:
- bind
@@ -593,7 +600,7 @@ options:
- delegated
propagation:
description:
- - Propagation mode. Only valid for the C(bind) type.
+ - Propagation mode. Only valid for the V(bind) type.
type: str
choices:
- private
@@ -604,16 +611,16 @@ options:
- rslave
no_copy:
description:
- - False if the volume should be populated with the data from the target. Only valid for the C(volume) type.
- - The default value is C(false).
+ - False if the volume should be populated with the data from the target. Only valid for the V(volume) type.
+ - The default value is V(false).
type: bool
labels:
description:
- - User-defined name and labels for the volume. Only valid for the C(volume) type.
+ - User-defined name and labels for the volume. Only valid for the V(volume) type.
type: dict
volume_driver:
description:
- - Specify the volume driver. Only valid for the C(volume) type.
+ - Specify the volume driver. Only valid for the V(volume) type.
- See L(here,https://docs.docker.com/storage/volumes/#use-a-volume-driver) for details.
type: str
volume_options:
@@ -624,8 +631,8 @@ options:
tmpfs_size:
description:
- "The size for the tmpfs mount in bytes in format <number>[<unit>]."
- - "Number is a positive integer. Unit can be one of C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
+ - "Number is a positive integer. Unit can be one of V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
- "Omitting the unit defaults to bytes."
type: str
tmpfs_mode:
@@ -640,24 +647,24 @@ options:
required: true
network_mode:
description:
- - Connect the container to a network. Choices are C(bridge), C(host), C(none), C(container:<name|id>), C(<network_name>) or C(default).
- - "Since community.docker 2.0.0, if I(networks_cli_compatible) is C(true) and I(networks) contains at least one network,
- the default value for I(network_mode) is the name of the first network in the I(networks) list. You can prevent this
- by explicitly specifying a value for I(network_mode), like the default value C(default) which will be used by Docker if
- I(network_mode) is not specified."
+ - Connect the container to a network. Choices are V(bridge), V(host), V(none), C(container:<name|id>), C(<network_name>) or V(default).
+ - "Since community.docker 2.0.0, if O(networks_cli_compatible=true) and O(networks) contains at least one network,
+ the default value for O(network_mode) is the name of the first network in the O(networks) list. You can prevent this
+ by explicitly specifying a value for O(network_mode), like the default value V(default) which will be used by Docker if
+ O(network_mode) is not specified."
type: str
userns_mode:
description:
- - Set the user namespace mode for the container. Currently, the only valid value are C(host) and the empty string.
+ - Set the user namespace mode for the container. Currently, the only valid value are V(host) and the empty string (V("")).
type: str
networks:
description:
- List of networks the container belongs to.
- For examples of the data structure and usage see EXAMPLES below.
- - "To remove a container from one or more networks, use C(networks: strict) in the I(comparisons) option."
- - "If I(networks_cli_compatible) is set to C(false), this will not remove the default network if I(networks) is specified.
- This is different from the behavior of C(docker run ...). You need to explicitly use C(networks: strict) in I(comparisons)
- to enforce the removal of the default network (and all other networks not explicitly mentioned in I(networks)) in that case."
+ - "To remove a container from one or more networks, use C(networks: strict) in the O(comparisons) option."
+ - "If O(networks_cli_compatible=false), this will not remove the default network if O(networks) is specified.
+ This is different from the behavior of C(docker run ...). You need to explicitly use C(networks: strict) in O(comparisons)
+ to enforce the removal of the default network (and all other networks not explicitly mentioned in O(networks)) in that case."
type: list
elements: dict
suboptions:
@@ -685,17 +692,23 @@ options:
can be used in the network to reach this container.
type: list
elements: str
+ mac_address:
+ description:
+ - Endpoint MAC address (for example, V(92:d0:c6:0a:29:33)).
+ - This is only available for Docker API version 1.44 and later.
+ type: str
+ version_added: 3.6.0
networks_cli_compatible:
description:
- - "If I(networks_cli_compatible) is set to C(true) (default), this module will behave as
- C(docker run --network) and will B(not) add the default network if I(networks) is
- specified. If I(networks) is not specified, the default network will be attached."
- - "When I(networks_cli_compatible) is set to C(false) and networks are provided to the module
- via the I(networks) option, the module behaves differently than C(docker run --network):
+ - "If O(networks_cli_compatible=true) (default), this module will behave as
+ C(docker run --network) and will B(not) add the default network if O(networks) is
+ specified. If O(networks) is not specified, the default network will be attached."
+ - "When O(networks_cli_compatible=false) and networks are provided to the module
+ via the O(networks) option, the module behaves differently than C(docker run --network):
C(docker run --network other) will create a container with network C(other) attached,
- but the default network not attached. This module with I(networks: {name: other}) will
+ but the default network not attached. This module with O(networks) set to C({name: other}) will
create a container with both C(default) and C(other) attached. If C(networks: strict)
- or C(*: strict) is set in I(comparisons), the C(default) network will be removed afterwards."
+ or C(*: strict) is set in O(comparisons), the C(default) network will be removed afterwards."
type: bool
default: true
oom_killer:
@@ -710,13 +723,13 @@ options:
output_logs:
description:
- If set to true, output of the container command will be printed.
- - Only effective when I(log_driver) is set to C(json-file), C(journald), or C(local).
+ - Only effective when O(log_driver) is set to V(json-file), V(journald), or V(local).
type: bool
default: false
paused:
description:
- Use with the started state to pause running processes inside the container.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(false).
+ - If O(container_default_behavior=compatibility), this option has a default of V(false).
type: bool
pid_mode:
description:
@@ -725,31 +738,34 @@ options:
pids_limit:
description:
- Set PIDs limit for the container. It accepts an integer value.
- - Set C(-1) for unlimited PIDs.
+ - Set V(-1) for unlimited PIDs.
type: int
platform:
description:
- Platform for the container in the format C(os[/arch[/variant]]).
- - "Please note that inspecting the container does not always return the exact platform string used to
- create the container. This can cause idempotency to break for this module. Use the I(comparisons) option
- with C(platform: ignore) to prevent accidental recreation of the container due to this."
+ - "Note that since community.docker 3.5.0, the module uses both the image's metadata and the Docker
+ daemon's information to normalize platform strings similarly to how Docker itself is doing this.
+ If you notice idempotency problems, L(please create an issue in the community.docker GitHub repository,
+ https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&projects=&template=bug_report.md).
+ For older community.docker versions, you can use the O(comparisons) option with C(platform: ignore)
+ to prevent accidental recreation of the container due to this."
type: str
version_added: 3.0.0
privileged:
description:
- Give extended privileges to the container.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(false).
+ - If O(container_default_behavior=compatibility), this option has a default of V(false).
type: bool
publish_all_ports:
description:
- Publish all ports to the host.
- - Any specified port bindings from I(published_ports) will remain intact when C(true).
+ - Any specified port bindings from O(published_ports) will remain intact when V(true).
type: bool
version_added: 1.8.0
published_ports:
description:
- List of ports to publish from the container to the host.
- - "Use docker CLI syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000), where 8000 is a
+ - "Use docker CLI syntax: V(8000), V(9000:8000), or V(0.0.0.0:9000:8000), where 8000 is a
container port, 9000 is a host port, and 0.0.0.0 is a host interface."
- Port ranges can be used for source and destination ports. If two ranges with
different lengths are specified, the shorter range will be used.
@@ -757,41 +773,66 @@ options:
to the first port of the destination range, but to a free port in that range. This is the
same behavior as for C(docker) command line utility.
- "Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are B(not) allowed. This
- is different from the C(docker) command line utility. Use the R(dig lookup,ansible_collections.community.general.dig_lookup)
+ is different from the C(docker) command line utility. Use the P(community.general.dig#lookup) lookup
to resolve hostnames."
- - If I(networks) parameter is provided, will inspect each network to see if there exists
+ - If O(networks) parameter is provided, will inspect each network to see if there exists
a bridge network with optional parameter C(com.docker.network.bridge.host_binding_ipv4).
If such a network is found, then published ports where no host IP address is specified
will be bound to the host IP pointed to by C(com.docker.network.bridge.host_binding_ipv4).
Note that the first bridge network with a C(com.docker.network.bridge.host_binding_ipv4)
- value encountered in the list of I(networks) is the one that will be used.
- - The value C(all) was allowed in earlier versions of this module. Support for it was removed in
- community.docker 3.0.0. Use the I(publish_all_ports) option instead.
+ value encountered in the list of O(networks) is the one that will be used.
+ - The value V(all) was allowed in earlier versions of this module. Support for it was removed in
+ community.docker 3.0.0. Use the O(publish_all_ports) option instead.
type: list
elements: str
aliases:
- ports
pull:
description:
- - If true, always pull the latest version of an image. Otherwise, will only pull an image
- when missing.
+ - If set to V(never), will never try to pull an image. Will fail if the image is not available
+ on the Docker daemon.
+ - If set to V(missing) or V(false), only pull the image if it is not available on the Docker
+ daemon. This is the default behavior.
+ - If set to V(always) or V(true), always try to pull the latest version of the image.
- "B(Note:) images are only pulled when specified by name. If the image is specified
- as a image ID (hash), it cannot be pulled."
- type: bool
- default: false
+ as a image ID (hash), it cannot be pulled, and this option is ignored."
+ - "B(Note:) the values V(never), V(missing), and V(always) are only available since
+ community.docker 3.8.0. Earlier versions only support V(true) and V(false)."
+ type: raw
+ choices:
+ - never
+ - missing
+ - always
+ - true
+ - false
+ default: missing
+ pull_check_mode_behavior:
+ description:
+ - Allows to adjust the behavior when O(pull=always) or O(pull=true) in check mode.
+ - Since the Docker daemon does not expose any functionality to test whether a pull will result
+ in a changed image, the module by default acts like O(pull=always) only results in a change when
+ the image is not present.
+ - If set to V(image_not_present) (default), only report changes in check mode when the image is not present.
+ - If set to V(always), always report changes in check mode.
+ type: str
+ default: image_not_present
+ choices:
+ - image_not_present
+ - always
+ version_added: 3.8.0
purge_networks:
description:
- - Remove the container from ALL networks not included in I(networks) parameter.
- - Any default networks such as C(bridge), if not found in I(networks), will be removed as well.
+ - Remove the container from ALL networks not included in O(networks) parameter.
+ - Any default networks such as C(bridge), if not found in O(networks), will be removed as well.
- "This option is deprecated since community.docker 3.2.0 and will be removed in community.docker 4.0.0.
- Use C(networks: strict) in I(comparisons) instead of I(purge_networks=true) and make sure that
- I(networks) is specified. If you want to remove all networks, specify I(networks: [])."
+ Use C(networks: strict) in O(comparisons) instead of O(purge_networks=true) and make sure that
+ O(networks) is specified. If you want to remove all networks, specify O(networks) as C([])."
type: bool
default: false
read_only:
description:
- Mount the container's root file system as read-only.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(false).
+ - If O(container_default_behavior=compatibility), this option has a default of V(false).
type: bool
recreate:
description:
@@ -816,7 +857,7 @@ options:
restart_policy:
description:
- Container restart policy.
- - Place quotes around C(no) option.
+ - Place quotes around V(no) option.
type: str
choices:
- 'no'
@@ -834,9 +875,9 @@ options:
shm_size:
description:
- "Size of C(/dev/shm) in format C(<number>[<unit>]). Number is positive integer.
- Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
- - Omitting the unit defaults to bytes. If you omit the size entirely, Docker daemon uses C(64M).
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
+ - Omitting the unit defaults to bytes. If you omit the size entirely, Docker daemon uses V(64M).
type: str
security_opts:
description:
@@ -845,22 +886,22 @@ options:
elements: str
state:
description:
- - 'C(absent) - A container matching the specified name will be stopped and removed. Use I(force_kill) to kill the container
- rather than stopping it. Use I(keep_volumes) to retain anonymous volumes associated with the removed container.'
- - 'C(present) - Asserts the existence of a container matching the name and any provided configuration parameters. If no
+ - 'V(absent) - A container matching the specified name will be stopped and removed. Use O(force_kill) to kill the container
+ rather than stopping it. Use O(keep_volumes) to retain anonymous volumes associated with the removed container.'
+ - 'V(present) - Asserts the existence of a container matching the name and any provided configuration parameters. If no
container matches the name, a container will be created. If a container matches the name but the provided configuration
does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created
with the requested config.'
- - 'C(started) - Asserts that the container is first C(present), and then if the container is not running moves it to a running
- state. Use I(restart) to force a matching container to be stopped and restarted.'
- - 'C(stopped) - Asserts that the container is first C(present), and then if the container is running moves it to a stopped
+ - 'V(started) - Asserts that the container is first V(present), and then if the container is not running moves it to a running
+ state. Use O(restart) to force a matching container to be stopped and restarted.'
+ - 'V(stopped) - Asserts that the container is first V(present), and then if the container is running moves it to a stopped
state.'
- - "To control what will be taken into account when comparing configuration, see the I(comparisons) option. To avoid that the
- image version will be taken into account, you can also use the C(image: ignore) in the I(comparisons) option."
- - Use the I(recreate) option to always force re-creation of a matching container, even if it is running.
- - If the container should be killed instead of stopped in case it needs to be stopped for recreation, or because I(state) is
- C(stopped), please use the I(force_kill) option. Use I(keep_volumes) to retain anonymous volumes associated with a removed container.
- - Use I(keep_volumes) to retain anonymous volumes associated with a removed container.
+ - "To control what will be taken into account when comparing configuration, see the O(comparisons) option. To avoid that the
+ image version will be taken into account, you can also use the V(image: ignore) in the O(comparisons) option."
+ - Use the O(recreate) option to always force re-creation of a matching container, even if it is running.
+ - If the container should be killed instead of stopped in case it needs to be stopped for recreation, or because O(state) is
+ V(stopped), please use the O(force_kill) option. Use O(keep_volumes) to retain anonymous volumes associated with a removed container.
+ - Use O(keep_volumes) to retain anonymous volumes associated with a removed container.
type: str
default: started
choices:
@@ -896,11 +937,11 @@ options:
tty:
description:
- Allocate a pseudo-TTY.
- - If I(container_default_behavior) is set to C(compatibility), this option has a default of C(false).
+ - If O(container_default_behavior=compatibility), this option has a default of V(false).
type: bool
ulimits:
description:
- - "List of ulimit options. A ulimit is specified as C(nofile:262144:262144)."
+ - "List of ulimit options. A ulimit is specified as V(nofile:262144:262144)."
type: list
elements: str
sysctls:
@@ -920,12 +961,12 @@ options:
description:
- List of volumes to mount within the container.
- "Use docker CLI-style syntax: C(/host:/container[:mode])"
- - "Mount modes can be a comma-separated list of various modes such as C(ro), C(rw), C(consistent),
- C(delegated), C(cached), C(rprivate), C(private), C(rshared), C(shared), C(rslave), C(slave), and
- C(nocopy). Note that the docker daemon might not support all modes and combinations of such modes."
- - SELinux hosts can additionally use C(z) or C(Z) to use a shared or private label for the volume.
- - "Note that Ansible 2.7 and earlier only supported one mode, which had to be one of C(ro), C(rw),
- C(z), and C(Z)."
+ - "Mount modes can be a comma-separated list of various modes such as V(ro), V(rw), V(consistent),
+ V(delegated), V(cached), V(rprivate), V(private), V(rshared), V(shared), V(rslave), V(slave), and
+ V(nocopy). Note that the docker daemon might not support all modes and combinations of such modes."
+ - SELinux hosts can additionally use V(z) or V(Z) to use a shared or private label for the volume.
+ - "Note that Ansible 2.7 and earlier only supported one mode, which had to be one of V(ro), V(rw),
+ V(z), and V(Z)."
type: list
elements: str
volume_driver:
@@ -1225,9 +1266,9 @@ RETURN = '''
container:
description:
- Facts representing the current state of the container. Matches the docker inspection output.
- - Empty if I(state) is C(absent).
- - If I(detach=false), will include C(Output) attribute containing any output from container run.
- returned: success; or when I(state=started) and I(detach=false), and when waiting for the container result did not fail
+ - Empty if O(state=absent).
+ - If O(detach=false), will include C(Output) attribute containing any output from container run.
+ returned: success; or when O(state=started) and O(detach=false), and when waiting for the container result did not fail
type: dict
sample: '{
"AppArmorProfile": "",
@@ -1265,7 +1306,7 @@ status:
description:
- In case a container is started without detaching, this contains the exit code of the process in the container.
- Before community.docker 1.1.0, this was only returned when non-zero.
- returned: when I(state=started) and I(detach=false), and when waiting for the container result did not fail
+ returned: when O(state=started) and O(detach=false), and when waiting for the container result did not fail
type: int
sample: 0
'''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py b/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py
index f140bfe6a..2af99152d 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py
@@ -19,7 +19,7 @@ version_added: 3.4.0
description:
- Copy a file into a Docker container.
- Similar to C(docker cp).
- - To copy files in a non-running container, you must provide the I(owner_id) and I(group_id) options.
+ - To copy files in a non-running container, you must provide the O(owner_id) and O(group_id) options.
This is also necessary if the container does not contain a C(/bin/sh) shell with an C(id) tool.
attributes:
@@ -41,19 +41,19 @@ options:
path:
description:
- Path to a file on the managed node.
- - Mutually exclusive with I(content). One of I(content) and I(path) is required.
+ - Mutually exclusive with O(content). One of O(content) and O(path) is required.
type: path
content:
description:
- The file's content.
- - If you plan to provide binary data, provide it pre-encoded to base64, and set I(content_is_b64=true).
- - Mutually exclusive with I(path). One of I(content) and I(path) is required.
+ - If you plan to provide binary data, provide it pre-encoded to base64, and set O(content_is_b64=true).
+ - Mutually exclusive with O(path). One of O(content) and O(path) is required.
type: str
content_is_b64:
description:
- - If set to C(true), the content in I(content) is assumed to be Base64 encoded and
+ - If set to V(true), the content in O(content) is assumed to be Base64 encoded and
will be decoded before being used.
- - To use binary I(content), it is better to keep it Base64 encoded and let it
+ - To use binary O(content), it is better to keep it Base64 encoded and let it
be decoded by this option. Otherwise you risk the data to be interpreted as
UTF-8 and corrupted.
type: bool
@@ -77,7 +77,7 @@ options:
owner_id:
description:
- The owner ID to use when writing the file to disk.
- - If provided, I(group_id) must also be provided.
+ - If provided, O(group_id) must also be provided.
- If not provided, the module will try to determine the user and group ID for the current user in the container.
This will only work if C(/bin/sh) is present in the container and the C(id) binary or shell builtin is available.
Also the container must be running.
@@ -85,7 +85,7 @@ options:
group_id:
description:
- The group ID to use when writing the file to disk.
- - If provided, I(owner_id) must also be provided.
+ - If provided, O(owner_id) must also be provided.
- If not provided, the module will try to determine the user and group ID for the current user in the container.
This will only work if C(/bin/sh) is present in the container and the C(id) binary or shell builtin is available.
Also the container must be running.
@@ -97,8 +97,8 @@ options:
type: int
force:
description:
- - If set to C(true), force writing the file (without performing any idempotency checks).
- - If set to C(false), only write the file if it does not exist on the target. If a filesystem object exists at
+ - If set to V(true), force writing the file (without performing any idempotency checks).
+ - If set to V(false), only write the file if it does not exist on the target. If a filesystem object exists at
the destination, the module will not do any change.
- If this option is not specified, the module will be idempotent. To verify idempotency, it will try to get information
on the filesystem object in the container, and if everything seems to match will download the file from the container
@@ -138,7 +138,7 @@ RETURN = '''
container_path:
description:
- The actual path in the container.
- - Can only be different from I(container_path) when I(follow=true).
+ - Can only be different from O(container_path) when O(follow=true).
type: str
returned: success
'''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_container_exec.py b/ansible_collections/community/docker/plugins/modules/docker_container_exec.py
index 522a70a33..0d92dad96 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_container_exec.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_container_exec.py
@@ -42,21 +42,21 @@ options:
description:
- The command to execute.
- Since this is a list of arguments, no quoting is needed.
- - Exactly one of I(argv) or I(command) must be specified.
+ - Exactly one of O(argv) or O(command) must be specified.
command:
type: str
description:
- The command to execute.
- - Exactly one of I(argv) or I(command) must be specified.
+ - Exactly one of O(argv) or O(command) must be specified.
chdir:
type: str
description:
- The directory to run the command in.
detach:
description:
- - Whether to run the command synchronously (I(detach=false), default) or asynchronously (I(detach=true)).
- - If set to C(true), I(stdin) cannot be provided, and the return values C(stdout), C(stderr) and
- C(rc) are not returned.
+ - Whether to run the command synchronously (O(detach=false), default) or asynchronously (O(detach=true)).
+ - If set to V(true), O(stdin) cannot be provided, and the return values RV(stdout), RV(stderr), and
+ RV(rc) are not returned.
type: bool
default: false
version_added: 2.1.0
@@ -68,12 +68,12 @@ options:
type: str
description:
- Set the stdin of the command directly to the specified value.
- - Can only be used if I(detach=false).
+ - Can only be used if O(detach=false).
stdin_add_newline:
type: bool
default: true
description:
- - If set to C(true), appends a newline to I(stdin).
+ - If set to V(true), appends a newline to O(stdin).
strip_empty_ends:
type: bool
default: true
@@ -87,16 +87,17 @@ options:
env:
description:
- Dictionary of environment variables with their respective values to be passed to the command ran inside the container.
- - Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example C("true")) in order to avoid data loss.
- - Please note that if you are passing values in with Jinja2 templates, like C("{{ value }}"), you need to add C(| string) to prevent Ansible to
- convert strings such as C("true") back to booleans. The correct way is to use C("{{ value | string }}").
+ - Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example V("true")) in order to avoid data loss.
+ - Please note that if you are passing values in with Jinja2 templates, like V("{{ value }}"), you need to add V(| string) to prevent Ansible to
+ convert strings such as V("true") back to booleans. The correct way is to use V("{{ value | string }}").
type: dict
version_added: 2.1.0
notes:
- - Does not support C(check_mode).
- - Does B(not work with TCP TLS sockets) when using I(stdin). This is caused by the inability to send C(close_notify) without closing the connection
+ - Does B(not work with TCP TLS sockets) when using O(stdin). This is caused by the inability to send C(close_notify) without closing the connection
with Python's C(SSLSocket)s. See U(https://github.com/ansible-collections/community.docker/issues/605) for more information.
+ - If you need to evaluate environment variables of the container in O(command) or O(argv), you need to pass the command through a shell,
+ like O(command=/bin/sh -c "echo $ENV_VARIABLE").
author:
- "Felix Fontein (@felixfontein)"
@@ -134,23 +135,23 @@ EXAMPLES = '''
RETURN = '''
stdout:
type: str
- returned: success and I(detach=false)
+ returned: success and O(detach=false)
description:
- The standard output of the container command.
stderr:
type: str
- returned: success and I(detach=false)
+ returned: success and O(detach=false)
description:
- The standard error output of the container command.
rc:
type: int
- returned: success and I(detach=false)
+ returned: success and O(detach=false)
sample: 0
description:
- The exit code of the command.
exec_id:
type: str
- returned: success and I(detach=true)
+ returned: success and O(detach=true)
sample: 249d9e3075655baf705ed8f40488c5e9434049cf3431976f1bfdb73741c574c5
description:
- The execution ID of the command.
diff --git a/ansible_collections/community/docker/plugins/modules/docker_container_info.py b/ansible_collections/community/docker/plugins/modules/docker_container_info.py
index bfc28156b..ff24b1bc0 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_container_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_container_info.py
@@ -66,7 +66,7 @@ exists:
container:
description:
- Facts representing the current state of the container. Matches the docker inspection output.
- - Will be C(none) if container does not exist.
+ - Will be V(none) if container does not exist.
returned: always
type: dict
sample: '{
diff --git a/ansible_collections/community/docker/plugins/modules/docker_host_info.py b/ansible_collections/community/docker/plugins/modules/docker_host_info.py
index f08845faa..696cdfd0c 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_host_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_host_info.py
@@ -108,10 +108,10 @@ options:
default: false
verbose_output:
description:
- - When set to C(true) and I(networks), I(volumes), I(images), I(containers) or I(disk_usage) is set to C(true)
+ - When set to V(true) and O(networks), O(volumes), O(images), O(containers), or O(disk_usage) is set to V(true)
then output will contain verbose information about objects matching the full output of API method.
For details see the documentation of your version of Docker API at U(https://docs.docker.com/engine/api/).
- - The verbose output in this module contains only subset of information returned by I(_info) module
+ - The verbose output in this module contains only subset of information returned by this module
for each type of the objects.
type: bool
default: false
@@ -169,7 +169,7 @@ EXAMPLES = '''
RETURN = '''
can_talk_to_docker:
description:
- - Will be C(true) if the module can talk to the docker daemon.
+ - Will be V(true) if the module can talk to the docker daemon.
returned: both on success and on error
type: bool
@@ -181,40 +181,40 @@ host_info:
volumes:
description:
- List of dict objects containing the basic information about each volume.
- Keys matches the C(docker volume ls) output unless I(verbose_output=true).
- See description for I(verbose_output).
- returned: When I(volumes) is C(true)
+ Keys matches the C(docker volume ls) output unless O(verbose_output=true).
+ See description for O(verbose_output).
+ returned: When O(volumes=true)
type: list
elements: dict
networks:
description:
- List of dict objects containing the basic information about each network.
- Keys matches the C(docker network ls) output unless I(verbose_output=true).
- See description for I(verbose_output).
- returned: When I(networks) is C(true)
+ Keys matches the C(docker network ls) output unless O(verbose_output=true).
+ See description for O(verbose_output).
+ returned: When O(networks=true)
type: list
elements: dict
containers:
description:
- List of dict objects containing the basic information about each container.
- Keys matches the C(docker container ls) output unless I(verbose_output=true).
- See description for I(verbose_output).
- returned: When I(containers) is C(true)
+ Keys matches the C(docker container ls) output unless O(verbose_output=true).
+ See description for O(verbose_output).
+ returned: When O(containers=true)
type: list
elements: dict
images:
description:
- List of dict objects containing the basic information about each image.
- Keys matches the C(docker image ls) output unless I(verbose_output=true).
- See description for I(verbose_output).
- returned: When I(images) is C(true)
+ Keys matches the C(docker image ls) output unless O(verbose_output=true).
+ See description for O(verbose_output).
+ returned: When O(images=true)
type: list
elements: dict
disk_usage:
description:
- Information on summary disk usage by images, containers and volumes on docker host
- unless I(verbose_output=true). See description for I(verbose_output).
- returned: When I(disk_usage) is C(true)
+ unless O(verbose_output=true). See description for O(verbose_output).
+ returned: When O(disk_usage=true)
type: dict
'''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image.py b/ansible_collections/community/docker/plugins/modules/docker_image.py
index 735de786a..b229ad382 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_image.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_image.py
@@ -20,6 +20,7 @@ description:
notes:
- Building images is done using Docker daemon's API. It is not possible to use BuildKit / buildx this way.
+ Use M(community.docker.docker_image_build) to build images with BuildKit.
extends_documentation_fragment:
- community.docker.docker.api_documentation
@@ -38,12 +39,12 @@ options:
source:
description:
- "Determines where the module will try to retrieve the image from."
- - "Use C(build) to build the image from a C(Dockerfile). I(build.path) must
+ - "Use V(build) to build the image from a C(Dockerfile). O(build.path) must
be specified when this value is used."
- - "Use C(load) to load the image from a C(.tar) file. I(load_path) must
+ - "Use V(load) to load the image from a C(.tar) file. O(load_path) must
be specified when this value is used."
- - "Use C(pull) to pull the image from a registry."
- - "Use C(local) to make sure that the image is already available on the local
+ - "Use V(pull) to pull the image from a registry."
+ - "Use V(local) to make sure that the image is already available on the local
docker daemon. This means that the module does not try to build, pull or load the image."
type: str
choices:
@@ -63,8 +64,8 @@ options:
elements: str
dockerfile:
description:
- - Use with state C(present) and source C(build) to provide an alternate name for the Dockerfile to use when building an image.
- - This can also include a relative path (relative to I(path)).
+ - Use with O(state=present) and O(source=build) to provide an alternate name for the Dockerfile to use when building an image.
+ - This can also include a relative path (relative to O(build.path)).
type: str
http_timeout:
description:
@@ -112,13 +113,21 @@ options:
suboptions:
memory:
description:
- - Set memory limit for build.
- type: int
+ - "Memory limit for build in format C(<number>[<unit>]). Number is a positive integer.
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
+ - Omitting the unit defaults to bytes.
+ - Before community.docker 3.6.0, no units were allowed.
+ type: str
memswap:
description:
- - Total memory (memory + swap).
- - Use C(-1) to disable swap.
- type: int
+ - "Total memory limit (memory + swap) for build in format C(<number>[<unit>]), or
+ the special values V(unlimited) or V(-1) for unlimited swap usage.
+ Number is a positive integer. Unit can be V(B) (byte), V(K) (kibibyte, 1024B),
+ V(M) (mebibyte), V(G) (gibibyte), V(T) (tebibyte), or V(P) (pebibyte)."
+ - Omitting the unit defaults to bytes.
+ - Before community.docker 3.6.0, no units were allowed, and neither was the special value V(unlimited).
+ type: str
cpushares:
description:
- CPU shares (relative weight).
@@ -126,11 +135,11 @@ options:
cpusetcpus:
description:
- CPUs in which to allow execution.
- - For example, C(0-3) or C(0,1).
+ - For example, V(0-3) or V(0,1).
type: str
use_config_proxy:
description:
- - If set to C(true) and a proxy configuration is specified in the docker client configuration
+ - If set to V(true) and a proxy configuration is specified in the docker client configuration
(by default C($HOME/.docker/config.json)), the corresponding environment variables will
be set in the container being built.
type: bool
@@ -144,37 +153,50 @@ options:
- Platform in the format C(os[/arch[/variant]]).
type: str
version_added: 1.1.0
+ shm_size:
+ description:
+ - "Size of C(/dev/shm) in format C(<number>[<unit>]). Number is positive integer.
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
+ - Omitting the unit defaults to bytes. If you omit the size entirely, Docker daemon uses V(64M).
+ type: str
+ version_added: 3.6.0
+ labels:
+ description:
+ - Dictionary of key value pairs.
+ type: dict
+ version_added: 3.6.0
archive_path:
description:
- - Use with state C(present) to archive an image to a .tar file.
+ - Use with O(state=present) to archive an image to a C(.tar) file.
type: path
load_path:
description:
- - Use with state C(present) to load an image from a .tar file.
- - Set I(source) to C(load) if you want to load the image.
+ - Use with O(state=present) to load an image from a C(.tar) file.
+ - Set O(source=load) if you want to load the image.
type: path
force_source:
description:
- - Use with state C(present) to build, load or pull an image (depending on the
- value of the I(source) option) when the image already exists.
+ - Use with O(state=present) to build, load or pull an image (depending on the
+ value of the O(source) option) when the image already exists.
type: bool
default: false
force_absent:
description:
- - Use with state I(absent) to un-tag and remove all images matching the specified name.
+ - Use with O(state=absent) to un-tag and remove all images matching the specified name.
type: bool
default: false
force_tag:
description:
- - Use with state C(present) to force tagging an image.
+ - Use with O(state=present) to force tagging an image.
type: bool
default: false
name:
description:
- "Image name. Name format will be one of: C(name), C(repository/name), C(registry_server:port/name).
When pushing or pulling an image the name can optionally include the tag by appending C(:tag_name)."
- - Note that image IDs (hashes) are only supported for I(state=absent), for I(state=present) with I(source=load),
- and for I(state=present) with I(source=local).
+ - Note that image IDs (hashes) are only supported for O(state=absent), for O(state=present) with O(source=load),
+ and for O(state=present) with O(source=local).
type: str
required: true
pull:
@@ -191,23 +213,23 @@ options:
type: str
push:
description:
- - Push the image to the registry. Specify the registry as part of the I(name) or I(repository) parameter.
+ - Push the image to the registry. Specify the registry as part of the O(name) or O(repository) parameter.
type: bool
default: false
repository:
description:
- - Use with state C(present) to tag the image.
- - Expects format C(repository:tag). If no tag is provided, will use the value of the I(tag) parameter or C(latest).
- - If I(push=true), I(repository) must either include a registry, or will be assumed to belong to the default
+ - Use with O(state=present) to tag the image.
+ - Expects format C(repository:tag). If no tag is provided, will use the value of the O(tag) parameter or V(latest).
+ - If O(push=true), O(repository) must either include a registry, or will be assumed to belong to the default
registry (Docker Hub).
type: str
state:
description:
- Make assertions about the state of an image.
- - When C(absent) an image will be removed. Use the force option to un-tag and remove all images
+ - When V(absent) an image will be removed. Use the force option to un-tag and remove all images
matching the provided name.
- - When C(present) check if an image exists using the provided name and tag. If the image is not found or the
- force option is used, the image will either be pulled, built or loaded, depending on the I(source) option.
+ - When V(present) check if an image exists using the provided name and tag. If the image is not found or the
+ force option is used, the image will either be pulled, built or loaded, depending on the O(source) option.
type: str
default: present
choices:
@@ -216,8 +238,8 @@ options:
tag:
description:
- Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to
- I(latest).
- - If I(name) parameter format is I(name:tag), then tag value from I(name) will take precedence.
+ V(latest).
+ - If O(name) parameter format is C(name:tag), then tag value from O(name) will take precedence.
type: str
default: latest
@@ -229,6 +251,15 @@ author:
- Chris Houseknecht (@chouseknecht)
- Sorin Sbarnea (@ssbarnea)
+seealso:
+ - module: community.docker.docker_image_build
+ - module: community.docker.docker_image_export
+ - module: community.docker.docker_image_info
+ - module: community.docker.docker_image_load
+ - module: community.docker.docker_image_pull
+ - module: community.docker.docker_image_push
+ - module: community.docker.docker_image_remove
+ - module: community.docker.docker_image_tag
'''
EXAMPLES = '''
@@ -338,6 +369,7 @@ import os
import traceback
from ansible.module_utils.common.text.converters import to_native
+from ansible.module_utils.common.text.formatters import human_to_bytes
from ansible_collections.community.docker.plugins.module_utils.common_api import (
AnsibleDockerClient,
@@ -377,6 +409,17 @@ from ansible_collections.community.docker.plugins.module_utils._api.utils.utils
)
+def convert_to_bytes(value, module, name, unlimited_value=None):
+ if value is None:
+ return value
+ try:
+ if unlimited_value is not None and value in ('unlimited', str(unlimited_value)):
+ return unlimited_value
+ return human_to_bytes(value)
+ except ValueError as exc:
+ module.fail_json(msg='Failed to convert %s to bytes: %s' % (name, to_native(exc)))
+
+
class ImageManager(DockerBaseClass):
def __init__(self, client, results):
@@ -402,6 +445,12 @@ class ImageManager(DockerBaseClass):
self.archive_path = parameters['archive_path']
self.cache_from = build.get('cache_from')
self.container_limits = build.get('container_limits')
+ if self.container_limits and 'memory' in self.container_limits:
+ self.container_limits['memory'] = convert_to_bytes(
+ self.container_limits['memory'], self.client.module, 'build.container_limits.memory')
+ if self.container_limits and 'memswap' in self.container_limits:
+ self.container_limits['memswap'] = convert_to_bytes(
+ self.container_limits['memswap'], self.client.module, 'build.container_limits.memswap', unlimited_value=-1)
self.dockerfile = build.get('dockerfile')
self.force_source = parameters['force_source']
self.force_absent = parameters['force_absent']
@@ -424,6 +473,8 @@ class ImageManager(DockerBaseClass):
self.buildargs = build.get('args')
self.build_platform = build.get('platform')
self.use_config_proxy = build.get('use_config_proxy')
+ self.shm_size = convert_to_bytes(build.get('shm_size'), self.client.module, 'build.shm_size')
+ self.labels = clean_dict_booleans_for_docker_api(build.get('labels'))
# If name contains a tag, it takes precedence over tag parameter.
if not is_image_name_id(self.name):
@@ -825,6 +876,12 @@ class ImageManager(DockerBaseClass):
if self.build_platform is not None:
params['platform'] = self.build_platform
+ if self.shm_size is not None:
+ params['shmsize'] = self.shm_size
+
+ if self.labels:
+ params['labels'] = json.dumps(self.labels)
+
if context is not None:
headers['Content-Type'] = 'application/tar'
@@ -945,8 +1002,8 @@ def main():
build=dict(type='dict', options=dict(
cache_from=dict(type='list', elements='str'),
container_limits=dict(type='dict', options=dict(
- memory=dict(type='int'),
- memswap=dict(type='int'),
+ memory=dict(type='str'),
+ memswap=dict(type='str'),
cpushares=dict(type='int'),
cpusetcpus=dict(type='str'),
)),
@@ -962,6 +1019,8 @@ def main():
target=dict(type='str'),
etc_hosts=dict(type='dict'),
platform=dict(type='str'),
+ shm_size=dict(type='str'),
+ labels=dict(type='dict'),
)),
archive_path=dict(type='path'),
force_source=dict(type='bool', default=False),
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_build.py b/ansible_collections/community/docker/plugins/modules/docker_image_build.py
new file mode 100644
index 000000000..7f9502098
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_build.py
@@ -0,0 +1,316 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+---
+module: docker_image_build
+
+short_description: Build Docker images using Docker buildx
+
+version_added: 3.6.0
+
+description:
+ - This module allows you to build Docker images using Docker's buildx plugin (BuildKit).
+
+extends_documentation_fragment:
+ - community.docker.docker.cli_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: full
+ diff_mode:
+ support: none
+
+options:
+ name:
+ description:
+ - "Image name. Name format will be one of: C(name), C(repository/name), C(registry_server:port/name).
+ When pushing or pulling an image the name can optionally include the tag by appending C(:tag_name)."
+ - Note that image IDs (hashes) and names with digest cannot be used.
+ type: str
+ required: true
+ tag:
+ description:
+ - Tag for the image name O(name) that is to be tagged.
+ - If O(name)'s format is C(name:tag), then the tag value from O(name) will take precedence.
+ type: str
+ default: latest
+ path:
+ description:
+ - The path for the build environment.
+ type: path
+ required: true
+ dockerfile:
+ description:
+ - Provide an alternate name for the Dockerfile to use when building an image.
+ - This can also include a relative path (relative to O(path)).
+ type: str
+ cache_from:
+ description:
+ - List of image names to consider as cache source.
+ type: list
+ elements: str
+ pull:
+ description:
+ - When building an image downloads any updates to the FROM image in Dockerfile.
+ type: bool
+ default: false
+ network:
+ description:
+ - The network to use for C(RUN) build instructions.
+ type: str
+ nocache:
+ description:
+ - Do not use cache when building an image.
+ type: bool
+ default: false
+ etc_hosts:
+ description:
+ - Extra hosts to add to C(/etc/hosts) in building containers, as a mapping of hostname to IP address.
+ type: dict
+ args:
+ description:
+ - Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive.
+ - Docker expects the value to be a string. For convenience any non-string values will be converted to strings.
+ type: dict
+ target:
+ description:
+ - When building an image specifies an intermediate build stage by
+ name as a final stage for the resulting image.
+ type: str
+ platform:
+ description:
+ - Platform in the format C(os[/arch[/variant]]).
+ type: str
+ shm_size:
+ description:
+ - "Size of C(/dev/shm) in format C(<number>[<unit>]). Number is positive integer.
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
+ - Omitting the unit defaults to bytes. If you omit the size entirely, Docker daemon uses V(64M).
+ type: str
+ labels:
+ description:
+ - Dictionary of key value pairs.
+ type: dict
+ rebuild:
+ description:
+ - Defines the behavior of the module if the image to build (as specified in O(name) and O(tag)) already exists.
+ type: str
+ choices:
+ - never
+ - always
+ default: never
+
+requirements:
+ - "Docker CLI with Docker buildx plugin"
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_image_push
+ - module: community.docker.docker_image_tag
+'''
+
+EXAMPLES = '''
+- name: Build Python 3.12 image
+ community.docker.docker_image_build:
+ name: localhost/python/3.12:latest
+ path: /home/user/images/python
+ dockerfile: Dockerfile-3.12
+'''
+
+RETURN = '''
+image:
+ description: Image inspection results for the affected image.
+ returned: success
+ type: dict
+ sample: {}
+'''
+
+import os
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+from ansible.module_utils.common.text.formatters import human_to_bytes
+
+from ansible_collections.community.docker.plugins.module_utils.common_cli import (
+ AnsibleModuleDockerClient,
+ DockerException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.util import (
+ DockerBaseClass,
+ clean_dict_booleans_for_docker_api,
+ is_image_name_id,
+ is_valid_tag,
+)
+
+from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
+ parse_repository_tag,
+)
+
+
+def convert_to_bytes(value, module, name, unlimited_value=None):
+ if value is None:
+ return value
+ try:
+ if unlimited_value is not None and value in ('unlimited', str(unlimited_value)):
+ return unlimited_value
+ return human_to_bytes(value)
+ except ValueError as exc:
+ module.fail_json(msg='Failed to convert %s to bytes: %s' % (name, to_native(exc)))
+
+
+def dict_to_list(dictionary, concat='='):
+ return ['%s%s%s' % (k, concat, v) for k, v in sorted(dictionary.items())]
+
+
+class ImageBuilder(DockerBaseClass):
+ def __init__(self, client):
+ super(ImageBuilder, self).__init__()
+ self.client = client
+ self.check_mode = self.client.check_mode
+ parameters = self.client.module.params
+
+ self.cache_from = parameters['cache_from']
+ self.pull = parameters['pull']
+ self.network = parameters['network']
+ self.nocache = parameters['nocache']
+ self.etc_hosts = clean_dict_booleans_for_docker_api(parameters['etc_hosts'])
+ self.args = clean_dict_booleans_for_docker_api(parameters['args'])
+ self.target = parameters['target']
+ self.platform = parameters['platform']
+ self.shm_size = convert_to_bytes(parameters['shm_size'], self.client.module, 'shm_size')
+ self.labels = clean_dict_booleans_for_docker_api(parameters['labels'])
+ self.rebuild = parameters['rebuild']
+
+ buildx = self.client.get_client_plugin_info('buildx')
+ if buildx is None:
+ self.fail('Docker CLI {0} does not have the buildx plugin installed'.format(self.client.get_cli()))
+
+ self.path = parameters['path']
+ if not os.path.isdir(self.path):
+ self.fail('"{0}" is not an existing directory'.format(self.path))
+ self.dockerfile = parameters['dockerfile']
+ if self.dockerfile and not os.path.isfile(os.path.join(self.path, self.dockerfile)):
+ self.fail('"{0}" is not an existing file'.format(os.path.join(self.path, self.dockerfile)))
+
+ self.name = parameters['name']
+ self.tag = parameters['tag']
+ if not is_valid_tag(self.tag, allow_empty=True):
+ self.fail('"{0}" is not a valid docker tag'.format(self.tag))
+ if is_image_name_id(self.name):
+ self.fail('Image name must not be a digest')
+
+ # If name contains a tag, it takes precedence over tag parameter.
+ repo, repo_tag = parse_repository_tag(self.name)
+ if repo_tag:
+ self.name = repo
+ self.tag = repo_tag
+
+ if is_image_name_id(self.tag):
+ self.fail('Image name must not contain a digest, but have a tag')
+
+ def fail(self, msg, **kwargs):
+ self.client.fail(msg, **kwargs)
+
+ def add_list_arg(self, args, option, values):
+ for value in values:
+ args.extend([option, value])
+
+ def add_args(self, args):
+ args.extend(['--tag', '%s:%s' % (self.name, self.tag)])
+ if self.dockerfile:
+ args.extend(['--file', os.path.join(self.path, self.dockerfile)])
+ if self.cache_from:
+ self.add_list_arg(args, '--cache-from', self.cache_from)
+ if self.pull:
+ args.append('--pull')
+ if self.network:
+ args.extend(['--network', self.network])
+ if self.nocache:
+ args.append('--no-cache')
+ if self.etc_hosts:
+ self.add_list_arg(args, '--add-host', dict_to_list(self.etc_hosts, ':'))
+ if self.args:
+ self.add_list_arg(args, '--build-arg', dict_to_list(self.args))
+ if self.target:
+ args.extend(['--target', self.target])
+ if self.platform:
+ args.extend(['--platform', self.platform])
+ if self.shm_size:
+ args.extend(['--shm-size', str(self.shm_size)])
+ if self.labels:
+ self.add_list_arg(args, '--label', dict_to_list(self.labels))
+
+ def build_image(self):
+ image = self.client.find_image(self.name, self.tag)
+ results = dict(
+ changed=False,
+ actions=[],
+ image=image or {},
+ )
+
+ if image:
+ if self.rebuild == 'never':
+ return results
+
+ results['changed'] = True
+ if not self.check_mode:
+ args = ['buildx', 'build', '--progress', 'plain']
+ self.add_args(args)
+ args.extend(['--', self.path])
+ rc, stdout, stderr = self.client.call_cli(*args)
+ if rc != 0:
+ self.fail('Building %s:%s failed' % (self.name, self.tag), stdout=to_native(stdout), stderr=to_native(stderr))
+ results['stdout'] = to_native(stdout)
+ results['stderr'] = to_native(stderr)
+ results['image'] = self.client.find_image(self.name, self.tag) or {}
+
+ return results
+
+
+def main():
+ argument_spec = dict(
+ name=dict(type='str', required=True),
+ tag=dict(type='str', default='latest'),
+ path=dict(type='path', required=True),
+ dockerfile=dict(type='str'),
+ cache_from=dict(type='list', elements='str'),
+ pull=dict(type='bool', default=False),
+ network=dict(type='str'),
+ nocache=dict(type='bool', default=False),
+ etc_hosts=dict(type='dict'),
+ args=dict(type='dict'),
+ target=dict(type='str'),
+ platform=dict(type='str'),
+ shm_size=dict(type='str'),
+ labels=dict(type='dict'),
+ rebuild=dict(type='str', choices=['never', 'always'], default='never'),
+ )
+
+ client = AnsibleModuleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ try:
+ results = ImageBuilder(client).build_image()
+ client.module.exit_json(**results)
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_export.py b/ansible_collections/community/docker/plugins/modules/docker_image_export.py
new file mode 100644
index 000000000..9e03875a2
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_export.py
@@ -0,0 +1,283 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+---
+module: docker_image_export
+
+short_description: Export (archive) Docker images
+
+version_added: 3.7.0
+
+description:
+ - Creates an archive (tarball) from one or more Docker images.
+ - This can be copied to another machine and loaded with M(community.docker.docker_image_load).
+
+extends_documentation_fragment:
+ - community.docker.docker.api_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: full
+ diff_mode:
+ support: none
+
+options:
+ names:
+ description:
+ - "One or more image names. Name format will be one of: C(name), C(repository/name), C(registry_server:port/name).
+ When pushing or pulling an image the name can optionally include the tag by appending C(:tag_name)."
+ - Note that image IDs (hashes) can also be used.
+ type: list
+ elements: str
+ required: true
+ aliases:
+ - name
+ tag:
+ description:
+ - Tag for the image name O(name) that is to be tagged.
+ - If O(name)'s format is C(name:tag), then the tag value from O(name) will take precedence.
+ type: str
+ default: latest
+ path:
+ description:
+ - The C(.tar) file the image should be exported to.
+ type: path
+ force:
+ description:
+ - Export the image even if the C(.tar) file already exists and seems to contain the right image.
+ type: bool
+ default: false
+
+requirements:
+ - "Docker API >= 1.25"
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_image
+ - module: community.docker.docker_image_info
+ - module: community.docker.docker_image_load
+'''
+
+EXAMPLES = '''
+- name: Export an image
+ community.docker.docker_image_export:
+ name: pacur/centos-7
+ path: /tmp/centos-7.tar
+
+- name: Export multiple images
+ community.docker.docker_image_export:
+ names:
+ - hello-world:latest
+ - pacur/centos-7:latest
+ path: /tmp/various.tar
+'''
+
+RETURN = '''
+images:
+ description: Image inspection results for the affected images.
+ returned: success
+ type: list
+ elements: dict
+ sample: []
+'''
+
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_api import (
+ AnsibleDockerClient,
+ RequestException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.image_archive import (
+ load_archived_image_manifest,
+ api_image_id,
+ ImageArchiveInvalidException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.util import (
+ DockerBaseClass,
+ is_image_name_id,
+ is_valid_tag,
+)
+from ansible_collections.community.docker.plugins.module_utils._api.constants import (
+ DEFAULT_DATA_CHUNK_SIZE,
+)
+from ansible_collections.community.docker.plugins.module_utils._api.errors import DockerException
+from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
+ parse_repository_tag,
+)
+
+
+class ImageExportManager(DockerBaseClass):
+ def __init__(self, client):
+ super(ImageExportManager, self).__init__()
+
+ self.client = client
+ parameters = self.client.module.params
+ self.check_mode = self.client.check_mode
+
+ self.path = parameters['path']
+ self.force = parameters['force']
+ self.tag = parameters['tag']
+
+ if not is_valid_tag(self.tag, allow_empty=True):
+ self.fail('"{0}" is not a valid docker tag'.format(self.tag))
+
+ # If name contains a tag, it takes precedence over tag parameter.
+ self.names = []
+ for name in parameters['names']:
+ if is_image_name_id(name):
+ self.names.append({'id': name, 'joined': name})
+ else:
+ repo, repo_tag = parse_repository_tag(name)
+ if not repo_tag:
+ repo_tag = self.tag
+ self.names.append({'name': repo, 'tag': repo_tag, 'joined': '%s:%s' % (repo, repo_tag)})
+
+ if not self.names:
+ self.fail('At least one image name must be specified')
+
+ def fail(self, msg):
+ self.client.fail(msg)
+
+ def get_export_reason(self):
+ if self.force:
+ return 'Exporting since force=true'
+
+ try:
+ archived_images = load_archived_image_manifest(self.path)
+ if archived_images is None:
+ return 'Overwriting since no image is present in archive'
+ except ImageArchiveInvalidException as exc:
+ self.log('Unable to extract manifest summary from archive: %s' % to_native(exc))
+ return 'Overwriting an unreadable archive file'
+
+ left_names = list(self.names)
+ for archived_image in archived_images:
+ found = False
+ for i, name in enumerate(left_names):
+ if name['id'] == api_image_id(archived_image.image_id) and [name['joined']] == archived_image.repo_tags:
+ del left_names[i]
+ found = True
+ break
+ if not found:
+ return 'Overwriting archive since it contains unexpected image %s named %s' % (
+ archived_image.image_id, ', '.join(archived_image.repo_tags)
+ )
+ if left_names:
+ return 'Overwriting archive since it is missing image(s) %s' % (', '.join([name['joined'] for name in left_names]))
+
+ return None
+
+ def write_chunks(self, chunks):
+ try:
+ with open(self.path, 'wb') as fd:
+ for chunk in chunks:
+ fd.write(chunk)
+ except Exception as exc:
+ self.fail("Error writing image archive %s - %s" % (self.path, to_native(exc)))
+
+ def export_images(self):
+ image_names = [name['joined'] for name in self.names]
+ image_names_str = ', '.join(image_names)
+ if len(image_names) == 1:
+ self.log("Getting archive of image %s" % image_names[0])
+ try:
+ chunks = self.client._stream_raw_result(
+ self.client._get(self.client._url('/images/{0}/get', image_names[0]), stream=True),
+ DEFAULT_DATA_CHUNK_SIZE,
+ False,
+ )
+ except Exception as exc:
+ self.fail("Error getting image %s - %s" % (image_names[0], to_native(exc)))
+ else:
+ self.log("Getting archive of images %s" % image_names_str)
+ try:
+ chunks = self.client._stream_raw_result(
+ self.client._get(
+ self.client._url('/images/get'),
+ stream=True,
+ params={'names': image_names},
+ ),
+ DEFAULT_DATA_CHUNK_SIZE,
+ False,
+ )
+ except Exception as exc:
+ self.fail("Error getting images %s - %s" % (image_names_str, to_native(exc)))
+
+ self.write_chunks(chunks)
+
+ def run(self):
+ tag = self.tag
+ if not tag:
+ tag = "latest"
+
+ images = []
+ for name in self.names:
+ if 'id' in name:
+ image = self.client.find_image_by_id(name['id'], accept_missing_image=True)
+ else:
+ image = self.client.find_image(name=name['name'], tag=name['tag'])
+ if not image:
+ self.fail("Image %s not found" % name['joined'])
+ images.append(image)
+
+ # Will have a 'sha256:' prefix
+ name['id'] = image['Id']
+
+ results = {
+ 'changed': False,
+ 'images': images,
+ }
+
+ reason = self.get_export_reason()
+ if reason is not None:
+ results['msg'] = reason
+ results['changed'] = True
+
+ if not self.check_mode:
+ self.export_images()
+
+ return results
+
+
+def main():
+ argument_spec = dict(
+ path=dict(type='path'),
+ force=dict(type='bool', default=False),
+ names=dict(type='list', elements='str', required=True, aliases=['name']),
+ tag=dict(type='str', default='latest'),
+ )
+
+ client = AnsibleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ try:
+ results = ImageExportManager(client).run()
+ client.module.exit_json(**results)
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+ except RequestException as e:
+ client.fail(
+ 'An unexpected requests error occurred when trying to talk to the Docker daemon: {0}'.format(to_native(e)),
+ exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_info.py b/ansible_collections/community/docker/plugins/modules/docker_image_info.py
index e4f480b1c..2f441672f 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_image_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_info.py
@@ -19,8 +19,8 @@ description:
- If an image does not exist locally, it will not appear in the results. If you want to check whether an image exists
locally, you can call the module with the image name, then check whether the result list is empty (image does not
exist) or has one element (the image exists locally).
- - The module will not attempt to pull images from registries. Use M(community.docker.docker_image) with I(source) set to C(pull)
- to ensure an image is pulled.
+ - The module will not attempt to pull images from registries. Use M(community.docker.docker_image) with
+ O(community.docker.docker_image#module:source=pull) to ensure an image is pulled.
notes:
- This module was called C(docker_image_facts) before Ansible 2.8. The usage did not change.
@@ -35,7 +35,7 @@ options:
name:
description:
- An image name or a list of image names. Name format will be C(name[:tag]) or C(repository/name[:tag]),
- where C(tag) is optional. If a tag is not provided, C(latest) will be used. Instead of image names, also
+ where C(tag) is optional. If a tag is not provided, V(latest) will be used. Instead of image names, also
image IDs can be used.
- If no name is provided, a list of all images will be returned.
type: list
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_load.py b/ansible_collections/community/docker/plugins/modules/docker_image_load.py
index 880ae4e4c..ec628d1ba 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_image_load.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_load.py
@@ -39,14 +39,17 @@ options:
type: path
required: true
-notes:
- - Does not support C(check_mode).
-
requirements:
- "Docker API >= 1.25"
author:
- Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_image_export
+ - module: community.docker.docker_image_push
+ - module: community.docker.docker_image_remove
+ - module: community.docker.docker_image_tag
'''
EXAMPLES = '''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_pull.py b/ansible_collections/community/docker/plugins/modules/docker_image_pull.py
new file mode 100644
index 000000000..a70942b3f
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_pull.py
@@ -0,0 +1,223 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+---
+module: docker_image_pull
+
+short_description: Pull Docker images from registries
+
+version_added: 3.6.0
+
+description:
+ - Pulls a Docker image from a registry.
+
+extends_documentation_fragment:
+ - community.docker.docker.api_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: partial
+ details:
+ - When trying to pull an image with O(pull=always), the module assumes this is always changed in check mode.
+ - When check mode is combined with diff mode, the pulled image's ID is always shown as V(unknown) in the diff.
+ diff_mode:
+ support: full
+
+options:
+ name:
+ description:
+ - "Image name. Name format must be one of V(name), V(repository/name), or V(registry_server:port/name).
+ - The name can optionally include the tag by appending V(:tag_name), or it can contain a digest by appending V(@hash:digest)."
+ type: str
+ required: true
+ tag:
+ description:
+ - Used to select an image when pulling. Defaults to V(latest).
+ - If O(name) parameter format is C(name:tag) or C(image@hash:digest), then O(tag) will be ignored.
+ type: str
+ default: latest
+ platform:
+ description:
+ - Ask for this specific platform when pulling.
+ type: str
+ pull:
+ description:
+ - Determines when to pull an image.
+ - If V(always), will always pull the image.
+ - If V(not_present), will only pull the image if no image of the name exists on the current Docker daemon,
+ or if O(platform) does not match.
+ type: str
+ choices:
+ - always
+ - not_present
+ default: always
+
+requirements:
+ - "Docker API >= 1.25"
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_image_pull
+ - module: community.docker.docker_image_remove
+ - module: community.docker.docker_image_tag
+'''
+
+EXAMPLES = '''
+- name: Pull an image
+ community.docker.docker_image_pull:
+ name: pacur/centos-7
+ # Select platform for pulling. If not specified, will pull whatever docker prefers.
+ platform: amd64
+'''
+
+RETURN = '''
+image:
+ description: Image inspection results for the affected image.
+ returned: success
+ type: dict
+ sample: {}
+'''
+
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_api import (
+ AnsibleDockerClient,
+ RequestException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.util import (
+ DockerBaseClass,
+ is_image_name_id,
+ is_valid_tag,
+)
+
+from ansible_collections.community.docker.plugins.module_utils._api.errors import DockerException
+from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
+ parse_repository_tag,
+)
+
+from ansible_collections.community.docker.plugins.module_utils._platform import (
+ normalize_platform_string,
+ compare_platform_strings,
+ compose_platform_string,
+)
+
+
+def image_info(image):
+ result = {}
+ if image:
+ result['id'] = image['Id']
+ else:
+ result['exists'] = False
+ return result
+
+
+class ImagePuller(DockerBaseClass):
+ def __init__(self, client):
+ super(ImagePuller, self).__init__()
+
+ self.client = client
+ self.check_mode = self.client.check_mode
+
+ parameters = self.client.module.params
+ self.name = parameters['name']
+ self.tag = parameters['tag']
+ self.platform = parameters['platform']
+ self.pull_mode = parameters['pull']
+
+ if is_image_name_id(self.name):
+ self.client.fail("Cannot pull an image by ID")
+ if not is_valid_tag(self.tag, allow_empty=True):
+ self.client.fail('"{0}" is not a valid docker tag!'.format(self.tag))
+
+ # If name contains a tag, it takes precedence over tag parameter.
+ repo, repo_tag = parse_repository_tag(self.name)
+ if repo_tag:
+ self.name = repo
+ self.tag = repo_tag
+
+ def pull(self):
+ image = self.client.find_image(name=self.name, tag=self.tag)
+ results = dict(
+ changed=False,
+ actions=[],
+ image=image or {},
+ diff=dict(before=image_info(image), after=image_info(image)),
+ )
+
+ if image and self.pull_mode == 'not_present':
+ if self.platform is None:
+ return results
+ host_info = self.client.info()
+ wanted_platform = normalize_platform_string(
+ self.platform,
+ daemon_os=host_info.get('OSType'),
+ daemon_arch=host_info.get('Architecture'),
+ )
+ image_platform = compose_platform_string(
+ os=image.get('Os'),
+ arch=image.get('Architecture'),
+ variant=image.get('Variant'),
+ daemon_os=host_info.get('OSType'),
+ daemon_arch=host_info.get('Architecture'),
+ )
+ if compare_platform_strings(wanted_platform, image_platform):
+ return results
+
+ results['actions'].append('Pulled image %s:%s' % (self.name, self.tag))
+ if self.check_mode:
+ results['changed'] = True
+ results['diff']['after'] = image_info(dict(Id='unknown'))
+ else:
+ results['image'], not_changed = self.client.pull_image(self.name, tag=self.tag, platform=self.platform)
+ results['changed'] = not not_changed
+ results['diff']['after'] = image_info(results['image'])
+
+ return results
+
+
+def main():
+ argument_spec = dict(
+ name=dict(type='str', required=True),
+ tag=dict(type='str', default='latest'),
+ platform=dict(type='str'),
+ pull=dict(type='str', choices=['always', 'not_present'], default='always'),
+ )
+
+ option_minimal_versions = dict(
+ platform=dict(docker_api_version='1.32'),
+ )
+
+ client = AnsibleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ option_minimal_versions=option_minimal_versions,
+ )
+
+ try:
+ results = ImagePuller(client).pull()
+ client.module.exit_json(**results)
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+ except RequestException as e:
+ client.fail(
+ 'An unexpected requests error occurred when trying to talk to the Docker daemon: {0}'.format(to_native(e)),
+ exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_push.py b/ansible_collections/community/docker/plugins/modules/docker_image_push.py
new file mode 100644
index 000000000..f1474d838
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_push.py
@@ -0,0 +1,197 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+---
+module: docker_image_push
+
+short_description: Push Docker images to registries
+
+version_added: 3.6.0
+
+description:
+ - Pushes a Docker image to a registry.
+
+extends_documentation_fragment:
+ - community.docker.docker.api_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: none
+ diff_mode:
+ support: none
+
+options:
+ name:
+ description:
+ - "Image name. Name format must be one of V(name), V(repository/name), or V(registry_server:port/name).
+ - The name can optionally include the tag by appending V(:tag_name), or it can contain a digest by appending V(@hash:digest)."
+ type: str
+ required: true
+ tag:
+ description:
+ - Select which image to push. Defaults to V(latest).
+ - If O(name) parameter format is C(name:tag) or C(image@hash:digest), then O(tag) will be ignored.
+ type: str
+ default: latest
+
+requirements:
+ - "Docker API >= 1.25"
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_image_pull
+ - module: community.docker.docker_image_remove
+ - module: community.docker.docker_image_tag
+'''
+
+EXAMPLES = '''
+- name: Push an image
+ community.docker.docker_image_push:
+ name: registry.example.com:5000/repo/image
+ tag: latest
+'''
+
+RETURN = '''
+image:
+ description: Image inspection results for the affected image.
+ returned: success
+ type: dict
+ sample: {}
+'''
+
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_api import (
+ AnsibleDockerClient,
+ RequestException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.util import (
+ DockerBaseClass,
+ is_image_name_id,
+ is_valid_tag,
+)
+
+from ansible_collections.community.docker.plugins.module_utils._api.errors import DockerException
+from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
+ parse_repository_tag,
+)
+
+from ansible_collections.community.docker.plugins.module_utils._api.auth import (
+ get_config_header,
+ resolve_repository_name,
+)
+
+
+class ImagePusher(DockerBaseClass):
+ def __init__(self, client):
+ super(ImagePusher, self).__init__()
+
+ self.client = client
+ self.check_mode = self.client.check_mode
+
+ parameters = self.client.module.params
+ self.name = parameters['name']
+ self.tag = parameters['tag']
+
+ if is_image_name_id(self.name):
+ self.client.fail("Cannot push an image by ID")
+ if not is_valid_tag(self.tag, allow_empty=True):
+ self.client.fail('"{0}" is not a valid docker tag!'.format(self.tag))
+
+ # If name contains a tag, it takes precedence over tag parameter.
+ repo, repo_tag = parse_repository_tag(self.name)
+ if repo_tag:
+ self.name = repo
+ self.tag = repo_tag
+
+ if is_image_name_id(self.tag):
+ self.client.fail("Cannot push an image by digest")
+ if not is_valid_tag(self.tag, allow_empty=False):
+ self.client.fail('"{0}" is not a valid docker tag!'.format(self.tag))
+
+ def push(self):
+ image = self.client.find_image(name=self.name, tag=self.tag)
+ if not image:
+ self.client.fail('Cannot find image %s:%s' % (self.name, self.tag))
+
+ results = dict(
+ changed=False,
+ actions=[],
+ image=image,
+ )
+
+ push_registry, push_repo = resolve_repository_name(self.name)
+ try:
+ results['actions'].append('Pushed image %s:%s' % (self.name, self.tag))
+
+ headers = {}
+ header = get_config_header(self.client, push_registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+ response = self.client._post_json(
+ self.client._url("/images/{0}/push", self.name),
+ data=None,
+ headers=headers,
+ stream=True,
+ params={'tag': self.tag},
+ )
+ self.client._raise_for_status(response)
+ for line in self.client._stream_helper(response, decode=True):
+ self.log(line, pretty_print=True)
+ if line.get('errorDetail'):
+ raise Exception(line['errorDetail']['message'])
+ status = line.get('status')
+ if status == 'Pushing':
+ results['changed'] = True
+ except Exception as exc:
+ if 'unauthorized' in str(exc):
+ if 'authentication required' in str(exc):
+ self.client.fail("Error pushing image %s/%s:%s - %s. Try logging into %s first." %
+ (push_registry, push_repo, self.tag, to_native(exc), push_registry))
+ else:
+ self.client.fail("Error pushing image %s/%s:%s - %s. Does the repository exist?" %
+ (push_registry, push_repo, self.tag, str(exc)))
+ self.client.fail("Error pushing image %s:%s: %s" % (self.name, self.tag, to_native(exc)))
+
+ return results
+
+
+def main():
+ argument_spec = dict(
+ name=dict(type='str', required=True),
+ tag=dict(type='str', default='latest'),
+ )
+
+ client = AnsibleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=False,
+ )
+
+ try:
+ results = ImagePusher(client).push()
+ client.module.exit_json(**results)
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+ except RequestException as e:
+ client.fail(
+ 'An unexpected requests error occurred when trying to talk to the Docker daemon: {0}'.format(to_native(e)),
+ exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_remove.py b/ansible_collections/community/docker/plugins/modules/docker_image_remove.py
new file mode 100644
index 000000000..c8ea326b2
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_remove.py
@@ -0,0 +1,269 @@
+#!/usr/bin/python
+#
+# Copyright 2016 Red Hat | Ansible
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+---
+module: docker_image_remove
+
+short_description: Remove Docker images
+
+version_added: 3.6.0
+
+description:
+ - Remove Docker images from the Docker daemon.
+
+extends_documentation_fragment:
+ - community.docker.docker.api_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: full
+ diff_mode:
+ support: full
+
+options:
+ name:
+ description:
+ - "Image name. Name format will be one of: C(name), C(repository/name), C(registry_server:port/name).
+ When pushing or pulling an image the name can optionally include the tag by appending C(:tag_name)."
+ - Note that image IDs (hashes) can also be used.
+ type: str
+ required: true
+ tag:
+ description:
+ - Tag for the image name O(name) that is to be tagged.
+ - If O(name)'s format is C(name:tag), then the tag value from O(name) will take precedence.
+ type: str
+ default: latest
+ force:
+ description:
+ - Un-tag and remove all images matching the specified name.
+ type: bool
+ default: false
+ prune:
+ description:
+ - Delete untagged parent images.
+ type: bool
+ default: true
+
+requirements:
+ - "Docker API >= 1.25"
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_image_load
+ - module: community.docker.docker_image_pull
+ - module: community.docker.docker_image_tag
+'''
+
+EXAMPLES = '''
+
+- name: Remove an image
+ community.docker.docker_image_remove:
+ name: pacur/centos-7
+'''
+
+RETURN = '''
+image:
+ description:
+ - Image inspection results for the affected image before removal.
+ - Empty if the image was not found.
+ returned: success
+ type: dict
+ sample: {}
+deleted:
+ description:
+ - The digests of the images that were deleted.
+ returned: success
+ type: list
+ elements: str
+ sample: []
+untagged:
+ description:
+ - The digests of the images that were untagged.
+ returned: success
+ type: list
+ elements: str
+ sample: []
+'''
+
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_api import (
+ AnsibleDockerClient,
+ RequestException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.util import (
+ DockerBaseClass,
+ is_image_name_id,
+ is_valid_tag,
+)
+
+from ansible_collections.community.docker.plugins.module_utils._api.errors import DockerException, NotFound
+from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
+ parse_repository_tag,
+)
+
+
+class ImageRemover(DockerBaseClass):
+
+ def __init__(self, client):
+ super(ImageRemover, self).__init__()
+
+ self.client = client
+ self.check_mode = self.client.check_mode
+ self.diff = self.client.module._diff
+
+ parameters = self.client.module.params
+ self.name = parameters['name']
+ self.tag = parameters['tag']
+ self.force = parameters['force']
+ self.prune = parameters['prune']
+
+ if not is_valid_tag(self.tag, allow_empty=True):
+ self.fail('"{0}" is not a valid docker tag'.format(self.tag))
+
+ # If name contains a tag, it takes precedence over tag parameter.
+ if not is_image_name_id(self.name):
+ repo, repo_tag = parse_repository_tag(self.name)
+ if repo_tag:
+ self.name = repo
+ self.tag = repo_tag
+
+ def fail(self, msg):
+ self.client.fail(msg)
+
+ def get_diff_state(self, image):
+ if not image:
+ return dict(exists=False)
+ return dict(
+ exists=True,
+ id=image['Id'],
+ tags=sorted(image.get('RepoTags') or []),
+ digests=sorted(image.get('RepoDigests') or []),
+ )
+
+ def absent(self):
+ results = dict(
+ changed=False,
+ actions=[],
+ image={},
+ deleted=[],
+ untagged=[],
+ )
+
+ name = self.name
+ if is_image_name_id(name):
+ image = self.client.find_image_by_id(name, accept_missing_image=True)
+ else:
+ image = self.client.find_image(name, self.tag)
+ if self.tag:
+ name = "%s:%s" % (self.name, self.tag)
+
+ if self.diff:
+ results['diff'] = dict(before=self.get_diff_state(image))
+
+ if not image:
+ if self.diff:
+ results['diff']['after'] = self.get_diff_state(image)
+ return results
+
+ results['changed'] = True
+ results['actions'].append("Removed image %s" % (name))
+ results['image'] = image
+
+ if not self.check_mode:
+ try:
+ res = self.client.delete_json('/images/{0}', name, params={'force': self.force, 'noprune': not self.prune})
+ except NotFound:
+ # If the image vanished while we were trying to remove it, don't fail
+ res = []
+ except Exception as exc:
+ self.fail("Error removing image %s - %s" % (name, to_native(exc)))
+
+ for entry in res:
+ if entry.get('Untagged'):
+ results['untagged'].append(entry['Untagged'])
+ if entry.get('Deleted'):
+ results['deleted'].append(entry['Deleted'])
+
+ results['untagged'] = sorted(results['untagged'])
+ results['deleted'] = sorted(results['deleted'])
+
+ if self.diff:
+ image_after = self.client.find_image_by_id(image['Id'], accept_missing_image=True)
+ results['diff']['after'] = self.get_diff_state(image_after)
+
+ elif is_image_name_id(name):
+ results['deleted'].append(image['Id'])
+ results['untagged'] = sorted((image.get('RepoTags') or []) + (image.get('RepoDigests') or []))
+ if not self.force and results['untagged']:
+ self.fail('Cannot delete image by ID that is still in use - use force=true')
+ if self.diff:
+ results['diff']['after'] = self.get_diff_state({})
+
+ elif is_image_name_id(self.tag):
+ results['untagged'].append(name)
+ if len(image.get('RepoTags') or []) < 1 and len(image.get('RepoDigests') or []) < 2:
+ results['deleted'].append(image['Id'])
+ if self.diff:
+ results['diff']['after'] = self.get_diff_state(image)
+ try:
+ results['diff']['after']['digests'].remove(name)
+ except ValueError:
+ pass
+
+ else:
+ results['untagged'].append(name)
+ if len(image.get('RepoTags') or []) < 2 and len(image.get('RepoDigests') or []) < 1:
+ results['deleted'].append(image['Id'])
+ if self.diff:
+ results['diff']['after'] = self.get_diff_state(image)
+ try:
+ results['diff']['after']['tags'].remove(name)
+ except ValueError:
+ pass
+
+ return results
+
+
+def main():
+ argument_spec = dict(
+ name=dict(type='str', required=True),
+ tag=dict(type='str', default='latest'),
+ force=dict(type='bool', default=False),
+ prune=dict(type='bool', default=True),
+ )
+
+ client = AnsibleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ try:
+ results = ImageRemover(client).absent()
+ client.module.exit_json(**results)
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+ except RequestException as e:
+ client.fail(
+ 'An unexpected requests error occurred when trying to talk to the Docker daemon: {0}'.format(to_native(e)),
+ exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_image_tag.py b/ansible_collections/community/docker/plugins/modules/docker_image_tag.py
new file mode 100644
index 000000000..c395a7fca
--- /dev/null
+++ b/ansible_collections/community/docker/plugins/modules/docker_image_tag.py
@@ -0,0 +1,273 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+DOCUMENTATION = '''
+---
+module: docker_image_tag
+
+short_description: Tag Docker images with new names and/or tags
+
+version_added: 3.6.0
+
+description:
+ - This module allows to tag Docker images with new names and/or tags.
+
+extends_documentation_fragment:
+ - community.docker.docker.api_documentation
+ - community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
+
+attributes:
+ check_mode:
+ support: full
+ diff_mode:
+ support: full
+
+options:
+ name:
+ description:
+ - "Image name. Name format will be one of: C(name), C(repository/name), C(registry_server:port/name).
+ When pushing or pulling an image the name can optionally include the tag by appending C(:tag_name)."
+ - Note that image IDs (hashes) can also be used.
+ type: str
+ required: true
+ tag:
+ description:
+ - Tag for the image name O(name) that is to be tagged.
+ - If O(name)'s format is C(name:tag), then the tag value from O(name) will take precedence.
+ type: str
+ default: latest
+ repository:
+ description:
+ - List of new image names to tag the image as.
+ - Expects format C(repository:tag). If no tag is provided, will use the value of the O(tag) parameter if present, or V(latest).
+ type: list
+ elements: str
+ required: true
+ existing_images:
+ description:
+ - Defines the behavior if the image to be tagged already exists and is another image than the one identified by O(name) and O(tag).
+ - If set to V(keep), the tagged image is kept.
+ - If set to V(overwrite), the tagged image is overwritten by the specified one.
+ type: str
+ choices:
+ - keep
+ - overwrite
+ default: overwrite
+
+requirements:
+ - "Docker API >= 1.25"
+
+author:
+ - Felix Fontein (@felixfontein)
+
+seealso:
+ - module: community.docker.docker_image_push
+ - module: community.docker.docker_image_remove
+'''
+
+EXAMPLES = '''
+- name: Tag Python 3.12 image with two new names
+ community.docker.docker_image_tag:
+ name: python:3.12
+ repository:
+ - python-3:3.12
+ - local-registry:5000/python-3/3.12:latest
+'''
+
+RETURN = '''
+image:
+ description: Image inspection results for the affected image.
+ returned: success
+ type: dict
+ sample: {}
+tagged_images:
+ description:
+ - A list of images that got tagged.
+ returned: success
+ type: list
+ elements: str
+ sample:
+ - python-3:3.12
+'''
+
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+from ansible.module_utils.common.text.formatters import human_to_bytes
+
+from ansible_collections.community.docker.plugins.module_utils.common_api import (
+ AnsibleDockerClient,
+ RequestException,
+)
+
+from ansible_collections.community.docker.plugins.module_utils.util import (
+ DockerBaseClass,
+ is_image_name_id,
+ is_valid_tag,
+)
+
+from ansible_collections.community.docker.plugins.module_utils._api.errors import DockerException
+from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
+ parse_repository_tag,
+)
+
+
+def convert_to_bytes(value, module, name, unlimited_value=None):
+ if value is None:
+ return value
+ try:
+ if unlimited_value is not None and value in ('unlimited', str(unlimited_value)):
+ return unlimited_value
+ return human_to_bytes(value)
+ except ValueError as exc:
+ module.fail_json(msg='Failed to convert %s to bytes: %s' % (name, to_native(exc)))
+
+
+def image_info(name, tag, image):
+ result = dict(name=name, tag=tag)
+ if image:
+ result['id'] = image['Id']
+ else:
+ result['exists'] = False
+ return result
+
+
+class ImageTagger(DockerBaseClass):
+ def __init__(self, client):
+ super(ImageTagger, self).__init__()
+
+ self.client = client
+ parameters = self.client.module.params
+ self.check_mode = self.client.check_mode
+
+ self.name = parameters['name']
+ self.tag = parameters['tag']
+ if not is_valid_tag(self.tag, allow_empty=True):
+ self.fail('"{0}" is not a valid docker tag'.format(self.tag))
+
+ # If name contains a tag, it takes precedence over tag parameter.
+ if not is_image_name_id(self.name):
+ repo, repo_tag = parse_repository_tag(self.name)
+ if repo_tag:
+ self.name = repo
+ self.tag = repo_tag
+
+ self.keep_existing_images = parameters['existing_images'] == 'keep'
+
+ # Make sure names in repository are valid images, and add tag if needed
+ self.repositories = []
+ for i, repository in enumerate(parameters['repository']):
+ if is_image_name_id(repository):
+ self.fail("repository[%d] must not be an image ID; got: %s" % (i + 1, repository))
+ repo, repo_tag = parse_repository_tag(repository)
+ if not repo_tag:
+ repo_tag = parameters['tag']
+ elif not is_valid_tag(repo_tag, allow_empty=False):
+ self.fail("repository[%d] must not have a digest; got: %s" % (i + 1, repository))
+ self.repositories.append((repo, repo_tag))
+
+ def fail(self, msg):
+ self.client.fail(msg)
+
+ def tag_image(self, image, name, tag):
+ tagged_image = self.client.find_image(name=name, tag=tag)
+ if tagged_image:
+ # Idempotency checks
+ if tagged_image['Id'] == image['Id']:
+ return (
+ False,
+ "target image already exists (%s) and is as expected" % tagged_image['Id'],
+ tagged_image,
+ )
+ if self.keep_existing_images:
+ return (
+ False,
+ "target image already exists (%s) and is not as expected, but kept" % tagged_image['Id'],
+ tagged_image,
+ )
+ msg = "target image existed (%s) and was not as expected" % tagged_image['Id']
+ else:
+ msg = "target image did not exist"
+
+ if not self.check_mode:
+ try:
+ params = {
+ 'tag': tag,
+ 'repo': name,
+ 'force': True,
+ }
+ res = self.client._post(self.client._url('/images/{0}/tag', image['Id']), params=params)
+ self.client._raise_for_status(res)
+ if res.status_code != 201:
+ raise Exception("Tag operation failed.")
+ except Exception as exc:
+ self.fail("Error: failed to tag image as %s:%s - %s" % (name, tag, to_native(exc)))
+
+ return True, msg, tagged_image
+
+ def tag_images(self):
+ if is_image_name_id(self.name):
+ image = self.client.find_image_by_id(self.name, accept_missing_image=False)
+ else:
+ image = self.client.find_image(name=self.name, tag=self.tag)
+ if not image:
+ self.fail("Cannot find image %s:%s" % (self.name, self.tag))
+
+ before = []
+ after = []
+ tagged_images = []
+ results = dict(
+ changed=False,
+ actions=[],
+ image=image,
+ tagged_images=tagged_images,
+ diff=dict(before=dict(images=before), after=dict(images=after)),
+ )
+ for repository, tag in self.repositories:
+ tagged, msg, old_image = self.tag_image(image, repository, tag)
+ before.append(image_info(repository, tag, old_image))
+ after.append(image_info(repository, tag, image if tagged else old_image))
+ if tagged:
+ results['changed'] = True
+ results['actions'].append('Tagged image %s as %s:%s: %s' % (image['Id'], repository, tag, msg))
+ tagged_images.append('%s:%s' % (repository, tag))
+ else:
+ results['actions'].append('Not tagged image %s as %s:%s: %s' % (image['Id'], repository, tag, msg))
+
+ return results
+
+
+def main():
+ argument_spec = dict(
+ name=dict(type='str', required=True),
+ tag=dict(type='str', default='latest'),
+ repository=dict(type='list', elements='str', required=True),
+ existing_images=dict(type='str', choices=['keep', 'overwrite'], default='overwrite'),
+ )
+
+ client = AnsibleDockerClient(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ try:
+ results = ImageTagger(client).tag_images()
+ client.module.exit_json(**results)
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
+ except RequestException as e:
+ client.fail(
+ 'An unexpected requests error occurred when trying to talk to the Docker daemon: {0}'.format(to_native(e)),
+ exception=traceback.format_exc())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/plugins/modules/docker_login.py b/ansible_collections/community/docker/plugins/modules/docker_login.py
index 360dd5785..bb4e00b87 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_login.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_login.py
@@ -46,12 +46,12 @@ options:
username:
description:
- The username for the registry account.
- - Required when I(state) is C(present).
+ - Required when O(state=present).
type: str
password:
description:
- The plaintext password for the registry account.
- - Required when I(state) is C(present).
+ - Required when O(state=present).
type: str
reauthorize:
description:
@@ -69,7 +69,7 @@ options:
- dockercfg_path
state:
description:
- - This controls the current state of the user. C(present) will login in a user, C(absent) will log them out.
+ - This controls the current state of the user. V(present) will login in a user, V(absent) will log them out.
- To logout you only need the registry server, which defaults to DockerHub.
- Before 2.1 you could ONLY log in.
- Docker does not support 'logout' with a custom config file.
@@ -112,7 +112,7 @@ EXAMPLES = '''
RETURN = '''
login_results:
description: Results from the login.
- returned: when I(state=present)
+ returned: when O(state=present)
type: dict
sample: {
"serveraddress": "localhost:5000",
@@ -261,7 +261,7 @@ class LoginManager(DockerBaseClass):
def run(self):
'''
- Do the actuall work of this task here. This allows instantiation for partial
+ Do the actual work of this task here. This allows instantiation for partial
testing.
'''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_network.py b/ansible_collections/community/docker/plugins/modules/docker_network.py
index db9323636..5670ceea0 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_network.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_network.py
@@ -61,8 +61,8 @@ options:
force:
description:
- - With state C(absent) forces disconnecting all containers from the
- network prior to deleting the network. With state C(present) will
+ - With state V(absent) forces disconnecting all containers from the
+ network prior to deleting the network. With state V(present) will
disconnect all containers, delete the network and re-create the
network.
- This option is required if you have changed the IPAM or driver options
@@ -73,7 +73,7 @@ options:
appends:
description:
- By default the connected list is canonical, meaning containers not on the list are removed from the network.
- - Use I(appends) to leave existing containers connected.
+ - Use O(appends) to leave existing containers connected.
type: bool
default: false
aliases:
@@ -98,7 +98,7 @@ options:
description:
- List of IPAM config blocks. Consult
L(Docker docs,https://docs.docker.com/compose/compose-file/compose-file-v2/#ipam) for valid options and values.
- Note that I(iprange) is spelled differently here (we use the notation from the Docker SDK for Python).
+ Note that O(ipam_config[].iprange) is spelled differently here (we use the notation from the Docker SDK for Python).
type: list
elements: dict
suboptions:
@@ -121,14 +121,14 @@ options:
state:
description:
- - C(absent) deletes the network. If a network has connected containers, it
- cannot be deleted. Use the I(force) option to disconnect all containers
+ - V(absent) deletes the network. If a network has connected containers, it
+ cannot be deleted. Use the O(force) option to disconnect all containers
and delete the network.
- - C(present) creates the network, if it does not already exist with the
+ - V(present) creates the network, if it does not already exist with the
specified parameters, and connects the list of containers provided via
the connected parameter. Containers not on the list will be disconnected.
An empty list will leave no containers connected to the network. Use the
- I(appends) option to leave existing containers connected. Use the I(force)
+ O(appends) option to leave existing containers connected. Use the O(force)
options to force re-creation of the network.
type: str
default: present
@@ -163,7 +163,7 @@ options:
notes:
- When network options are changed, the module disconnects all containers from the network, deletes the network, and re-creates the network.
- It does not try to reconnect containers, except the ones listed in (I(connected), and even for these, it does not consider specific
+ It does not try to reconnect containers, except the ones listed in (O(connected), and even for these, it does not consider specific
connection options like fixed IP addresses or MAC addresses. If you need more control over how the containers are connected to the
network, loop the M(community.docker.docker_container) module to loop over your containers to make sure they are connected properly.
- The module does not support Docker Swarm. This means that it will not try to disconnect or reconnect services. If services are connected to the
diff --git a/ansible_collections/community/docker/plugins/modules/docker_network_info.py b/ansible_collections/community/docker/plugins/modules/docker_network_info.py
index 9818baad5..c2c445bd1 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_network_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_network_info.py
@@ -66,7 +66,7 @@ exists:
network:
description:
- Facts representing the current state of the network. Matches the docker inspection output.
- - Will be C(none) if network does not exist.
+ - Will be V(none) if network does not exist.
returned: always
type: dict
sample: {
diff --git a/ansible_collections/community/docker/plugins/modules/docker_node.py b/ansible_collections/community/docker/plugins/modules/docker_node.py
index d097b07f7..bfa369e98 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_node.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_node.py
@@ -39,19 +39,19 @@ options:
labels:
description:
- User-defined key/value metadata that will be assigned as node attribute.
- - Label operations in this module apply to the docker swarm node specified by I(hostname).
+ - Label operations in this module apply to the docker swarm node specified by O(hostname).
Use M(community.docker.docker_swarm) module to add/modify/remove swarm cluster labels.
- The actual state of labels assigned to the node when module completes its work depends on
- I(labels_state) and I(labels_to_remove) parameters values. See description below.
+ O(labels_state) and O(labels_to_remove) parameters values. See description below.
type: dict
labels_state:
description:
- - It defines the operation on the labels assigned to node and labels specified in I(labels) option.
- - Set to C(merge) to combine labels provided in I(labels) with those already assigned to the node.
+ - It defines the operation on the labels assigned to node and labels specified in O(labels) option.
+ - Set to V(merge) to combine labels provided in O(labels) with those already assigned to the node.
If no labels are assigned then it will add listed labels. For labels that are already assigned
- to the node, it will update their values. The labels not specified in I(labels) will remain unchanged.
- If I(labels) is empty then no changes will be made.
- - Set to C(replace) to replace all assigned labels with provided ones. If I(labels) is empty then
+ to the node, it will update their values. The labels not specified in O(labels) will remain unchanged.
+ If O(labels) is empty then no changes will be made.
+ - Set to V(replace) to replace all assigned labels with provided ones. If O(labels) is empty then
all labels assigned to the node will be removed.
type: str
default: 'merge'
@@ -63,10 +63,10 @@ options:
- List of labels that will be removed from the node configuration. The list has to contain only label
names, not their values.
- If the label provided on the list is not assigned to the node, the entry is ignored.
- - If the label is both on the I(labels_to_remove) and I(labels), then value provided in I(labels) remains
+ - If the label is both on the O(labels_to_remove) and O(labels), then value provided in O(labels) remains
assigned to the node.
- - If I(labels_state) is C(replace) and I(labels) is not provided or empty then all labels assigned to
- node are removed and I(labels_to_remove) is ignored.
+ - If O(labels_state=replace) and O(labels) is not provided or empty then all labels assigned to
+ node are removed and O(labels_to_remove) is ignored.
type: list
elements: str
availability:
diff --git a/ansible_collections/community/docker/plugins/modules/docker_node_info.py b/ansible_collections/community/docker/plugins/modules/docker_node_info.py
index d943db31b..c64de0f8d 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_node_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_node_info.py
@@ -33,14 +33,14 @@ options:
- The list of nodes names to inspect.
- If empty then return information of all nodes in Swarm cluster.
- When identifying the node use either the hostname of the node (as registered in Swarm) or node ID.
- - If I(self) is C(true) then this parameter is ignored.
+ - If O(self=true) then this parameter is ignored.
type: list
elements: str
self:
description:
- - If C(true), queries the node (that is, the docker daemon) the module communicates with.
- - If C(true) then I(name) is ignored.
- - If C(false) then query depends on I(name) presence and value.
+ - If V(true), queries the node (that is, the docker daemon) the module communicates with.
+ - If V(true) then O(name) is ignored.
+ - If V(false) then query depends on O(name) presence and value.
type: bool
default: false
@@ -79,8 +79,8 @@ RETURN = '''
nodes:
description:
- Facts representing the current state of the nodes. Matches the C(docker node inspect) output.
- - Can contain multiple entries if more than one node provided in I(name), or I(name) is not provided.
- - If I(name) contains a list of nodes, the output will provide information on all nodes registered
+ - Can contain multiple entries if more than one node provided in O(name), or O(name) is not provided.
+ - If O(name) contains a list of nodes, the output will provide information on all nodes registered
at the swarm, including nodes that left the swarm but have not been removed from the cluster on swarm
managers and nodes that are unreachable.
returned: always
diff --git a/ansible_collections/community/docker/plugins/modules/docker_plugin.py b/ansible_collections/community/docker/plugins/modules/docker_plugin.py
index 9bb850665..e7242e8eb 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_plugin.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_plugin.py
@@ -17,6 +17,8 @@ version_added: 1.3.0
description:
- This module allows to install, delete, enable and disable Docker plugins.
- Performs largely the same function as the C(docker plugin) CLI subcommand.
+notes:
+ - The C(--grant-all-permissions) CLI flag is true by default in this module.
extends_documentation_fragment:
- community.docker.docker.api_documentation
@@ -38,10 +40,10 @@ options:
state:
description:
- - C(absent) remove the plugin.
- - C(present) install the plugin, if it does not already exist.
- - C(enable) enable the plugin.
- - C(disable) disable the plugin.
+ - V(absent) remove the plugin.
+ - V(present) install the plugin, if it does not already exist.
+ - V(enable) enable the plugin.
+ - V(disable) disable the plugin.
default: present
choices:
- absent
@@ -121,7 +123,7 @@ plugin:
actions:
description:
- List of actions performed during task execution.
- returned: when I(state!=absent)
+ returned: when O(state) is not V(absent)
type: list
'''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_prune.py b/ansible_collections/community/docker/plugins/modules/docker_prune.py
index 1557f85a4..1dfbf290e 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_prune.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_prune.py
@@ -124,14 +124,14 @@ RETURN = '''
containers:
description:
- List of IDs of deleted containers.
- returned: I(containers) is C(true)
+ returned: O(containers=true)
type: list
elements: str
sample: []
containers_space_reclaimed:
description:
- Amount of reclaimed disk space from container pruning in bytes.
- returned: I(containers) is C(true)
+ returned: O(containers=true)
type: int
sample: 0
@@ -139,14 +139,14 @@ containers_space_reclaimed:
images:
description:
- List of IDs of deleted images.
- returned: I(images) is C(true)
+ returned: O(images=true)
type: list
elements: str
sample: []
images_space_reclaimed:
description:
- Amount of reclaimed disk space from image pruning in bytes.
- returned: I(images) is C(true)
+ returned: O(images=true)
type: int
sample: 0
@@ -154,7 +154,7 @@ images_space_reclaimed:
networks:
description:
- List of IDs of deleted networks.
- returned: I(networks) is C(true)
+ returned: O(networks=true)
type: list
elements: str
sample: []
@@ -163,14 +163,14 @@ networks:
volumes:
description:
- List of IDs of deleted volumes.
- returned: I(volumes) is C(true)
+ returned: O(volumes=true)
type: list
elements: str
sample: []
volumes_space_reclaimed:
description:
- Amount of reclaimed disk space from volumes pruning in bytes.
- returned: I(volumes) is C(true)
+ returned: O(volumes=true)
type: int
sample: 0
@@ -178,7 +178,7 @@ volumes_space_reclaimed:
builder_cache_space_reclaimed:
description:
- Amount of reclaimed disk space from builder cache pruning in bytes.
- returned: I(builder_cache) is C(true)
+ returned: O(builder_cache=true)
type: int
sample: 0
'''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_secret.py b/ansible_collections/community/docker/plugins/modules/docker_secret.py
index 546756a49..cf4324541 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_secret.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_secret.py
@@ -18,7 +18,7 @@ description:
- Create and remove Docker secrets in a Swarm environment. Similar to C(docker secret create) and C(docker secret rm).
- Adds to the metadata of new secrets C(ansible_key), an encrypted hash representation of the data, which is then used
in future runs to test if a secret has changed. If C(ansible_key) is not present, then a secret will not be updated
- unless the I(force) option is set.
+ unless the O(force) option is set.
- Updates to secrets are performed by removing the secret and creating it again.
extends_documentation_fragment:
@@ -37,20 +37,20 @@ options:
data:
description:
- The value of the secret.
- - Mutually exclusive with I(data_src). One of I(data) and I(data_src) is required if I(state=present).
+ - Mutually exclusive with O(data_src). One of O(data) and O(data_src) is required if O(state=present).
type: str
data_is_b64:
description:
- - If set to C(true), the data is assumed to be Base64 encoded and will be
+ - If set to V(true), the data is assumed to be Base64 encoded and will be
decoded before being used.
- - To use binary I(data), it is better to keep it Base64 encoded and let it
+ - To use binary O(data), it is better to keep it Base64 encoded and let it
be decoded by this option.
type: bool
default: false
data_src:
description:
- The file on the target from which to read the secret.
- - Mutually exclusive with I(data). One of I(data) and I(data_src) is required if I(state=present).
+ - Mutually exclusive with O(data). One of O(data) and O(data_src) is required if O(state=present).
type: path
version_added: 1.10.0
labels:
@@ -60,22 +60,22 @@ options:
type: dict
force:
description:
- - Use with state C(present) to always remove and recreate an existing secret.
- - If C(true), an existing secret will be replaced, even if it has not changed.
+ - Use with O(state=present) to always remove and recreate an existing secret.
+ - If V(true), an existing secret will be replaced, even if it has not changed.
type: bool
default: false
rolling_versions:
description:
- - If set to C(true), secrets are created with an increasing version number appended to their name.
+ - If set to V(true), secrets are created with an increasing version number appended to their name.
- Adds a label containing the version number to the managed secrets with the name C(ansible_version).
type: bool
default: false
version_added: 2.2.0
versions_to_keep:
description:
- - When using I(rolling_versions), the number of old versions of the secret to keep.
+ - When using O(rolling_versions), the number of old versions of the secret to keep.
- Extraneous old secrets are deleted after the new one is created.
- - Set to C(-1) to keep everything or to C(0) or C(1) to keep only the current one.
+ - Set to V(-1) to keep everything or to V(0) or V(1) to keep only the current one.
type: int
default: 5
version_added: 2.2.0
@@ -86,7 +86,7 @@ options:
required: true
state:
description:
- - Set to C(present), if the secret should exist, and C(absent), if it should not.
+ - Set to V(present), if the secret should exist, and V(absent), if it should not.
type: str
default: present
choices:
@@ -175,13 +175,13 @@ RETURN = '''
secret_id:
description:
- The ID assigned by Docker to the secret object.
- returned: success and I(state) is C(present)
+ returned: success and O(state=present)
type: str
sample: 'hzehrmyjigmcp2gb6nlhmjqcv'
secret_name:
description:
- The name of the created secret object.
- returned: success and I(state) is C(present)
+ returned: success and O(state=present)
type: str
sample: 'awesome_secret'
version_added: 2.2.0
diff --git a/ansible_collections/community/docker/plugins/modules/docker_stack.py b/ansible_collections/community/docker/plugins/modules/docker_stack.py
index 98f4c3ad9..728bc5cfc 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_stack.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_stack.py
@@ -18,12 +18,16 @@ description:
- Manage docker stacks using the C(docker stack) command
on the target node (see examples).
extends_documentation_fragment:
+ - community.docker.docker.cli_documentation
- community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
attributes:
check_mode:
support: none
diff_mode:
support: none
+ action_group:
+ version_added: 3.6.0
options:
name:
description:
@@ -68,8 +72,8 @@ options:
choices: ["always", "changed", "never"]
absent_retries:
description:
- - If C(>0) and I(state) is C(absent) the module will retry up to
- I(absent_retries) times to delete the stack until all the
+ - If larger than V(0) and O(state=absent) the module will retry up to
+ O(absent_retries) times to delete the stack until all the
resources have been effectively deleted.
If the last try still reports the stack as not completely
removed the module will fail.
@@ -77,11 +81,32 @@ options:
default: 0
absent_retries_interval:
description:
- - Interval in seconds between consecutive I(absent_retries).
+ - Interval in seconds between consecutive O(absent_retries).
type: int
default: 1
+ docker_cli:
+ version_added: 3.6.0
+ docker_host:
+ version_added: 3.6.0
+ tls_hostname:
+ version_added: 3.6.0
+ api_version:
+ version_added: 3.6.0
+ ca_path:
+ version_added: 3.6.0
+ client_cert:
+ version_added: 3.6.0
+ client_key:
+ version_added: 3.6.0
+ tls:
+ version_added: 3.6.0
+ validate_certs:
+ version_added: 3.6.0
+ cli_context:
+ version_added: 3.6.0
requirements:
+ - Docker CLI tool C(docker)
- jsondiff
- pyyaml
'''
@@ -128,10 +153,20 @@ EXAMPLES = '''
import json
+import os
import tempfile
+import traceback
+
from ansible.module_utils.six import string_types
from time import sleep
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_cli import (
+ AnsibleModuleDockerClient,
+ DockerException,
+)
+
try:
from jsondiff import diff as json_diff
HAS_JSONDIFF = True
@@ -144,28 +179,16 @@ try:
except ImportError:
HAS_YAML = False
-from ansible.module_utils.basic import AnsibleModule, os
-
-def docker_stack_services(module, stack_name):
- docker_bin = module.get_bin_path('docker', required=True)
- rc, out, err = module.run_command([docker_bin,
- "stack",
- "services",
- stack_name,
- "--format",
- "{{.Name}}"])
- if err == "Nothing found in stack: %s\n" % stack_name:
+def docker_stack_services(client, stack_name):
+ rc, out, err = client.call_cli("stack", "services", stack_name, "--format", "{{.Name}}")
+ if to_native(err) == "Nothing found in stack: %s\n" % stack_name:
return []
- return out.strip().split('\n')
+ return to_native(out).strip().split('\n')
-def docker_service_inspect(module, service_name):
- docker_bin = module.get_bin_path('docker', required=True)
- rc, out, err = module.run_command([docker_bin,
- "service",
- "inspect",
- service_name])
+def docker_service_inspect(client, service_name):
+ rc, out, err = client.call_cli("service", "inspect", service_name)
if rc != 0:
return None
else:
@@ -173,45 +196,43 @@ def docker_service_inspect(module, service_name):
return ret
-def docker_stack_deploy(module, stack_name, compose_files):
- docker_bin = module.get_bin_path('docker', required=True)
- command = [docker_bin, "stack", "deploy"]
- if module.params["prune"]:
+def docker_stack_deploy(client, stack_name, compose_files):
+ command = ["stack", "deploy"]
+ if client.module.params["prune"]:
command += ["--prune"]
- if module.params["with_registry_auth"]:
+ if client.module.params["with_registry_auth"]:
command += ["--with-registry-auth"]
- if module.params["resolve_image"]:
+ if client.module.params["resolve_image"]:
command += ["--resolve-image",
- module.params["resolve_image"]]
+ client.module.params["resolve_image"]]
for compose_file in compose_files:
command += ["--compose-file",
compose_file]
command += [stack_name]
- return module.run_command(command)
+ rc, out, err = client.call_cli(*command)
+ return rc, to_native(out), to_native(err)
-def docker_stack_inspect(module, stack_name):
+def docker_stack_inspect(client, stack_name):
ret = {}
- for service_name in docker_stack_services(module, stack_name):
- ret[service_name] = docker_service_inspect(module, service_name)
+ for service_name in docker_stack_services(client, stack_name):
+ ret[service_name] = docker_service_inspect(client, service_name)
return ret
-def docker_stack_rm(module, stack_name, retries, interval):
- docker_bin = module.get_bin_path('docker', required=True)
- command = [docker_bin, "stack", "rm", stack_name]
-
- rc, out, err = module.run_command(command)
+def docker_stack_rm(client, stack_name, retries, interval):
+ command = ["stack", "rm", stack_name]
+ rc, out, err = client.call_cli(*command)
- while err != "Nothing found in stack: %s\n" % stack_name and retries > 0:
+ while to_native(err) != "Nothing found in stack: %s\n" % stack_name and retries > 0:
sleep(interval)
retries = retries - 1
- rc, out, err = module.run_command(command)
- return rc, out, err
+ rc, out, err = client.call_cli(*command)
+ return rc, to_native(out), to_native(err)
def main():
- module = AnsibleModule(
+ client = AnsibleModuleDockerClient(
argument_spec={
'name': dict(type='str', required=True),
'compose': dict(type='list', elements='raw', default=[]),
@@ -222,87 +243,97 @@ def main():
'absent_retries': dict(type='int', default=0),
'absent_retries_interval': dict(type='int', default=1)
},
- supports_check_mode=False
+ supports_check_mode=False,
)
if not HAS_JSONDIFF:
- return module.fail_json(msg="jsondiff is not installed, try 'pip install jsondiff'")
+ return client.fail("jsondiff is not installed, try 'pip install jsondiff'")
if not HAS_YAML:
- return module.fail_json(msg="yaml is not installed, try 'pip install pyyaml'")
-
- state = module.params['state']
- compose = module.params['compose']
- name = module.params['name']
- absent_retries = module.params['absent_retries']
- absent_retries_interval = module.params['absent_retries_interval']
-
- if state == 'present':
- if not compose:
- module.fail_json(msg=("compose parameter must be a list "
- "containing at least one element"))
-
- compose_files = []
- for i, compose_def in enumerate(compose):
- if isinstance(compose_def, dict):
- compose_file_fd, compose_file = tempfile.mkstemp()
- module.add_cleanup_file(compose_file)
- with os.fdopen(compose_file_fd, 'w') as stack_file:
- compose_files.append(compose_file)
- stack_file.write(yaml_dump(compose_def))
- elif isinstance(compose_def, string_types):
- compose_files.append(compose_def)
- else:
- module.fail_json(msg="compose element '%s' must be a string or a dictionary" % compose_def)
-
- before_stack_services = docker_stack_inspect(module, name)
-
- rc, out, err = docker_stack_deploy(module, name, compose_files)
-
- after_stack_services = docker_stack_inspect(module, name)
-
- if rc != 0:
- module.fail_json(msg="docker stack up deploy command failed",
- rc=rc,
- stdout=out, stderr=err)
-
- before_after_differences = json_diff(before_stack_services,
- after_stack_services)
- for k in before_after_differences.keys():
- if isinstance(before_after_differences[k], dict):
- before_after_differences[k].pop('UpdatedAt', None)
- before_after_differences[k].pop('Version', None)
- if not list(before_after_differences[k].keys()):
- before_after_differences.pop(k)
-
- if not before_after_differences:
- module.exit_json(
- changed=False,
- rc=rc,
- stdout=out,
- stderr=err)
- else:
- module.exit_json(
- changed=True,
- rc=rc,
- stdout=out,
- stderr=err,
- stack_spec_diff=json_diff(before_stack_services,
- after_stack_services,
- dump=True))
+ return client.fail("yaml is not installed, try 'pip install pyyaml'")
+
+ try:
+ state = client.module.params['state']
+ compose = client.module.params['compose']
+ name = client.module.params['name']
+ absent_retries = client.module.params['absent_retries']
+ absent_retries_interval = client.module.params['absent_retries_interval']
+
+ if state == 'present':
+ if not compose:
+ client.fail("compose parameter must be a list containing at least one element")
+
+ compose_files = []
+ for i, compose_def in enumerate(compose):
+ if isinstance(compose_def, dict):
+ compose_file_fd, compose_file = tempfile.mkstemp()
+ client.module.add_cleanup_file(compose_file)
+ with os.fdopen(compose_file_fd, 'w') as stack_file:
+ compose_files.append(compose_file)
+ stack_file.write(yaml_dump(compose_def))
+ elif isinstance(compose_def, string_types):
+ compose_files.append(compose_def)
+ else:
+ client.fail("compose element '%s' must be a string or a dictionary" % compose_def)
+
+ before_stack_services = docker_stack_inspect(client, name)
+
+ rc, out, err = docker_stack_deploy(client, name, compose_files)
+
+ after_stack_services = docker_stack_inspect(client, name)
- else:
- if docker_stack_services(module, name):
- rc, out, err = docker_stack_rm(module, name, absent_retries, absent_retries_interval)
if rc != 0:
- module.fail_json(msg="'docker stack down' command failed",
- rc=rc,
- stdout=out, stderr=err)
+ client.fail("docker stack up deploy command failed", rc=rc, stdout=out, stderr=err)
+
+ before_after_differences = json_diff(before_stack_services, after_stack_services)
+ for k in before_after_differences.keys():
+ if isinstance(before_after_differences[k], dict):
+ before_after_differences[k].pop('UpdatedAt', None)
+ before_after_differences[k].pop('Version', None)
+ if not list(before_after_differences[k].keys()):
+ before_after_differences.pop(k)
+
+ if not before_after_differences:
+ client.module.exit_json(
+ changed=False,
+ rc=rc,
+ stdout=out,
+ stderr=err,
+ )
else:
- module.exit_json(changed=True,
- msg=out, rc=rc,
- stdout=out, stderr=err)
- module.exit_json(changed=False)
+ client.module.exit_json(
+ changed=True,
+ rc=rc,
+ stdout=out,
+ stderr=err,
+ stack_spec_diff=json_diff(
+ before_stack_services,
+ after_stack_services,
+ dump=True,
+ ),
+ )
+
+ else:
+ if docker_stack_services(client, name):
+ rc, out, err = docker_stack_rm(client, name, absent_retries, absent_retries_interval)
+ if rc != 0:
+ client.module.fail_json(
+ msg="'docker stack down' command failed",
+ rc=rc,
+ stdout=out,
+ stderr=err,
+ )
+ else:
+ client.module.exit_json(
+ changed=True,
+ msg=out,
+ rc=rc,
+ stdout=out,
+ stderr=err,
+ )
+ client.module.exit_json(changed=False)
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
if __name__ == "__main__":
diff --git a/ansible_collections/community/docker/plugins/modules/docker_stack_info.py b/ansible_collections/community/docker/plugins/modules/docker_stack_info.py
index bf3bfbdbe..21ce20dd6 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_stack_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_stack_info.py
@@ -13,20 +13,52 @@ DOCUMENTATION = '''
---
module: docker_stack_info
author: "Jose Angel Munoz (@imjoseangel)"
-short_description: Return information on a docker stack
+short_description: Return information on all docker stacks
description:
- Retrieve information on docker stacks using the C(docker stack) command
on the target node (see examples).
+requirements:
+ - Docker CLI tool C(docker)
extends_documentation_fragment:
+ - community.docker.docker.cli_documentation
- community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
- community.docker.attributes.info_module
+attributes:
+ action_group:
+ version_added: 3.6.0
+options:
+ docker_cli:
+ version_added: 3.6.0
+ docker_host:
+ version_added: 3.6.0
+ tls_hostname:
+ version_added: 3.6.0
+ api_version:
+ version_added: 3.6.0
+ ca_path:
+ version_added: 3.6.0
+ client_cert:
+ version_added: 3.6.0
+ client_key:
+ version_added: 3.6.0
+ tls:
+ version_added: 3.6.0
+ validate_certs:
+ version_added: 3.6.0
+ cli_context:
+ version_added: 3.6.0
+seealso:
+ - module: community.docker.docker_stack_task_info
+ description: >-
+ To retrieve detailed information about the services under a specific
+ stack use the M(community.docker.docker_stack_task_info) module.
'''
RETURN = '''
results:
- description: |
- List of dictionaries containing the list of stacks or tasks associated
- to a stack name.
+ description:
+ - List of dictionaries containing the list of stacks on the target node
sample:
- {"name":"grafana","namespace":"default","orchestrator":"Kubernetes","services":"2"}
returned: always
@@ -45,7 +77,14 @@ EXAMPLES = '''
'''
import json
-from ansible.module_utils.basic import AnsibleModule
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_cli import (
+ AnsibleModuleDockerClient,
+ DockerException,
+)
def docker_stack_list(module):
@@ -57,31 +96,23 @@ def docker_stack_list(module):
def main():
- module = AnsibleModule(
+ client = AnsibleModuleDockerClient(
argument_spec={
},
- supports_check_mode=True
+ supports_check_mode=True,
)
- rc, out, err = docker_stack_list(module)
-
- if rc != 0:
- module.fail_json(msg="Error running docker stack. {0}".format(err),
- rc=rc, stdout=out, stderr=err)
- else:
- if out:
- ret = list(
- json.loads(outitem)
- for outitem in out.splitlines())
-
- else:
- ret = []
-
- module.exit_json(changed=False,
- rc=rc,
- stdout=out,
- stderr=err,
- results=ret)
+ try:
+ rc, ret, stderr = client.call_cli_json_stream('stack', 'ls', '--format={{json .}}', check_rc=True)
+ client.module.exit_json(
+ changed=False,
+ rc=rc,
+ stdout='\n'.join([json.dumps(entry) for entry in ret]),
+ stderr=to_native(stderr).strip(),
+ results=ret,
+ )
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
if __name__ == "__main__":
diff --git a/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py b/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py
index e3693bc54..72076310a 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py
@@ -18,23 +18,50 @@ description:
- Retrieve information on docker stacks tasks using the C(docker stack) command
on the target node (see examples).
extends_documentation_fragment:
+ - community.docker.docker.cli_documentation
- community.docker.attributes
+ - community.docker.attributes.actiongroup_docker
- community.docker.attributes.info_module
+attributes:
+ action_group:
+ version_added: 3.6.0
options:
name:
description:
- Stack name.
type: str
required: true
+ docker_cli:
+ version_added: 3.6.0
+ docker_host:
+ version_added: 3.6.0
+ tls_hostname:
+ version_added: 3.6.0
+ api_version:
+ version_added: 3.6.0
+ ca_path:
+ version_added: 3.6.0
+ client_cert:
+ version_added: 3.6.0
+ client_key:
+ version_added: 3.6.0
+ tls:
+ version_added: 3.6.0
+ validate_certs:
+ version_added: 3.6.0
+ cli_context:
+ version_added: 3.6.0
+requirements:
+ - Docker CLI tool C(docker)
'''
RETURN = '''
results:
- description: |
- List of dictionaries containing the list of tasks associated
- to a stack name.
- sample: >
- [{"CurrentState":"Running","DesiredState":"Running","Error":"","ID":"7wqv6m02ugkw","Image":"busybox","Name":"test_stack.1","Node":"swarm","Ports":""}]
+ description:
+ - List of dictionaries containing the list of tasks associated
+ to a stack name.
+ sample:
+ - {"CurrentState":"Running","DesiredState":"Running","Error":"","ID":"7wqv6m02ugkw","Image":"busybox","Name":"test_stack.1","Node":"swarm","Ports":""}
returned: always
type: list
elements: dict
@@ -52,7 +79,14 @@ EXAMPLES = '''
'''
import json
-from ansible.module_utils.basic import AnsibleModule
+import traceback
+
+from ansible.module_utils.common.text.converters import to_native
+
+from ansible_collections.community.docker.plugins.module_utils.common_cli import (
+ AnsibleModuleDockerClient,
+ DockerException,
+)
def docker_stack_task(module, stack_name):
@@ -64,34 +98,25 @@ def docker_stack_task(module, stack_name):
def main():
- module = AnsibleModule(
+ client = AnsibleModuleDockerClient(
argument_spec={
'name': dict(type='str', required=True)
},
- supports_check_mode=True
+ supports_check_mode=True,
)
- name = module.params['name']
-
- rc, out, err = docker_stack_task(module, name)
-
- if rc != 0:
- module.fail_json(msg="Error running docker stack. {0}".format(err),
- rc=rc, stdout=out, stderr=err)
- else:
- if out:
- ret = list(
- json.loads(outitem)
- for outitem in out.splitlines())
-
- else:
- ret = []
-
- module.exit_json(changed=False,
- rc=rc,
- stdout=out,
- stderr=err,
- results=ret)
+ try:
+ name = client.module.params['name']
+ rc, ret, stderr = client.call_cli_json_stream('stack', 'ps', name, '--format={{json .}}', check_rc=True)
+ client.module.exit_json(
+ changed=False,
+ rc=rc,
+ stdout='\n'.join([json.dumps(entry) for entry in ret]),
+ stderr=to_native(stderr).strip(),
+ results=ret,
+ )
+ except DockerException as e:
+ client.fail('An unexpected Docker error occurred: {0}'.format(to_native(e)), exception=traceback.format_exc())
if __name__ == "__main__":
diff --git a/ansible_collections/community/docker/plugins/modules/docker_swarm.py b/ansible_collections/community/docker/plugins/modules/docker_swarm.py
index 69b88f583..dc04c0a40 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_swarm.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_swarm.py
@@ -32,11 +32,11 @@ options:
description:
- Externally reachable address advertised to other nodes.
- This can either be an address/port combination
- in the form C(192.168.1.1:4567), or an interface followed by a
- port number, like C(eth0:4567).
+ in the form V(192.168.1.1:4567), or an interface followed by a
+ port number, like V(eth0:4567).
- If the port number is omitted,
the port number from the listen address is used.
- - If I(advertise_addr) is not specified, it will be automatically
+ - If O(advertise_addr) is not specified, it will be automatically
detected when possible.
- Only used when swarm is initialised or joined. Because of this it's not
considered for idempotency checking.
@@ -60,8 +60,8 @@ options:
description:
- Listen address used for inter-manager communication.
- This can either be an address/port combination in the form
- C(192.168.1.1:4567), or an interface followed by a port number,
- like C(eth0:4567).
+ V(192.168.1.1:4567), or an interface followed by a port number,
+ like V(eth0:4567).
- If the port number is omitted, the default swarm listening port
is used.
- Only used when swarm is initialised or joined. Because of this it's not
@@ -70,16 +70,16 @@ options:
default: 0.0.0.0:2377
force:
description:
- - Use with state C(present) to force creating a new Swarm, even if already part of one.
- - Use with state C(absent) to Leave the swarm even if this node is a manager.
+ - Use with state V(present) to force creating a new Swarm, even if already part of one.
+ - Use with state V(absent) to Leave the swarm even if this node is a manager.
type: bool
default: false
state:
description:
- - Set to C(present), to create/update a new cluster.
- - Set to C(join), to join an existing cluster.
- - Set to C(absent), to leave an existing cluster.
- - Set to C(remove), to remove an absent node from the cluster.
+ - Set to V(present), to create/update a new cluster.
+ - Set to V(join), to join an existing cluster.
+ - Set to V(absent), to leave an existing cluster.
+ - Set to V(remove), to remove an absent node from the cluster.
Note that removing requires Docker SDK for Python >= 2.4.0.
- M(community.docker.docker_node) can be used to demote a manager before removal.
type: str
@@ -92,35 +92,35 @@ options:
node_id:
description:
- Swarm id of the node to remove.
- - Used with I(state=remove).
+ - Used with O(state=remove).
type: str
join_token:
description:
- Swarm token used to join a swarm cluster.
- - Used with I(state=join).
+ - Used with O(state=join).
- If this value is specified, the corresponding value in the return values will be censored by Ansible.
This is a side-effect of this value not being logged.
type: str
remote_addrs:
description:
- Remote address of one or more manager nodes of an existing Swarm to connect to.
- - Used with I(state=join).
+ - Used with O(state=join).
type: list
elements: str
task_history_retention_limit:
description:
- Maximum number of tasks history stored.
- - Docker default value is C(5).
+ - Docker default value is V(5).
type: int
snapshot_interval:
description:
- Number of logs entries between snapshot.
- - Docker default value is C(10000).
+ - Docker default value is V(10000).
type: int
keep_old_snapshots:
description:
- Number of snapshots to keep beyond the current snapshot.
- - Docker default value is C(0).
+ - Docker default value is V(0).
type: int
log_entries_for_slow_followers:
description:
@@ -129,23 +129,23 @@ options:
heartbeat_tick:
description:
- Amount of ticks (in seconds) between each heartbeat.
- - Docker default value is C(1) seconds.
+ - Docker default value is V(1) seconds.
type: int
election_tick:
description:
- Amount of ticks (in seconds) needed without a leader to trigger a new election.
- - Docker default value is C(10) seconds.
+ - Docker default value is V(10) seconds.
type: int
dispatcher_heartbeat_period:
description:
- The delay (in nanoseconds) for an agent to send a heartbeat to the dispatcher.
- - Docker default value is 5 seconds, which corresponds to a value of C(5000000000).
+ - Docker default value is 5 seconds, which corresponds to a value of V(5000000000).
# DefaultHeartBeatPeriod in https://github.com/moby/moby/blob/master/vendor/github.com/moby/swarmkit/v2/manager/dispatcher/dispatcher.go#L32
type: int
node_cert_expiry:
description:
- Automatic expiry for nodes certificates, given in nanoseconds.
- - Docker default value is 90 days, which corresponds to a value of C(7776000000000000).
+ - Docker default value is 90 days, which corresponds to a value of V(7776000000000000).
# DefaultNodeCertExpiration in https://github.com/moby/moby/blob/master/vendor/github.com/moby/swarmkit/v2/ca/certificates.go#L56
type: int
name:
@@ -175,13 +175,13 @@ options:
description:
- An integer whose purpose is to force swarm to generate a new signing CA certificate and key,
if none have been specified.
- - Docker default value is C(0).
+ - Docker default value is V(0).
- Requires API version >= 1.30.
type: int
autolock_managers:
description:
- If set, generate a key and use it to lock data stored on the managers.
- - Docker default value is C(false).
+ - Docker default value is V(false).
- M(community.docker.docker_swarm_info) can be used to retrieve the unlock key.
type: bool
rotate_worker_token:
@@ -195,18 +195,20 @@ options:
data_path_addr:
description:
- Address or interface to use for data path traffic.
- - This can either be an address in the form C(192.168.1.1), or an interface,
- like C(eth0).
+ - This can either be an address in the form V(192.168.1.1), or an interface,
+ like V(eth0).
- Only used when swarm is initialised or joined. Because of this it is not
considered for idempotency checking.
+ - Requires API version >= 1.30.
type: str
version_added: 2.5.0
data_path_port:
description:
- Port to use for data path traffic.
- - This needs to be a port number like C(9789).
+ - This needs to be a port number like V(9789).
- Only used when swarm is initialised. Because of this it is not
considered for idempotency checking.
+ - Requires API version >= 1.40.
type: int
version_added: 3.1.0
@@ -264,7 +266,7 @@ EXAMPLES = '''
RETURN = '''
swarm_facts:
- description: Informations about swarm.
+ description: Information about swarm.
returned: success
type: dict
contains:
@@ -276,8 +278,8 @@ swarm_facts:
Worker:
description:
- Token to join the cluster as a new *worker* node.
- - "B(Note:) if this value has been specified as I(join_token), the value here will not
- be the token, but C(VALUE_SPECIFIED_IN_NO_LOG_PARAMETER). If you pass I(join_token),
+ - "B(Note:) if this value has been specified as O(join_token), the value here will not
+ be the token, but C(VALUE_SPECIFIED_IN_NO_LOG_PARAMETER). If you pass O(join_token),
make sure your playbook/role does not depend on this return value!"
returned: success
type: str
@@ -285,16 +287,16 @@ swarm_facts:
Manager:
description:
- Token to join the cluster as a new *manager* node.
- - "B(Note:) if this value has been specified as I(join_token), the value here will not
- be the token, but C(VALUE_SPECIFIED_IN_NO_LOG_PARAMETER). If you pass I(join_token),
+ - "B(Note:) if this value has been specified as O(join_token), the value here will not
+ be the token, but C(VALUE_SPECIFIED_IN_NO_LOG_PARAMETER). If you pass O(join_token),
make sure your playbook/role does not depend on this return value!"
returned: success
type: str
example: SWMTKN-1--xxxxx
UnlockKey:
- description: The swarm unlock-key if I(autolock_managers) is C(true).
- returned: on success if I(autolock_managers) is C(true)
- and swarm is initialised, or if I(autolock_managers) has changed.
+ description: The swarm unlock-key if O(autolock_managers=true).
+ returned: on success if O(autolock_managers=true)
+ and swarm is initialised, or if O(autolock_managers) has changed.
type: str
example: SWMKEY-1-xxx
@@ -534,7 +536,6 @@ class SwarmManager(DockerBaseClass):
init_arguments = {
'advertise_addr': self.parameters.advertise_addr,
'listen_addr': self.parameters.listen_addr,
- 'data_path_addr': self.parameters.data_path_addr,
'force_new_cluster': self.force,
'swarm_spec': self.parameters.spec,
}
@@ -542,6 +543,8 @@ class SwarmManager(DockerBaseClass):
init_arguments['default_addr_pool'] = self.parameters.default_addr_pool
if self.parameters.subnet_size is not None:
init_arguments['subnet_size'] = self.parameters.subnet_size
+ if self.parameters.data_path_addr is not None:
+ init_arguments['data_path_addr'] = self.parameters.data_path_addr
if self.parameters.data_path_port is not None:
init_arguments['data_path_port'] = self.parameters.data_path_port
try:
@@ -595,11 +598,16 @@ class SwarmManager(DockerBaseClass):
self.results['actions'].append("This node is already part of a swarm.")
return
if not self.check_mode:
+ join_arguments = {
+ 'remote_addrs': self.parameters.remote_addrs,
+ 'join_token': self.parameters.join_token,
+ 'listen_addr': self.parameters.listen_addr,
+ 'advertise_addr': self.parameters.advertise_addr,
+ }
+ if self.parameters.data_path_addr is not None:
+ join_arguments['data_path_addr'] = self.parameters.data_path_addr
try:
- self.client.join_swarm(
- remote_addrs=self.parameters.remote_addrs, join_token=self.parameters.join_token,
- listen_addr=self.parameters.listen_addr, advertise_addr=self.parameters.advertise_addr,
- data_path_addr=self.parameters.data_path_addr)
+ self.client.join_swarm(**join_arguments)
except APIError as exc:
self.client.fail("Can not join the Swarm Cluster: %s" % to_native(exc))
self.results['actions'].append("New node is added to swarm cluster")
diff --git a/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py b/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py
index df1e5af95..6c6008dcf 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py
@@ -77,10 +77,10 @@ options:
default: false
verbose_output:
description:
- - When set to C(true) and I(nodes), I(services) or I(tasks) is set to C(true), then the module output will
+ - When set to V(true) and O(nodes), O(services), or O(tasks) is set to V(true), then the module output will
contain verbose information about objects matching the full output of API method.
- For details see the documentation of your version of Docker API at U(https://docs.docker.com/engine/api/).
- - The verbose output in this module contains only subset of information returned by I(_info) module
+ - The verbose output in this module contains only subset of information returned by this info module
for each type of the objects.
type: bool
default: false
@@ -139,21 +139,21 @@ EXAMPLES = '''
RETURN = '''
can_talk_to_docker:
description:
- - Will be C(true) if the module can talk to the docker daemon.
+ - Will be V(true) if the module can talk to the docker daemon.
returned: both on success and on error
type: bool
docker_swarm_active:
description:
- - Will be C(true) if the module can talk to the docker daemon,
+ - Will be V(true) if the module can talk to the docker daemon,
and the docker daemon is in Swarm mode.
returned: both on success and on error
type: bool
docker_swarm_manager:
description:
- - Will be C(true) if the module can talk to the docker daemon,
+ - Will be V(true) if the module can talk to the docker daemon,
the docker daemon is in Swarm mode, and the current node is
a manager node.
- - Only if this one is C(true), the module will not fail.
+ - Only if this one is V(true), the module will not fail.
returned: both on success and on error
type: bool
swarm_facts:
@@ -165,30 +165,30 @@ swarm_facts:
swarm_unlock_key:
description:
- Contains the key needed to unlock the swarm.
- returned: When I(unlock_key) is C(true).
+ returned: When O(unlock_key=true).
type: str
nodes:
description:
- List of dict objects containing the basic information about each volume.
- Keys matches the C(docker node ls) output unless I(verbose_output=true).
- See description for I(verbose_output).
- returned: When I(nodes) is C(true)
+ Keys matches the C(docker node ls) output unless O(verbose_output=true).
+ See description for O(verbose_output).
+ returned: When O(nodes=true)
type: list
elements: dict
services:
description:
- List of dict objects containing the basic information about each volume.
- Keys matches the C(docker service ls) output unless I(verbose_output=true).
- See description for I(verbose_output).
- returned: When I(services) is C(true)
+ Keys matches the C(docker service ls) output unless O(verbose_output=true).
+ See description for O(verbose_output).
+ returned: When O(services=true)
type: list
elements: dict
tasks:
description:
- List of dict objects containing the basic information about each volume.
- Keys matches the C(docker service ps) output unless I(verbose_output=true).
- See description for I(verbose_output).
- returned: When I(tasks) is C(true)
+ Keys matches the C(docker service ps) output unless O(verbose_output=true).
+ See description for O(verbose_output).
+ returned: When O(tasks=true)
type: list
elements: dict
diff --git a/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py b/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py
index 564234cb5..95cc10366 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py
@@ -64,7 +64,7 @@ options:
required: true
filename:
description:
- - Name of the file containing the config. Defaults to the I(config_name) if not specified.
+ - Name of the file containing the config. Defaults to the O(configs[].config_name) if not specified.
type: str
uid:
description:
@@ -76,7 +76,7 @@ options:
type: str
mode:
description:
- - File access mode inside the container. Must be an octal number (like C(0644) or C(0444)).
+ - File access mode inside the container. Must be an octal number (like V(0644) or V(0444)).
type: int
container_labels:
description:
@@ -114,7 +114,7 @@ options:
- List or dictionary of the service environment variables.
- If passed a list each items need to be in the format of C(KEY=VALUE).
- If passed a dictionary values which might be parsed as numbers,
- booleans or other types by the YAML parser must be quoted (for example C("true"))
+ booleans or other types by the YAML parser must be quoted (for example V("true"))
in order to avoid data loss.
- Corresponds to the C(--env) option of C(docker service create).
type: raw
@@ -123,7 +123,7 @@ options:
- List of paths to files, present on the target, containing environment variables C(FOO=BAR).
- The order of the list is significant in determining the value assigned to a
variable that shows up more than once.
- - If variable also present in I(env), then I(env) value will override.
+ - If variable also present in O(env), then O(env) value will override.
type: list
elements: path
force_update:
@@ -143,14 +143,15 @@ options:
- Configure a check that is run to determine whether or not containers for this service are "healthy".
See the docs for the L(HEALTHCHECK Dockerfile instruction,https://docs.docker.com/engine/reference/builder/#healthcheck)
for details on how healthchecks work.
- - "I(interval), I(timeout) and I(start_period) are specified as durations. They accept duration as a string in a format
- that look like: C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ - "O(healthcheck.interval), O(healthcheck.timeout), and O(healthcheck.start_period) are specified as durations.
+ They accept duration as a string in a format that look like: V(5h34m56s), V(1m30s), and so on.
+ The supported units are V(us), V(ms), V(s), V(m) and V(h)."
type: dict
suboptions:
test:
description:
- Command to run to check health.
- - Must be either a string or a list. If it is a list, the first item must be one of C(NONE), C(CMD) or C(CMD-SHELL).
+ - Must be either a string or a list. If it is a list, the first item must be one of V(NONE), V(CMD) or V(CMD-SHELL).
type: raw
interval:
description:
@@ -201,15 +202,15 @@ options:
suboptions:
cpus:
description:
- - Service CPU limit. C(0) equals no limit.
+ - Service CPU limit. V(0) equals no limit.
- Corresponds to the C(--limit-cpu) option of C(docker service create).
type: float
memory:
description:
- "Service memory limit in format C(<number>[<unit>]). Number is a positive integer.
- Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
- - C(0) equals no limit.
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
+ - V(0) equals no limit.
- Omitting the unit defaults to bytes.
- Corresponds to the C(--limit-memory) option of C(docker service create).
type: str
@@ -249,7 +250,7 @@ options:
source:
description:
- Mount source (for example a volume name or a host path).
- - Must be specified if I(type) is not C(tmpfs).
+ - Must be specified if O(mounts[].type) is not V(tmpfs).
type: str
target:
description:
@@ -259,7 +260,7 @@ options:
type:
description:
- The mount type.
- - Note that C(npipe) is only supported by Docker for Windows. Also note that C(npipe) was added in Ansible 2.9.
+ - Note that V(npipe) is only supported by Docker for Windows. Also note that V(npipe) was added in Ansible 2.9.
type: str
default: bind
choices:
@@ -278,7 +279,7 @@ options:
propagation:
description:
- The propagation mode to use.
- - Can only be used when I(type) is C(bind).
+ - Can only be used when O(mounts[].type=bind).
type: str
choices:
- shared
@@ -290,12 +291,12 @@ options:
no_copy:
description:
- Disable copying of data from a container when a volume is created.
- - Can only be used when I(type) is C(volume).
+ - Can only be used when O(mounts[].type=volume).
type: bool
driver_config:
description:
- Volume driver configuration.
- - Can only be used when I(type) is C(volume).
+ - Can only be used when O(mounts[].type=volume).
suboptions:
name:
description:
@@ -309,14 +310,14 @@ options:
tmpfs_size:
description:
- "Size of the tmpfs mount in format C(<number>[<unit>]). Number is a positive integer.
- Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
- - Can only be used when I(type) is C(tmpfs).
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
+ - Can only be used when O(mounts[].type=tmpfs).
type: str
tmpfs_mode:
description:
- File mode of the tmpfs in octal.
- - Can only be used when I(type) is C(tmpfs).
+ - Can only be used when O(mounts[].type=tmpfs).
type: int
name:
description:
@@ -327,8 +328,8 @@ options:
networks:
description:
- List of the service networks names or dictionaries.
- - When passed dictionaries valid sub-options are I(name), which is required, and
- I(aliases) and I(options).
+ - When passed dictionaries valid sub-options are C(name), which is required, and
+ C(aliases) and C(options).
- Prior to API version 1.29, updating and removing networks is not supported.
If changes are made the service will then be removed and recreated.
- Corresponds to the C(--network) option of C(docker service create).
@@ -399,9 +400,9 @@ options:
type: bool
replicas:
description:
- - Number of containers instantiated in the service. Valid only if I(mode) is C(replicated).
- - If set to C(-1), and service is not present, service replicas will be set to C(1).
- - If set to C(-1), and service is present, service replicas will be unchanged.
+ - Number of containers instantiated in the service. Valid only if O(mode=replicated).
+ - If set to V(-1), and service is not present, service replicas will be set to V(1).
+ - If set to V(-1), and service is present, service replicas will be unchanged.
- Corresponds to the C(--replicas) option of C(docker service create).
type: int
default: -1
@@ -411,15 +412,15 @@ options:
suboptions:
cpus:
description:
- - Service CPU reservation. C(0) equals no reservation.
+ - Service CPU reservation. V(0) equals no reservation.
- Corresponds to the C(--reserve-cpu) option of C(docker service create).
type: float
memory:
description:
- "Service memory reservation in format C(<number>[<unit>]). Number is a positive integer.
- Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
- C(T) (tebibyte), or C(P) (pebibyte)."
- - C(0) equals no reservation.
+ Unit can be V(B) (byte), V(K) (kibibyte, 1024B), V(M) (mebibyte), V(G) (gibibyte),
+ V(T) (tebibyte), or V(P) (pebibyte)."
+ - V(0) equals no reservation.
- Omitting the unit defaults to bytes.
- Corresponds to the C(--reserve-memory) option of C(docker service create).
type: str
@@ -447,7 +448,7 @@ options:
description:
- Delay between restarts.
- "Accepts a a string in a format that look like:
- C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ V(5h34m56s), V(1m30s) etc. The supported units are V(us), V(ms), V(s), V(m) and V(h)."
- Corresponds to the C(--restart-delay) option of C(docker service create).
type: str
max_attempts:
@@ -459,7 +460,7 @@ options:
description:
- Restart policy evaluation window.
- "Accepts a string in a format that look like:
- C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ V(5h34m56s), V(1m30s) etc. The supported units are V(us), V(ms), V(s), V(m) and V(h)."
- Corresponds to the C(--restart-window) option of C(docker service create).
type: str
type: dict
@@ -477,7 +478,7 @@ options:
description:
- Delay between task rollbacks.
- "Accepts a string in a format that look like:
- C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ V(5h34m56s), V(1m30s) etc. The supported units are V(us), V(ms), V(s), V(m) and V(h)."
- Corresponds to the C(--rollback-delay) option of C(docker service create).
- Requires API version >= 1.28.
type: str
@@ -494,7 +495,7 @@ options:
description:
- Duration after each task rollback to monitor for failure.
- "Accepts a string in a format that look like:
- C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ V(5h34m56s), V(1m30s) etc. The supported units are V(us), V(ms), V(s), V(m) and V(h)."
- Corresponds to the C(--rollback-monitor) option of C(docker service create).
- Requires API version >= 1.28.
type: str
@@ -529,7 +530,7 @@ options:
required: true
filename:
description:
- - Name of the file containing the secret. Defaults to the I(secret_name) if not specified.
+ - Name of the file containing the secret. Defaults to the O(secrets[].secret_name) if not specified.
- Corresponds to the C(target) key of C(docker service create --secret).
type: str
uid:
@@ -542,12 +543,12 @@ options:
type: str
mode:
description:
- - File access mode inside the container. Must be an octal number (like C(0644) or C(0444)).
+ - File access mode inside the container. Must be an octal number (like V(0644) or V(0444)).
type: int
state:
description:
- - C(absent) - A service matching the specified name will be removed and have its tasks stopped.
- - C(present) - Asserts the existence of a service matching the name and provided configuration parameters.
+ - V(absent) - A service matching the specified name will be removed and have its tasks stopped.
+ - V(present) - Asserts the existence of a service matching the name and provided configuration parameters.
Unspecified configuration parameters will be set to docker defaults.
type: str
default: present
@@ -558,7 +559,7 @@ options:
description:
- Time to wait before force killing a container.
- "Accepts a duration as a string in a format that look like:
- C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ V(5h34m56s), V(1m30s) etc. The supported units are V(us), V(ms), V(s), V(m) and V(h)."
- Corresponds to the C(--stop-grace-period) option of C(docker service create).
type: str
stop_signal:
@@ -584,14 +585,14 @@ options:
description:
- Rolling update delay.
- "Accepts a string in a format that look like:
- C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ V(5h34m56s), V(1m30s) etc. The supported units are V(us), V(ms), V(s), V(m) and V(h)."
- Corresponds to the C(--update-delay) option of C(docker service create).
type: str
failure_action:
description:
- Action to take in case of container failure.
- Corresponds to the C(--update-failure-action) option of C(docker service create).
- - Usage of I(rollback) requires API version >= 1.29.
+ - Usage of V(rollback) requires API version >= 1.29.
type: str
choices:
- continue
@@ -601,7 +602,7 @@ options:
description:
- Time to monitor updated tasks for failures.
- "Accepts a string in a format that look like:
- C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
+ V(5h34m56s), V(1m30s) etc. The supported units are V(us), V(ms), V(s), V(m) and V(h)."
- Corresponds to the C(--update-monitor) option of C(docker service create).
type: str
max_failure_ratio:
@@ -619,7 +620,7 @@ options:
user:
description:
- Sets the username or UID used for the specified command.
- - Before Ansible 2.8, the default value for this option was C(root).
+ - Before Ansible 2.8, the default value for this option was V(root).
- The default has been removed so that the user defined in the image is used if no user is specified here.
- Corresponds to the C(--user) option of C(docker service create).
type: str
@@ -648,7 +649,7 @@ requirements:
- "Docker API >= 1.25"
notes:
- "Images will only resolve to the latest digest when using Docker API >= 1.30 and Docker SDK for Python >= 3.2.0.
- When using older versions use C(force_update: true) to trigger the swarm to resolve a new image."
+ When using older versions use O(force_update=true) to trigger the swarm to resolve a new image."
'''
RETURN = '''
@@ -661,7 +662,7 @@ swarm_service:
- Note that facts are not part of registered vars but accessible directly.
- Note that before Ansible 2.7.9, the return variable was documented as C(ansible_swarm_service),
while the module actually returned a variable called C(ansible_docker_service). The variable
- was renamed to C(swarm_service) in both code and documentation for Ansible 2.7.9 and Ansible 2.8.0.
+ was renamed to RV(swarm_service) in both code and documentation for Ansible 2.7.9 and Ansible 2.8.0.
In Ansible 2.7.x, the old name C(ansible_docker_service) can still be used.
sample: '{
"args": [
@@ -1148,7 +1149,7 @@ def has_list_changed(new_list, old_list, sort_lists=True, sort_key=None):
else:
zip_data = zip(new_list, old_list)
for new_item, old_item in zip_data:
- is_same_type = type(new_item) == type(old_item)
+ is_same_type = type(new_item) == type(old_item) # noqa: E721, pylint: disable=unidiomatic-typecheck
if not is_same_type:
if isinstance(new_item, string_types) and isinstance(old_item, string_types):
# Even though the types are different between these items,
diff --git a/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py b/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py
index ebe8a8e10..0a9dd56c8 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py
@@ -58,7 +58,7 @@ exists:
service:
description:
- A dictionary representing the current state of the service. Matches the C(docker service inspect) output.
- - Will be C(none) if service does not exist.
+ - Will be V(none) if service does not exist.
returned: always
type: dict
'''
diff --git a/ansible_collections/community/docker/plugins/modules/docker_volume.py b/ansible_collections/community/docker/plugins/modules/docker_volume.py
index 09b1d386b..f282cafd0 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_volume.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_volume.py
@@ -38,7 +38,7 @@ options:
driver:
description:
- - Specify the type of volume. Docker provides the C(local) driver, but 3rd party drivers can also be used.
+ - Specify the type of volume. Docker provides the V(local) driver, but 3rd party drivers can also be used.
type: str
default: local
@@ -56,13 +56,13 @@ options:
recreate:
description:
- - Controls when a volume will be recreated when I(state) is C(present). Please
+ - Controls when a volume will be recreated when O(state=present). Please
note that recreating an existing volume will cause B(any data in the existing volume
to be lost!) The volume will be deleted and a new volume with the same name will be
created.
- - The value C(always) forces the volume to be always recreated.
- - The value C(never) makes sure the volume will not be recreated.
- - The value C(options-changed) makes sure the volume will be recreated if the volume
+ - The value V(always) forces the volume to be always recreated.
+ - The value V(never) makes sure the volume will not be recreated.
+ - The value V(options-changed) makes sure the volume will be recreated if the volume
already exist and the driver, driver options or labels differ.
type: str
default: never
@@ -73,8 +73,8 @@ options:
state:
description:
- - C(absent) deletes the volume.
- - C(present) creates the volume, if it does not already exist.
+ - V(absent) deletes the volume.
+ - V(present) creates the volume, if it does not already exist.
type: str
default: present
choices:
@@ -214,7 +214,7 @@ class DockerVolumeManager(object):
parameter=value,
active=self.existing_volume['Options'].get(key))
if self.parameters.labels:
- existing_labels = self.existing_volume.get('Labels', {})
+ existing_labels = self.existing_volume.get('Labels') or {}
for label in self.parameters.labels:
if existing_labels.get(label) != self.parameters.labels.get(label):
differences.add('labels.%s' % label,
diff --git a/ansible_collections/community/docker/plugins/modules/docker_volume_info.py b/ansible_collections/community/docker/plugins/modules/docker_volume_info.py
index 100010ba4..9345d2e6e 100644
--- a/ansible_collections/community/docker/plugins/modules/docker_volume_info.py
+++ b/ansible_collections/community/docker/plugins/modules/docker_volume_info.py
@@ -63,7 +63,7 @@ exists:
volume:
description:
- Volume inspection results for the affected volume.
- - Will be C(none) if volume does not exist.
+ - Will be V(none) if volume does not exist.
returned: success
type: dict
sample: '{
diff --git a/ansible_collections/community/docker/tests/galaxy-importer.cfg b/ansible_collections/community/docker/tests/galaxy-importer.cfg
new file mode 100644
index 000000000..5ab20d06a
--- /dev/null
+++ b/ansible_collections/community/docker/tests/galaxy-importer.cfg
@@ -0,0 +1,8 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+[galaxy-importer]
+# This is only needed to make Zuul's third-party-check happy.
+# It is not needed by anything else.
+run_ansible_doc=false
diff --git a/ansible_collections/community/docker/tests/integration/requirements.yml b/ansible_collections/community/docker/tests/integration/requirements.yml
index 7b3e38d98..b4c045f43 100644
--- a/ansible_collections/community/docker/tests/integration/requirements.yml
+++ b/ansible_collections/community/docker/tests/integration/requirements.yml
@@ -5,6 +5,7 @@
collections:
- ansible.posix
-- community.internal_test_tools
- community.crypto
- community.general
+- community.internal_test_tools
+- community.library_inventory_filtering_v1
diff --git a/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml b/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml
index e522a51f0..0b0738843 100644
--- a/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml
@@ -12,3 +12,7 @@
- name: Setup docker
import_role:
name: setup_docker
+
+ - name: Setup docker Python deps
+ import_role:
+ name: setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh b/ansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh
index eebbb6a39..5a2a84c30 100755
--- a/ansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh
+++ b/ansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh
@@ -8,6 +8,7 @@ set -euo pipefail
[[ -n "${DEBUG:-}" || -n "${ANSIBLE_DEBUG:-}" ]] && set -x
readonly IMAGE="quay.io/ansible/ansible-runner:devel"
+# shellcheck disable=SC2155
readonly PYTHON="$(command -v python3 python | head -n1)"
# Determine collection root
@@ -18,6 +19,7 @@ while true; do
fi
COLLECTION_ROOT="${COLLECTION_ROOT}../"
done
+# shellcheck disable=SC2155
readonly COLLECTION_ROOT="$(cd ${COLLECTION_ROOT} ; pwd)"
# Setup phase
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases
index 2e1acc0ad..d8f457d53 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases
@@ -2,5 +2,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-azp/4
+azp/6
destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml
index 7f44c871d..6b4232214 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml
@@ -4,5 +4,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- - setup_docker_compose
+ - setup_docker_compose_v1
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml
index d3c7eae51..8ea59f865 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml
@@ -20,26 +20,28 @@
# Run the tests
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure all containers are removed"
- docker_container:
- name: "{{ item }}"
- state: absent
- force_kill: true
- with_items: "{{ cnames }}"
- diff: false
- - name: "Make sure all networks are removed"
- docker_network:
- name: "{{ item }}"
- state: absent
- force: true
- with_items: "{{ dnetworks }}"
- when: docker_py_version is version('1.10.0', '>=')
- diff: false
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+ diff: false
+ - name: "Make sure all networks are removed"
+ docker_network:
+ name: "{{ item }}"
+ state: absent
+ force: true
+ with_items: "{{ dnetworks }}"
+ when: docker_py_version is version('1.10.0', '>=')
+ diff: false
when: has_docker_compose and docker_py_version is version('1.8.0', '>=') and docker_api_version is version('1.25', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/meta/main.yml
new file mode 100644
index 000000000..aefcf50f2
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/meta/main.yml
@@ -0,0 +1,10 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker_cli_compose
+ # The Python dependencies are needed for the other modules
+ - setup_docker_python_deps
+ - setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/main.yml
new file mode 100644
index 000000000..8813f0e71
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/main.yml
@@ -0,0 +1,48 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+# Create random name prefix (for services, ...)
+- name: Create random container name prefix
+ set_fact:
+ name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+ cnames: []
+ dnetworks: []
+
+- debug:
+ msg: "Using name prefix {{ name_prefix }}"
+
+# Run the tests
+- block:
+ - command: docker compose --help
+
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
+
+ always:
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+ diff: false
+
+ - name: "Make sure all networks are removed"
+ docker_network:
+ name: "{{ item }}"
+ state: absent
+ force: true
+ with_items: "{{ dnetworks }}"
+ diff: false
+
+ when: docker_has_compose and docker_compose_version is version('2.18.0', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/run-test.yml
new file mode 100644
index 000000000..72a58962d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/run-test.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/pull.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/pull.yml
new file mode 100644
index 000000000..47647a9bc
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/pull.yml
@@ -0,0 +1,211 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- vars:
+ pname: "{{ name_prefix }}-pull"
+ cname: "{{ name_prefix }}-cont"
+ non_existing_image: does-not-exist:latest
+ project_src: "{{ remote_tmp_dir }}/{{ pname }}"
+ test_service_non_existing: |
+ version: '3'
+ services:
+ {{ cname }}:
+ image: {{ non_existing_image }}
+ test_service_alpine: |
+ version: '3'
+ services:
+ {{ cname }}:
+ image: {{ docker_test_image_alpine }}
+ command: /bin/sh -c 'sleep 10m'
+ stop_grace_period: 1s
+
+ block:
+ - name: Registering container name
+ set_fact:
+ cnames: "{{ cnames + [pname ~ '-' ~ cname ~ '-1'] }}"
+ dnetworks: "{{ dnetworks + [pname ~ '_default'] }}"
+
+ - name: Create project directory
+ file:
+ path: '{{ project_src }}'
+ state: directory
+
+ - name: Make sure images are not around
+ docker_image_remove:
+ name: '{{ item }}'
+ loop:
+ - '{{ non_existing_image }}'
+ - '{{ docker_test_image_alpine }}'
+
+####################################################################
+## Missing image ###################################################
+####################################################################
+
+ - name: Template project file with non-existing image
+ copy:
+ dest: '{{ project_src }}/docker-compose.yml'
+ content: '{{ test_service_non_existing }}'
+
+ - name: Present with pull=never (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: never
+ check_mode: true
+ register: present_1_check
+ ignore_errors: true
+
+ - name: Present with pull=never
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: never
+ register: present_1
+ ignore_errors: true
+
+ - name: Present without explicit pull (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ check_mode: true
+ register: present_2_check
+ ignore_errors: true
+
+ - name: Present without explicit pull
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ register: present_2
+ ignore_errors: true
+
+ - assert:
+ that:
+ - present_1_check is failed or present_1_check is changed
+ - present_1_check is changed or present_1_check.msg.startswith('General error:')
+ - present_1 is failed
+ - present_1.msg.startswith('General error:')
+ - present_2_check is failed
+ - present_2_check.msg.startswith('Error when processing ' ~ cname ~ ':')
+ - present_2 is failed
+ - present_2.msg.startswith('Error when processing ' ~ cname ~ ':')
+
+####################################################################
+## Regular image ###################################################
+####################################################################
+
+ - name: Template project file with Alpine image
+ copy:
+ dest: '{{ project_src }}/docker-compose.yml'
+ content: '{{ test_service_alpine }}'
+
+ - name: Present with pull=missing (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ check_mode: true
+ register: present_1_check
+
+ - name: Present with pull=missing
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ register: present_1
+
+ - name: Present with pull=missing (idempotent, check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ check_mode: true
+ register: present_2_check
+
+ - name: Present with pull=missing (idempotent)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ register: present_2
+
+ - name: Present with pull=always (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: always
+ check_mode: true
+ register: present_3_check
+
+ - name: Present with pull=always
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: always
+ register: present_3
+
+ - name: Stopping service
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: absent
+
+ - name: Present with pull=never (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ check_mode: true
+ register: present_4_check
+
+ - name: Present with pull=never
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ register: present_4
+
+ - name: Present with pull=never (idempotent, check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ check_mode: true
+ register: present_5_check
+
+ - name: Present with pull=never (idempotent)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ pull: missing
+ register: present_5
+
+ - name: Cleanup
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: absent
+
+ - assert:
+ that:
+ - present_1_check is changed
+ - present_1_check.actions | selectattr('status', 'eq', 'Pulling') | first
+ - present_1_check.actions | selectattr('status', 'eq', 'Creating') | first
+ - present_1 is changed
+ - present_1.actions | selectattr('status', 'eq', 'Pulling') | first
+ - present_1.actions | selectattr('status', 'eq', 'Creating') | first
+ - present_2_check is not changed
+ - present_2 is not changed
+ - present_3_check is changed
+ - present_3_check.actions | selectattr('status', 'eq', 'Pulling') | first
+ - present_3_check.actions | selectattr('status', 'eq', 'Creating') | length == 0
+ - present_3_check.actions | selectattr('status', 'eq', 'Recreating') | length == 0
+ - present_3 is not changed
+ - present_3.actions | selectattr('status', 'eq', 'Pulling') | first
+ - present_3.actions | selectattr('status', 'eq', 'Creating') | length == 0
+ - present_3.actions | selectattr('status', 'eq', 'Recreating') | length == 0
+ - present_4_check is changed
+ - present_4_check.actions | selectattr('status', 'eq', 'Pulling') | length == 0
+ - present_4 is changed
+ - present_4.actions | selectattr('status', 'eq', 'Pulling') | length == 0
+ - present_5_check is not changed
+ - present_5 is not changed
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/start-stop.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/start-stop.yml
new file mode 100644
index 000000000..22dd5e026
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/start-stop.yml
@@ -0,0 +1,262 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- vars:
+ pname: "{{ name_prefix }}-start-stop"
+ cname: "{{ name_prefix }}-container"
+ project_src: "{{ remote_tmp_dir }}/{{ pname }}"
+ test_service: |
+ version: '3'
+ services:
+ {{ cname }}:
+ image: "{{ docker_test_image_alpine }}"
+ command: '/bin/sh -c "sleep 10m"'
+ stop_grace_period: 1s
+ test_service_mod: |
+ version: '3'
+ services:
+ {{ cname }}:
+ image: "{{ docker_test_image_alpine }}"
+ command: '/bin/sh -c "sleep 15m"'
+ stop_grace_period: 1s
+
+ block:
+ - name: Registering container name
+ set_fact:
+ cnames: "{{ cnames + [pname ~ '-' ~ cname ~ '-1'] }}"
+ dnetworks: "{{ dnetworks + [pname ~ '_default'] }}"
+
+ - name: Create project directory
+ file:
+ path: '{{ project_src }}'
+ state: directory
+
+####################################################################
+## Present #########################################################
+####################################################################
+
+ - name: Template default project file
+ copy:
+ dest: '{{ project_src }}/docker-compose.yml'
+ content: '{{ test_service }}'
+
+ - name: Present (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ check_mode: true
+ register: present_1_check
+
+ - name: Present
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ register: present_1
+
+ - name: Present (idempotent check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ check_mode: true
+ register: present_2_check
+
+ - name: Present (idempotent)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ register: present_2
+
+ - name: Template modified project file
+ copy:
+ dest: '{{ project_src }}/docker-compose.yml'
+ content: '{{ test_service_mod }}'
+
+ - name: Present (changed check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ check_mode: true
+ register: present_3_check
+
+ - name: Present (changed)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ register: present_3
+
+ - assert:
+ that:
+ - present_1_check is changed
+ - present_1 is changed
+ - present_1.containers | length == 1
+ - present_1.containers[0].Name == pname ~ '-' ~ cname ~ '-1'
+ - present_1.containers[0].Image == docker_test_image_alpine
+ - present_1.images | length == 1
+ - present_1.images[0].ContainerName == pname ~ '-' ~ cname ~ '-1'
+ - present_1.images[0].Repository == (docker_test_image_alpine | split(':') | first)
+ - present_1.images[0].Tag == (docker_test_image_alpine | split(':') | last)
+ - present_2_check is not changed
+ - present_2 is not changed
+ - present_3_check is changed
+ - present_3 is changed
+
+####################################################################
+## Absent ##########################################################
+####################################################################
+
+ - name: Absent (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: absent
+ check_mode: true
+ register: absent_1_check
+
+ - name: Absent
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: absent
+ register: absent_1
+
+ - name: Absent (idempotent check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: absent
+ check_mode: true
+ register: absent_2_check
+
+ - name: Absent (idempotent)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: absent
+ register: absent_2
+
+ - assert:
+ that:
+ - absent_1_check is changed
+ - absent_1 is changed
+ - absent_2_check is not changed
+ - absent_2 is not changed
+
+####################################################################
+## Stopping and starting ###########################################
+####################################################################
+
+ - name: Template default project file
+ copy:
+ dest: '{{ project_src }}/docker-compose.yml'
+ content: '{{ test_service }}'
+
+ - name: Present stopped (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: stopped
+ check_mode: true
+ register: present_1_check
+
+ - name: Present stopped
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: stopped
+ register: present_1
+
+ - name: Present stopped (idempotent check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: stopped
+ check_mode: true
+ register: present_2_check
+
+ - name: Present stopped (idempotent)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: stopped
+ register: present_2
+
+ - name: Started (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ check_mode: true
+ register: present_3_check
+
+ - name: Started
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ register: present_3
+
+ - name: Started (idempotent check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ check_mode: true
+ register: present_4_check
+
+ - name: Started (idempotent)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: present
+ register: present_4
+
+ - name: Restarted (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: restarted
+ check_mode: true
+ register: present_5_check
+
+ - name: Restarted
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: restarted
+ register: present_5
+
+ - name: Stopped (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: stopped
+ check_mode: true
+ register: present_6_check
+
+ - name: Stopped
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: stopped
+ register: present_6
+
+ - name: Restarted (check)
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: restarted
+ check_mode: true
+ register: present_7_check
+
+ - name: Restarted
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: restarted
+ register: present_7
+
+ - name: Cleanup
+ docker_compose_v2:
+ project_src: '{{ project_src }}'
+ state: absent
+
+ - assert:
+ that:
+ - present_1_check is changed
+ - present_1 is changed
+ - present_2_check is not changed
+ - present_2 is not changed
+ - present_3_check is changed
+ - present_3 is changed
+ - present_4_check is not changed
+ - present_4 is not changed
+ - present_5_check is changed
+ - present_5 is changed
+ - present_6_check is changed
+ - present_6 is changed
+ - present_7_check is changed
+ - present_7 is changed
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/meta/main.yml
new file mode 100644
index 000000000..aefcf50f2
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/meta/main.yml
@@ -0,0 +1,10 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker_cli_compose
+ # The Python dependencies are needed for the other modules
+ - setup_docker_python_deps
+ - setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/main.yml
new file mode 100644
index 000000000..8813f0e71
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/main.yml
@@ -0,0 +1,48 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+# Create random name prefix (for services, ...)
+- name: Create random container name prefix
+ set_fact:
+ name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+ cnames: []
+ dnetworks: []
+
+- debug:
+ msg: "Using name prefix {{ name_prefix }}"
+
+# Run the tests
+- block:
+ - command: docker compose --help
+
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
+
+ always:
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+ diff: false
+
+ - name: "Make sure all networks are removed"
+ docker_network:
+ name: "{{ item }}"
+ state: absent
+ force: true
+ with_items: "{{ dnetworks }}"
+ diff: false
+
+ when: docker_has_compose and docker_compose_version is version('2.18.0', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/run-test.yml
new file mode 100644
index 000000000..72a58962d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/run-test.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/tests/pull.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/tests/pull.yml
new file mode 100644
index 000000000..27f2637b7
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/tests/pull.yml
@@ -0,0 +1,192 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- vars:
+ pname: "{{ name_prefix }}-pull"
+ cname: "{{ name_prefix }}-cont"
+ non_existing_image: does-not-exist:latest
+ project_src: "{{ remote_tmp_dir }}/{{ pname }}"
+ test_service_non_existing: |
+ version: '3'
+ services:
+ {{ cname }}:
+ image: {{ non_existing_image }}
+ test_service_alpine: |
+ version: '3'
+ services:
+ {{ cname }}:
+ image: {{ docker_test_image_alpine }}
+ command: /bin/sh -c 'sleep 10m'
+ stop_grace_period: 1s
+
+ block:
+ - name: Registering container name
+ set_fact:
+ cnames: "{{ cnames + [pname ~ '-' ~ cname ~ '-1'] }}"
+ dnetworks: "{{ dnetworks + [pname ~ '_default'] }}"
+
+ - name: Create project directory
+ file:
+ path: '{{ project_src }}'
+ state: directory
+
+ - name: Make sure images are not around
+ docker_image_remove:
+ name: '{{ item }}'
+ loop:
+ - '{{ non_existing_image }}'
+ - '{{ docker_test_image_alpine }}'
+
+####################################################################
+## Missing image ###################################################
+####################################################################
+
+ - name: Template project file with non-existing image
+ copy:
+ dest: '{{ project_src }}/docker-compose.yml'
+ content: '{{ test_service_non_existing }}'
+
+ - name: Pull (check)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ check_mode: true
+ register: pull_1_check
+ ignore_errors: true
+
+ - name: Pull
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ register: pull_1
+ ignore_errors: true
+
+ - assert:
+ that:
+ - pull_1_check is failed or pull_1_check is changed
+ - pull_1_check is changed or pull_1_check.msg.startswith('Error when processing ')
+ - pull_1 is failed
+ - pull_1.msg.startswith('Error when processing ')
+
+####################################################################
+## Regular image ###################################################
+####################################################################
+
+ - name: Template project file with Alpine image
+ copy:
+ dest: '{{ project_src }}/docker-compose.yml'
+ content: '{{ test_service_alpine }}'
+
+ - when: docker_compose_version is version('2.22.0', '>=')
+ block:
+ - name: Pull with policy=missing (check)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: missing
+ check_mode: true
+ register: pull_1_check
+
+ - name: Pull with policy=missing
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: missing
+ register: pull_1
+
+ - name: Pull with policy=missing (idempotent, check)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: missing
+ check_mode: true
+ register: pull_2_check
+
+ - name: Pull with policy=missing (idempotent)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: missing
+ register: pull_2
+
+ - name: Make sure image is not around
+ docker_image_remove:
+ name: '{{ docker_test_image_alpine }}'
+
+ - name: Pull with policy=always (check)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ check_mode: true
+ register: pull_3_check
+
+ - name: Pull with policy=always
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ register: pull_3
+
+ - name: Pull with policy=always (check, idempotent)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ check_mode: true
+ register: pull_4_check
+
+ - name: Pull with policy=always (idempotent)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ register: pull_4
+
+ - assert:
+ that:
+ - pull_1_check is changed
+ - pull_1_check.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_1 is changed
+ - pull_1.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_2_check is not changed
+ - pull_2 is not changed
+ - pull_3_check is changed
+ - pull_3_check.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_3 is changed
+ - pull_3.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_4_check is changed
+ - pull_4_check.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_4 is not changed
+ - pull_4.actions | selectattr('status', 'eq', 'Pulling') | first
+
+ - when: docker_compose_version is version('2.22.0', '<')
+ block:
+ - name: Pull with policy=always (check)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ check_mode: true
+ register: pull_1_check
+
+ - name: Pull with policy=always
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ register: pull_1
+
+ - name: Pull with policy=always (again, check)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ check_mode: true
+ register: pull_2_check
+
+ - name: Pull with policy=always (again)
+ docker_compose_v2_pull:
+ project_src: '{{ project_src }}'
+ policy: always
+ register: pull_2
+
+ - assert:
+ that:
+ - pull_1_check is changed
+ - pull_1_check.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_1 is changed
+ - pull_1.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_2_check is changed
+ - pull_2_check.actions | selectattr('status', 'eq', 'Pulling') | first
+ - pull_2 is not changed
+ - pull_2.actions | selectattr('status', 'eq', 'Pulling') | first
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml
index 2650229d8..9eeb6626b 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml
@@ -5,4 +5,5 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml
index 9911452f9..2236bc803 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml
@@ -34,30 +34,31 @@
# Run the tests
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure all containers are removed"
- docker_container:
- name: "{{ item }}"
- state: absent
- force_kill: true
- with_items: "{{ cnames }}"
- diff: false
- - name: "Make sure all images are removed"
- docker_image:
- name: "{{ item }}"
- state: absent
- with_items: "{{ inames }}"
- - name: "Make sure all networks are removed"
- docker_network:
- name: "{{ item }}"
- state: absent
- force: true
- with_items: "{{ dnetworks }}"
- diff: false
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+ diff: false
+ - name: "Make sure all images are removed"
+ docker_image_remove:
+ name: "{{ item }}"
+ with_items: "{{ inames }}"
+ - name: "Make sure all networks are removed"
+ docker_network:
+ name: "{{ item }}"
+ state: absent
+ force: true
+ with_items: "{{ dnetworks }}"
+ diff: false
when: docker_api_version is version('1.25', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml
index 54f0d4a62..c37a0c4df 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml
@@ -384,9 +384,8 @@
- name: Pull {{ docker_test_image_hello_world }} image to make sure wildcard_2 test succeeds
# If the image isn't there, it will pull it and return 'changed'.
- docker_image:
+ docker_image_pull:
name: "{{ docker_test_image_hello_world }}"
- source: pull
- name: wildcard
docker_container:
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml
index 76270c68a..4dfdb02a6 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml
@@ -11,9 +11,8 @@
cnames: "{{ cnames + [cname] }}"
- name: Pull images
- docker_image:
+ docker_image_pull:
name: "{{ image }}"
- source: pull
loop:
- "{{ docker_test_image_hello_world }}"
- "{{ docker_test_image_alpine }}"
@@ -69,10 +68,9 @@
- name: Untag image
# Image will not be deleted since the container still uses it
- docker_image:
+ docker_image_remove:
name: "{{ docker_test_image_alpine }}"
- force_absent: true
- state: absent
+ force: true
- name: Create container with {{ docker_test_image_alpine }} image via name (check mode, will pull, same image)
docker_container:
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml
index 1254fb52d..845c7897a 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml
@@ -2235,9 +2235,8 @@
- name: Pull images to make sure ignore_image test succeeds
# If the image isn't there, it will pull it and return 'changed'.
- docker_image:
+ docker_image_pull:
name: "{{ item }}"
- source: pull
loop:
- "{{ docker_test_image_hello_world }}"
- "{{ docker_test_image_registry_nginx }}"
@@ -2456,9 +2455,8 @@
diff: false
- name: cleanup image
- docker_image:
+ docker_image_remove:
name: "{{ iname_labels }}"
- state: absent
diff: false
- assert:
@@ -2486,9 +2484,8 @@
- name: Pull images to make sure ignore_image test succeeds
# If the image isn't there, it will pull it and return 'changed'.
- docker_image:
+ docker_image_pull:
name: "{{ item }}"
- source: pull
loop:
- "{{ docker_test_image_hello_world }}"
- "{{ docker_test_image_registry_nginx }}"
@@ -2577,9 +2574,8 @@
inames: "{{ inames + [iname_name_mismatch] }}"
- name: Tag hello world image (pulled earlier) with new name
- docker_image:
+ docker_image_tag:
name: "{{ docker_test_image_registry_nginx }}"
- source: local
repository: "{{ iname_name_mismatch }}:latest"
- name: image_name_mismatch
@@ -2617,9 +2613,8 @@
diff: false
- name: Cleanup image
- docker_image:
+ docker_image_remove:
name: "{{ iname_name_mismatch }}"
- state: absent
diff: false
- assert:
@@ -3015,46 +3010,48 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
## mac_address #####################################################
####################################################################
-- name: mac_address
- docker_container:
- image: "{{ docker_test_image_alpine }}"
- command: '/bin/sh -c "sleep 10m"'
- name: "{{ cname }}"
- mac_address: 92:d0:c6:0a:29:33
- state: started
- register: mac_address_1
-
-- name: mac_address (idempotency)
- docker_container:
- image: "{{ docker_test_image_alpine }}"
- command: '/bin/sh -c "sleep 10m"'
- name: "{{ cname }}"
- mac_address: 92:d0:c6:0a:29:33
- state: started
- register: mac_address_2
-
-- name: mac_address (change)
- docker_container:
- image: "{{ docker_test_image_alpine }}"
- command: '/bin/sh -c "sleep 10m"'
- name: "{{ cname }}"
- mac_address: 92:d0:c6:0a:29:44
- state: started
- force_kill: true
- register: mac_address_3
-
-- name: cleanup
- docker_container:
- name: "{{ cname }}"
- state: absent
- force_kill: true
- diff: false
-
-- assert:
- that:
- - mac_address_1 is changed
- - mac_address_2 is not changed
- - mac_address_3 is changed
+- when: docker_api_version is version('1.44', '<')
+ block:
+ - name: mac_address
+ docker_container:
+ image: "{{ docker_test_image_alpine }}"
+ command: '/bin/sh -c "sleep 10m"'
+ name: "{{ cname }}"
+ mac_address: 92:d0:c6:0a:29:33
+ state: started
+ register: mac_address_1
+
+ - name: mac_address (idempotency)
+ docker_container:
+ image: "{{ docker_test_image_alpine }}"
+ command: '/bin/sh -c "sleep 10m"'
+ name: "{{ cname }}"
+ mac_address: 92:d0:c6:0a:29:33
+ state: started
+ register: mac_address_2
+
+ - name: mac_address (change)
+ docker_container:
+ image: "{{ docker_test_image_alpine }}"
+ command: '/bin/sh -c "sleep 10m"'
+ name: "{{ cname }}"
+ mac_address: 92:d0:c6:0a:29:44
+ state: started
+ force_kill: true
+ register: mac_address_3
+
+ - name: cleanup
+ docker_container:
+ name: "{{ cname }}"
+ state: absent
+ force_kill: true
+ diff: false
+
+ - assert:
+ that:
+ - mac_address_1 is changed
+ - mac_address_2 is not changed
+ - mac_address_3 is changed
####################################################################
## memory ##########################################################
@@ -3549,9 +3546,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
####################################################################
- name: Remove hello-world image
- docker_image:
+ docker_image_remove:
name: hello-world:latest
- state: absent
- name: platform
docker_container:
@@ -3564,17 +3560,38 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
register: platform_1
ignore_errors: true
-- name: platform (idempotency)
+- name: platform (idempotency with full name)
+ # Docker daemon only returns 'linux' as the platform for the container,
+ # so this has to be handled correctly by our additional code
docker_container:
image: hello-world:latest
name: "{{ cname }}"
state: present
- # The container always reports 'linux' as platform instead of 'linux/amd64'...
- platform: linux
+ platform: linux/amd64
debug: true
register: platform_2
ignore_errors: true
+- name: platform (idempotency with shorter name)
+ docker_container:
+ image: hello-world:latest
+ name: "{{ cname }}"
+ state: present
+ platform: linux
+ debug: true
+ register: platform_3
+ ignore_errors: true
+
+- name: platform (idempotency with shorter name)
+ docker_container:
+ image: hello-world:latest
+ name: "{{ cname }}"
+ state: present
+ platform: amd64
+ debug: true
+ register: platform_4
+ ignore_errors: true
+
- name: platform (changed)
docker_container:
image: hello-world:latest
@@ -3587,7 +3604,19 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
comparisons:
# Do not restart because of the changed image ID
image: ignore
- register: platform_3
+ register: platform_5
+ ignore_errors: true
+
+- name: platform (idempotency)
+ docker_container:
+ image: hello-world:latest
+ name: "{{ cname }}"
+ state: present
+ pull: true
+ platform: 386
+ force_kill: true
+ debug: true
+ register: platform_6
ignore_errors: true
- name: cleanup
@@ -3601,7 +3630,10 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
that:
- platform_1 is changed
- platform_2 is not changed and platform_2 is not failed
- - platform_3 is changed
+ - platform_3 is not changed and platform_3 is not failed
+ - platform_4 is not changed and platform_4 is not failed
+ - platform_5 is changed
+ - platform_6 is not changed and platform_6 is not failed
when: docker_api_version is version('1.41', '>=')
- assert:
that:
@@ -3611,6 +3643,149 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
when: docker_api_version is version('1.41', '<')
####################################################################
+## pull / pull_check_mode_behavior #################################
+####################################################################
+
+- name: Remove hello-world image
+ docker_image_remove:
+ name: "{{ docker_test_image_hello_world }}"
+
+- name: pull (pull=never)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: never
+ debug: true
+ register: pull_1
+ ignore_errors: true
+
+- name: pull (pull=missing, check mode)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: missing
+ debug: true
+ register: pull_2
+ check_mode: true
+ ignore_errors: true
+
+- name: pull (pull=missing)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: missing
+ debug: true
+ register: pull_3
+ ignore_errors: true
+
+- name: pull (pull=missing, idempotent, check mode)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: missing
+ debug: true
+ register: pull_4
+ check_mode: true
+ ignore_errors: true
+
+- name: pull (pull=missing, idempotent)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: missing
+ debug: true
+ register: pull_5
+ ignore_errors: true
+
+- name: pull (pull=always, check mode, pull_check_mode_behavior=image_not_present)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: always
+ pull_check_mode_behavior: image_not_present
+ debug: true
+ register: pull_6
+ check_mode: true
+ ignore_errors: true
+
+- name: pull (pull=always, check mode, pull_check_mode_behavior=always)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: always
+ pull_check_mode_behavior: always
+ debug: true
+ register: pull_7
+ check_mode: true
+ ignore_errors: true
+
+- name: pull (pull=always)
+ docker_container:
+ image: "{{ docker_test_image_hello_world }}"
+ name: "{{ cname }}"
+ state: present
+ pull: always
+ debug: true
+ register: pull_8
+ ignore_errors: true
+
+- name: cleanup
+ docker_container:
+ name: "{{ cname }}"
+ state: absent
+ force_kill: true
+ diff: false
+
+- assert:
+ that:
+ - pull_1 is failed
+ - pull_1.msg == ("Cannot find image with name " ~ docker_test_image_hello_world ~ ", and pull=never")
+ - pull_2 is changed
+ - pulled_image_action not in pull_2.actions
+ - pulled_image_action_changed in pull_2.actions
+ - pulled_image_action_unchanged not in pull_2.actions
+ - pull_3 is changed
+ - pulled_image_action not in pull_3.actions
+ - pulled_image_action_changed in pull_3.actions
+ - pulled_image_action_unchanged not in pull_3.actions
+ - pull_4 is not changed
+ - pulled_image_action not in pull_4.actions
+ - pulled_image_action_changed not in pull_4.actions
+ - pulled_image_action_unchanged not in pull_4.actions
+ - pull_5 is not changed
+ - pulled_image_action not in pull_5.actions
+ - pulled_image_action_changed not in pull_5.actions
+ - pulled_image_action_unchanged not in pull_5.actions
+ - pull_6 is not changed
+ - pulled_image_action not in pull_6.actions
+ - pulled_image_action_changed not in pull_6.actions
+ - pulled_image_action_unchanged not in pull_6.actions
+ - pull_7 is changed
+ - pulled_image_action in pull_7.actions
+ - pulled_image_action_changed not in pull_7.actions
+ - pulled_image_action_unchanged not in pull_7.actions
+ - pull_8 is not changed
+ - pulled_image_action not in pull_8.actions
+ - pulled_image_action_changed not in pull_8.actions
+ - pulled_image_action_unchanged in pull_8.actions
+ vars:
+ pulled_image_action:
+ pulled_image: "{{ docker_test_image_hello_world }}"
+ pulled_image_action_changed:
+ pulled_image: "{{ docker_test_image_hello_world }}"
+ changed: true
+ pulled_image_action_unchanged:
+ pulled_image: "{{ docker_test_image_hello_world }}"
+ changed: false
+
+####################################################################
## privileged ######################################################
####################################################################
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml
index 2650229d8..f5b897895 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml
@@ -5,4 +5,5 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml
index 20f9a2681..7eb1b86a3 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml
@@ -26,18 +26,20 @@
# Run the tests
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure all containers are removed"
- docker_container:
- name: "{{ item }}"
- state: absent
- force_kill: true
- with_items: "{{ cnames }}"
- diff: false
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+ diff: false
when: docker_api_version is version('1.25', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml b/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml
index 0d090db97..b4871d3e3 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml
@@ -91,7 +91,7 @@
- name: assert container is returned when filters are matched (single label)
assert:
- that: "{{ output.containers | length }} == 1"
+ that: "output.containers | length == 1"
- name: Get info on Docker host and list containers matching filters (multiple labels)
docker_host_info:
@@ -104,7 +104,7 @@
- name: assert container is returned when filters are matched (multiple labels)
assert:
- that: "{{ output.containers | length }} == 1"
+ that: "output.containers | length == 1"
- name: Get info on Docker host and do not list containers which do not match filters
docker_host_info:
@@ -118,7 +118,7 @@
- name: assert no container is returned when filters are not matched
assert:
- that: "{{ output.containers | length }} == 0"
+ that: "output.containers | length == 0"
- name: Get info on Docker host and list containers matching filters (single label, not all containers)
docker_host_info:
@@ -139,8 +139,8 @@
- name: assert one resp. two container is returned
assert:
that:
- - "{{ output.containers | length }} == 1"
- - "{{ output_all.containers | length }} == 2"
+ - "output.containers | length == 1"
+ - "output_all.containers | length == 2"
- name: Get info on Docker host and list containers with verbose output
docker_host_info:
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml
index f7ba9ab1b..511f9e419 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml
@@ -5,4 +5,5 @@
dependencies:
- setup_docker_registry
+ - setup_docker_python_deps
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml
index 50bb84ffc..ea3b47dd3 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml
@@ -31,22 +31,24 @@
- StagedDockerfile
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure all images are removed"
- docker_image:
- name: "{{ item }}"
- state: absent
- with_items: "{{ inames }}"
- - name: "Make sure all containers are removed"
- docker_container:
- name: "{{ item }}"
- state: absent
- force_kill: true
- with_items: "{{ cnames }}"
+ - name: "Make sure all images are removed"
+ docker_image:
+ name: "{{ item }}"
+ state: absent
+ with_items: "{{ inames }}"
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
when: docker_api_version is version('1.25', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml
index 78b4f7738..068e92f4e 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml
@@ -117,7 +117,7 @@
register: fail_3
ignore_errors: true
-- name: buildargs
+- name: Build image ID (must fail)
docker_image:
source: build
name: "{{ present_1.image.Id }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml
index a13eb691f..ffd427fd2 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml
@@ -9,8 +9,8 @@
- name: Determining pushed image names
set_fact:
- hello_world_image_base: "{{ registry_address }}/test/hello-world"
- test_image_base: "{{ registry_address }}/test/{{ iname }}"
+ hello_world_image_base: "{{ registry_address | default('localhost') }}/test/hello-world"
+ test_image_base: "{{ registry_address | default('localhost') }}/test/{{ iname }}"
- name: Registering image name
set_fact:
@@ -20,179 +20,182 @@
## interact with test registry #####################################
####################################################################
-- name: Make sure image is not there
- docker_image:
- name: "{{ hello_world_image_base }}:latest"
- state: absent
- force_absent: true
-
-- name: Make sure we have {{ docker_test_image_hello_world }}
- docker_image:
- name: "{{ docker_test_image_hello_world }}"
- source: pull
-
-- name: Push image to test registry
- docker_image:
- name: "{{ docker_test_image_hello_world }}"
- repository: "{{ hello_world_image_base }}:latest"
- push: true
- source: local
- register: push_1
-
-- name: Push image to test registry (idempotent)
- docker_image:
- name: "{{ docker_test_image_hello_world }}"
- repository: "{{ hello_world_image_base }}:latest"
- push: true
- source: local
- register: push_2
-
-- name: Push image to test registry (force, still idempotent)
- docker_image:
- name: "{{ docker_test_image_hello_world }}"
- repository: "{{ hello_world_image_base }}:latest"
- push: true
- source: local
- force_tag: true
- register: push_3
-
-- assert:
- that:
- - push_1 is changed
- - push_2 is not changed
- - push_3 is not changed
-
-- name: Get facts of local image
- docker_image_info:
- name: "{{ hello_world_image_base }}:latest"
- register: facts_1
-
-- name: Make sure image is not there
- docker_image:
- name: "{{ hello_world_image_base }}:latest"
- state: absent
- force_absent: true
-
-- name: Get facts of local image (absent)
- docker_image_info:
- name: "{{ hello_world_image_base }}:latest"
- register: facts_2
-
-- name: Pull image from test registry
- docker_image:
- name: "{{ hello_world_image_base }}:latest"
- state: present
- source: pull
- register: pull_1
-
-- name: Pull image from test registry (idempotency)
- docker_image:
- name: "{{ hello_world_image_base }}:latest"
- state: present
- source: pull
- register: pull_2
-
-- name: Get facts of local image (present)
- docker_image_info:
- name: "{{ hello_world_image_base }}:latest"
- register: facts_3
-
-- assert:
- that:
- - pull_1 is changed
- - pull_2 is not changed
- - facts_1.images | length == 1
- - facts_2.images | length == 0
- - facts_3.images | length == 1
-
-- name: Pull image from test registry (with digest)
- docker_image:
- name: "{{ facts_3.images[0].RepoDigests[0] }}"
- state: present
- source: pull
- force_source: true
- register: pull_digest
-
-- name: Make sure that changed is still false
- assert:
- that:
- - pull_digest is not changed
-
-- name: Tag different image with new tag
- docker_image:
- name: "{{ docker_test_image_alpine_different }}"
- repository: "{{ hello_world_image_base }}:newtag"
- push: false
- source: pull
-
-- name: Push different image with new tag
- docker_image:
- name: "{{ hello_world_image_base }}"
- repository: "{{ hello_world_image_base }}"
- tag: newtag
- push: true
- source: local
- register: push_1_different
-
-- name: Push different image with new tag (idempotent)
- docker_image:
- name: "{{ hello_world_image_base }}"
- repository: "{{ hello_world_image_base }}"
- tag: newtag
- push: true
- source: local
- register: push_2_different
-
-- assert:
- that:
- - push_1_different is changed
- - push_2_different is not changed
-
-- name: Tag same image with new tag
- docker_image:
- name: "{{ docker_test_image_alpine_different }}"
- repository: "{{ hello_world_image_base }}:newtag2"
- push: false
- source: pull
-
-- name: Push same image with new tag
- docker_image:
- name: "{{ hello_world_image_base }}"
- repository: "{{ hello_world_image_base }}"
- tag: newtag2
- push: true
- source: local
- register: push_1_same
-
-- name: Push same image with new tag (idempotent)
- docker_image:
- name: "{{ hello_world_image_base }}"
- repository: "{{ hello_world_image_base }}"
- tag: newtag2
- push: true
- source: local
- register: push_2_same
-
-- assert:
- that:
- # NOTE: This should be:
- # - push_1_same is changed
- # Unfortunately docker does *NOT* report whether the tag already existed or not.
- # Here are the logs returned by client.push() for both tasks (which are exactly the same):
- # push_1_same:
- # {"status": "The push refers to repository [localhost:32796/test/hello-world]"},
- # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Preparing"},
- # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Layer already exists"},
- # {"status": "newtag2: digest: sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b size: 528"},
- # {"aux": {"Digest": "sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b", "Size": 528, "Tag": "newtag2"}, "progressDetail": {}}
- # push_2_same:
- # {"status": "The push refers to repository [localhost:32796/test/hello-world]"},
- # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Preparing"},
- # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Layer already exists"},
- # {"status": "newtag2: digest: sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b size: 528"},
- # {"aux": {"Digest": "sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b", "Size": 528, "Tag": "newtag2"}, "progressDetail": {}}
- - push_1_same is not changed
- - push_2_same is not changed
+- name: Run registry tests only when registry is present
+ when: registry_address is defined
+ block:
+ - name: Make sure image is not there
+ docker_image:
+ name: "{{ hello_world_image_base }}:latest"
+ state: absent
+ force_absent: true
+
+ - name: Make sure we have {{ docker_test_image_hello_world }}
+ docker_image:
+ name: "{{ docker_test_image_hello_world }}"
+ source: pull
+
+ - name: Push image to test registry
+ docker_image:
+ name: "{{ docker_test_image_hello_world }}"
+ repository: "{{ hello_world_image_base }}:latest"
+ push: true
+ source: local
+ register: push_1
+
+ - name: Push image to test registry (idempotent)
+ docker_image:
+ name: "{{ docker_test_image_hello_world }}"
+ repository: "{{ hello_world_image_base }}:latest"
+ push: true
+ source: local
+ register: push_2
+
+ - name: Push image to test registry (force, still idempotent)
+ docker_image:
+ name: "{{ docker_test_image_hello_world }}"
+ repository: "{{ hello_world_image_base }}:latest"
+ push: true
+ source: local
+ force_tag: true
+ register: push_3
+
+ - assert:
+ that:
+ - push_1 is changed
+ - push_2 is not changed
+ - push_3 is not changed
+
+ - name: Get facts of local image
+ docker_image_info:
+ name: "{{ hello_world_image_base }}:latest"
+ register: facts_1
+
+ - name: Make sure image is not there
+ docker_image:
+ name: "{{ hello_world_image_base }}:latest"
+ state: absent
+ force_absent: true
+
+ - name: Get facts of local image (absent)
+ docker_image_info:
+ name: "{{ hello_world_image_base }}:latest"
+ register: facts_2
+
+ - name: Pull image from test registry
+ docker_image:
+ name: "{{ hello_world_image_base }}:latest"
+ state: present
+ source: pull
+ register: pull_1
+
+ - name: Pull image from test registry (idempotency)
+ docker_image:
+ name: "{{ hello_world_image_base }}:latest"
+ state: present
+ source: pull
+ register: pull_2
+
+ - name: Get facts of local image (present)
+ docker_image_info:
+ name: "{{ hello_world_image_base }}:latest"
+ register: facts_3
+
+ - assert:
+ that:
+ - pull_1 is changed
+ - pull_2 is not changed
+ - facts_1.images | length == 1
+ - facts_2.images | length == 0
+ - facts_3.images | length == 1
+
+ - name: Pull image from test registry (with digest)
+ docker_image:
+ name: "{{ hello_world_image_base }}@{{ facts_3.images[0].RepoDigests[0] | regex_replace('.*@', '') }}"
+ state: present
+ source: pull
+ force_source: true
+ register: pull_digest
+
+ - name: Make sure that changed is still false
+ assert:
+ that:
+ - pull_digest is not changed
+
+ - name: Tag different image with new tag
+ docker_image:
+ name: "{{ docker_test_image_alpine_different }}"
+ repository: "{{ hello_world_image_base }}:newtag"
+ push: false
+ source: pull
+
+ - name: Push different image with new tag
+ docker_image:
+ name: "{{ hello_world_image_base }}"
+ repository: "{{ hello_world_image_base }}"
+ tag: newtag
+ push: true
+ source: local
+ register: push_1_different
+
+ - name: Push different image with new tag (idempotent)
+ docker_image:
+ name: "{{ hello_world_image_base }}"
+ repository: "{{ hello_world_image_base }}"
+ tag: newtag
+ push: true
+ source: local
+ register: push_2_different
+
+ - assert:
+ that:
+ - push_1_different is changed
+ - push_2_different is not changed
+
+ - name: Tag same image with new tag
+ docker_image:
+ name: "{{ docker_test_image_alpine_different }}"
+ repository: "{{ hello_world_image_base }}:newtag2"
+ push: false
+ source: pull
+
+ - name: Push same image with new tag
+ docker_image:
+ name: "{{ hello_world_image_base }}"
+ repository: "{{ hello_world_image_base }}"
+ tag: newtag2
+ push: true
+ source: local
+ register: push_1_same
+
+ - name: Push same image with new tag (idempotent)
+ docker_image:
+ name: "{{ hello_world_image_base }}"
+ repository: "{{ hello_world_image_base }}"
+ tag: newtag2
+ push: true
+ source: local
+ register: push_2_same
+
+ - assert:
+ that:
+ # NOTE: This should be:
+ # - push_1_same is changed
+ # Unfortunately docker does *NOT* report whether the tag already existed or not.
+ # Here are the logs returned by client.push() for both tasks (which are exactly the same):
+ # push_1_same:
+ # {"status": "The push refers to repository [localhost:32796/test/hello-world]"},
+ # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Preparing"},
+ # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Layer already exists"},
+ # {"status": "newtag2: digest: sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b size: 528"},
+ # {"aux": {"Digest": "sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b", "Size": 528, "Tag": "newtag2"}, "progressDetail": {}}
+ # push_2_same:
+ # {"status": "The push refers to repository [localhost:32796/test/hello-world]"},
+ # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Preparing"},
+ # {"id": "3fc64803ca2d", "progressDetail": {}, "status": "Layer already exists"},
+ # {"status": "newtag2: digest: sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b size: 528"},
+ # {"aux": {"Digest": "sha256:92251458088c638061cda8fd8b403b76d661a4dc6b7ee71b6affcf1872557b2b", "Size": 528, "Tag": "newtag2"}, "progressDetail": {}}
+ - push_1_same is not changed
+ - push_2_same is not changed
####################################################################
## repository ######################################################
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml
index 0670f1332..b8f6c7002 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml
@@ -76,7 +76,7 @@
build:
path: "{{ remote_tmp_dir }}/files"
container_limits:
- memory: 4000
+ memory: 4KB
pull: false
source: build
ignore_errors: true
@@ -88,8 +88,8 @@
build:
path: "{{ remote_tmp_dir }}/files"
container_limits:
- memory: 7000000
- memswap: 8000000
+ memory: 7MB
+ memswap: 8MB
pull: false
source: build
register: container_limits_2
@@ -444,3 +444,61 @@
- assert:
that:
- path_1 is changed
+
+####################################################################
+## build.shm_size ##################################################
+####################################################################
+
+- name: Build image with custom shm_size
+ docker_image:
+ name: "{{ iname }}"
+ build:
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "MyDockerfile"
+ pull: false
+ shm_size: 128MB
+ source: build
+ register: path_1
+
+- name: cleanup
+ docker_image:
+ name: "{{ iname }}"
+ state: absent
+ force_absent: true
+
+- assert:
+ that:
+ - path_1 is changed
+
+####################################################################
+## build.labels ####################################################
+####################################################################
+
+- name: Build image with labels
+ docker_image:
+ name: "{{ iname }}"
+ build:
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "MyDockerfile"
+ pull: false
+ labels:
+ FOO: BAR
+ this is a label: this is the label's value
+ source: build
+ register: labels_1
+
+- name: cleanup
+ docker_image:
+ name: "{{ iname }}"
+ state: absent
+ force_absent: true
+
+- name: Show image information
+ debug:
+ var: labels_1.image
+
+- assert:
+ that:
+ - labels_1 is changed
+ - labels_1.image.Config.Labels.FOO == 'BAR'
+ - labels_1.image.Config.Labels["this is a label"] == "this is the label's value"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/meta/main.yml
new file mode 100644
index 000000000..71ac98d4f
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/meta/main.yml
@@ -0,0 +1,10 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker_cli_buildx
+ # The Python dependencies are needed for the other modules
+ - setup_docker_python_deps
+ - setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/main.yml
new file mode 100644
index 000000000..88b23cfe7
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/main.yml
@@ -0,0 +1,13 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ include_tasks:
+ file: test.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/run-test.yml
new file mode 100644
index 000000000..72a58962d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/run-test.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/test.yml
new file mode 100644
index 000000000..af6e75b22
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/test.yml
@@ -0,0 +1,59 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Create random name prefix
+ set_fact:
+ name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+- name: Create image and container list
+ set_fact:
+ inames: []
+ cnames: []
+
+- debug:
+ msg: "Using name prefix {{ name_prefix }}"
+
+- name: Create files directory
+ file:
+ path: '{{ remote_tmp_dir }}/files'
+ state: directory
+
+- name: Template files
+ template:
+ src: '{{ item }}'
+ dest: '{{ remote_tmp_dir }}/files/{{ item }}'
+ loop:
+ - ArgsDockerfile
+ - Dockerfile
+ - EtcHostsDockerfile
+ - MyDockerfile
+ - StagedDockerfile
+
+- debug:
+ msg: "Has buildx plugin: {{ docker_has_buildx }}"
+
+- block:
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
+
+ always:
+ - name: "Make sure all images are removed"
+ docker_image:
+ name: "{{ item }}"
+ state: absent
+ with_items: "{{ inames }}"
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+
+ when: docker_api_version is version('1.25', '>=') and docker_cli_version is version('19.03', '>=') and docker_has_buildx
+
+- fail: msg="Too old docker / docker-py version to run docker_image tests!"
+ when: not(docker_api_version is version('1.25', '>=') and docker_cli_version is version('19.03', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6) and docker_has_buildx
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/tests/options.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/tests/options.yml
new file mode 100644
index 000000000..990035788
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/tests/options.yml
@@ -0,0 +1,204 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Registering image name
+ set_fact:
+ iname: "{{ name_prefix ~ '-options' }}"
+
+- name: Registering image name
+ set_fact:
+ inames: "{{ inames + [iname] }}"
+
+####################################################################
+## args ############################################################
+####################################################################
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- name: buildargs
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "ArgsDockerfile"
+ args:
+ IMAGE: "{{ docker_test_image_busybox }}"
+ TEST1: val1
+ TEST2: val2
+ TEST3: "True"
+ pull: false
+ register: buildargs_1
+
+- name: buildargs (idempotency)
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "ArgsDockerfile"
+ args:
+ IMAGE: "{{ docker_test_image_busybox }}"
+ TEST1: val1
+ TEST2: val2
+ TEST3: "True"
+ pull: false
+ register: buildargs_2
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- assert:
+ that:
+ - buildargs_1 is changed
+ - buildargs_2 is not changed
+
+####################################################################
+## dockerfile ######################################################
+####################################################################
+
+- name: dockerfile
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "MyDockerfile"
+ pull: false
+ register: dockerfile_1
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- assert:
+ that:
+ - dockerfile_1 is changed
+ - "('FROM ' ~ docker_test_image_alpine) in dockerfile_1.stderr"
+ - dockerfile_1['image']['Config']['WorkingDir'] == '/newdata'
+
+####################################################################
+## platform ########################################################
+####################################################################
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- name: platform
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ platform: linux
+ pull: false
+ register: platform_1
+
+- name: platform (idempotency)
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ platform: linux
+ pull: false
+ register: platform_2
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- assert:
+ that:
+ - platform_1 is changed
+ - platform_2 is not changed
+
+####################################################################
+## target ##########################################################
+####################################################################
+
+- name: Build multi-stage image
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "StagedDockerfile"
+ target: first
+ pull: false
+ register: dockerfile_2
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- assert:
+ that:
+ - dockerfile_2 is changed
+ - dockerfile_2.image.Config.WorkingDir == '/first'
+
+####################################################################
+## etc_hosts #######################################################
+####################################################################
+
+- name: Build image with custom etc_hosts
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "EtcHostsDockerfile"
+ pull: false
+ etc_hosts:
+ some-custom-host: "127.0.0.1"
+ register: path_1
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- assert:
+ that:
+ - path_1 is changed
+
+####################################################################
+## shm_size ########################################################
+####################################################################
+
+- name: Build image with custom shm_size
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "MyDockerfile"
+ pull: false
+ shm_size: 128MB
+ register: path_1
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- assert:
+ that:
+ - path_1 is changed
+
+####################################################################
+## labels ##########################################################
+####################################################################
+
+- name: Build image with labels
+ docker_image_build:
+ name: "{{ iname }}"
+ path: "{{ remote_tmp_dir }}/files"
+ dockerfile: "MyDockerfile"
+ pull: false
+ labels:
+ FOO: BAR
+ this is a label: this is the label's value
+ register: labels_1
+
+- name: cleanup
+ docker_image_remove:
+ name: "{{ iname }}"
+
+- name: Show image information
+ debug:
+ var: labels_1.image
+
+- assert:
+ that:
+ - labels_1 is changed
+ - labels_1.image.Config.Labels.FOO == 'BAR'
+ - labels_1.image.Config.Labels["this is a label"] == "this is the label's value"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/ArgsDockerfile b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/ArgsDockerfile
new file mode 100644
index 000000000..dedd88a8f
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/ArgsDockerfile
@@ -0,0 +1,13 @@
+# Copyright (c) 2022, Felix Fontein
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+ARG IMAGE
+ARG TEST1
+ARG TEST2
+ARG TEST3
+
+FROM ${IMAGE}
+ENV foo /bar
+WORKDIR ${foo}
+RUN echo "${TEST1} - ${TEST2} - ${TEST3}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/Dockerfile b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/Dockerfile
new file mode 100644
index 000000000..286094b9e
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/Dockerfile
@@ -0,0 +1,7 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+FROM {{ docker_test_image_busybox }}
+ENV foo /bar
+WORKDIR ${foo}
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/EtcHostsDockerfile b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/EtcHostsDockerfile
new file mode 100644
index 000000000..bc21b966b
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/EtcHostsDockerfile
@@ -0,0 +1,7 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+FROM {{ docker_test_image_busybox }}
+# This should fail building if docker cannot resolve some-custom-host
+RUN ping -c1 some-custom-host
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/MyDockerfile b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/MyDockerfile
new file mode 100644
index 000000000..24b1c926f
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/MyDockerfile
@@ -0,0 +1,9 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+FROM {{ docker_test_image_alpine }}
+ENV INSTALL_PATH /newdata
+RUN mkdir -p $INSTALL_PATH
+
+WORKDIR $INSTALL_PATH
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/StagedDockerfile b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/StagedDockerfile
new file mode 100644
index 000000000..da2253425
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/StagedDockerfile
@@ -0,0 +1,11 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+FROM {{ docker_test_image_busybox }} AS first
+ENV dir /first
+WORKDIR ${dir}
+
+FROM {{ docker_test_image_busybox }} AS second
+ENV dir /second
+WORKDIR ${dir}
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_export/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_export/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/meta/main.yml
new file mode 100644
index 000000000..f5b897895
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/meta/main.yml
@@ -0,0 +1,9 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker
+ - setup_docker_python_deps
+ - setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/main.yml
new file mode 100644
index 000000000..88b23cfe7
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/main.yml
@@ -0,0 +1,13 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ include_tasks:
+ file: test.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/run-test.yml
new file mode 100644
index 000000000..72a58962d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/run-test.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/test.yml
new file mode 100644
index 000000000..e6ffe722d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/test.yml
@@ -0,0 +1,39 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Create random name prefix
+ set_fact:
+ name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+- name: Create image and container list
+ set_fact:
+ inames: []
+ cnames: []
+
+- debug:
+ msg: "Using name prefix {{ name_prefix }}"
+
+- block:
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
+
+ always:
+ - name: "Make sure all images are removed"
+ docker_image_remove:
+ name: "{{ item }}"
+ with_items: "{{ inames }}"
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+
+ when: docker_api_version is version('1.25', '>=')
+
+- fail: msg="Too old docker / docker-py version to run docker_image tests!"
+ when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/tests/basic.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/tests/basic.yml
new file mode 100644
index 000000000..b5f7e6534
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/tests/basic.yml
@@ -0,0 +1,69 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- set_fact:
+ image_names:
+ - "{{ docker_test_image_hello_world }}"
+ - "{{ docker_test_image_alpine_different }}"
+ - "{{ docker_test_image_alpine }}"
+
+- name: Make sure images are there
+ docker_image_pull:
+ name: "{{ item }}"
+ register: images
+ loop: "{{ image_names }}"
+
+- vars:
+ image_ids: "{{ images.results | map(attribute='image') | map(attribute='Id') | list }}"
+ all_images: "{{ image_names + (images.results | map(attribute='image') | map(attribute='Id') | list) }}"
+ image_tasks:
+ - file: archive-1.tar
+ images: "{{ image_names }}"
+ - file: archive-2.tar
+ images: "{{ image_ids }}"
+ - file: archive-3.tar
+ images:
+ - "{{ image_names[0] }}"
+ - "{{ image_ids[1] }}"
+ - file: archive-4.tar
+ images:
+ - "{{ image_ids[0] }}"
+ - "{{ image_names[0] }}"
+ - file: archive-5.tar
+ images:
+ - "{{ image_ids[0] }}"
+
+ block:
+ - name: Create archives
+ docker_image_export:
+ names: "{{ item.images }}"
+ path: "{{ remote_tmp_dir }}/{{ item.file }}"
+ loop: "{{ image_tasks }}"
+ loop_control:
+ label: "{{ item.file }}"
+ register: result
+
+ - name: Extract manifest.json files
+ command: tar xvf "{{ remote_tmp_dir }}/{{ item.file }}" manifest.json --to-stdout
+ loop: "{{ image_tasks }}"
+ loop_control:
+ label: "{{ item.file }}"
+ register: manifests
+
+ - name: Do basic tests
+ assert:
+ that:
+ - item.0.images | length == item.1 | length
+ - item.1 | unique | length == item.2 | length
+ - manifest_json_images == export_image_ids
+ loop: "{{ image_tasks | zip(export_images, manifests_json) }}"
+ loop_control:
+ label: "{{ item.0.file }}"
+ vars:
+ filenames: "{{ image_tasks | map(attribute='file') }}"
+ export_images: "{{ result.results | map(attribute='images') | map('map', attribute='Id') }}"
+ manifests_json: "{{ manifests.results | map(attribute='stdout') | map('from_json') }}"
+ manifest_json_images: "{{ item.2 | map(attribute='Config') | map('regex_replace', '.json$', '') | map('regex_replace', '^blobs/sha256/', '') | sort }}"
+ export_image_ids: "{{ item.1 | map('regex_replace', '^sha256:', '') | unique | sort }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml
index 5bd053ac4..289a9cf1f 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml
@@ -10,9 +10,8 @@
- block:
- name: Make sure image is not there
- docker_image:
+ docker_image_remove:
name: "{{ docker_test_image_alpine_different }}"
- state: absent
- name: Inspect a non-available image
docker_image_info:
@@ -24,10 +23,8 @@
- "result.images|length == 0"
- name: Make sure images are there
- docker_image:
+ docker_image_pull:
name: "{{ item }}"
- source: pull
- state: present
loop:
- "{{ docker_test_image_hello_world }}"
- "{{ docker_test_image_alpine }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml
index 2650229d8..f5b897895 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml
@@ -5,4 +5,5 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml
index a56c95301..e6ffe722d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml
@@ -15,22 +15,23 @@
msg: "Using name prefix {{ name_prefix }}"
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure all images are removed"
- docker_image:
- name: "{{ item }}"
- state: absent
- with_items: "{{ inames }}"
- - name: "Make sure all containers are removed"
- docker_container:
- name: "{{ item }}"
- state: absent
- force_kill: true
- with_items: "{{ cnames }}"
+ - name: "Make sure all images are removed"
+ docker_image_remove:
+ name: "{{ item }}"
+ with_items: "{{ inames }}"
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
when: docker_api_version is version('1.25', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml
index 8d9de9948..70dc8df01 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml
@@ -10,9 +10,8 @@
- "{{ docker_test_image_alpine }}"
- name: Make sure images are there
- docker_image:
+ docker_image_pull:
name: "{{ item }}"
- source: pull
register: images
loop: "{{ image_names }}"
@@ -22,7 +21,9 @@
all_images: "{{ image_names + (images.results | map(attribute='image') | map(attribute='Id') | list) }}"
- name: Create archives
- command: docker save {{ item.images | join(' ') }} -o {{ remote_tmp_dir }}/{{ item.file }}
+ docker_image_export:
+ names: "{{ item.images }}"
+ path: "{{ remote_tmp_dir }}/{{ item.file }}"
loop:
- file: archive-1.tar
images: "{{ image_names }}"
@@ -43,10 +44,9 @@
# All images by IDs
- name: Remove all images
- docker_image:
+ docker_image_remove:
name: "{{ item }}"
- state: absent
- force_absent: true
+ force: true
loop: "{{ all_images }}"
ignore_errors: true
register: remove_all_images
@@ -67,10 +67,9 @@
when: remove_all_images is failed
- name: Remove all images (after pruning)
- docker_image:
+ docker_image_remove:
name: "{{ item }}"
- state: absent
- force_absent: true
+ force: true
loop: "{{ all_images }}"
when: remove_all_images is failed
@@ -107,9 +106,8 @@
# Mixed images and IDs
- name: Remove all images
- docker_image:
+ docker_image_remove:
name: "{{ item }}"
- state: absent
loop: "{{ all_images }}"
- name: Load all images (mixed images and IDs)
@@ -137,9 +135,8 @@
# Same image twice
- name: Remove all images
- docker_image:
+ docker_image_remove:
name: "{{ item }}"
- state: absent
loop: "{{ all_images }}"
- name: Load all images (same image twice)
@@ -162,9 +159,8 @@
# Single image by ID
- name: Remove all images
- docker_image:
+ docker_image_remove:
name: "{{ item }}"
- state: absent
loop: "{{ all_images }}"
- name: Load all images (single image by ID)
@@ -197,9 +193,8 @@
# All images by names
- name: Remove all images
- docker_image:
+ docker_image_remove:
name: "{{ item }}"
- state: absent
loop: "{{ all_images }}"
- name: Load all images (names)
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/meta/main.yml
new file mode 100644
index 000000000..ff316450e
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/meta/main.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker_registry
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/main.yml
new file mode 100644
index 000000000..88b23cfe7
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/main.yml
@@ -0,0 +1,13 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ include_tasks:
+ file: test.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/run-test.yml
new file mode 100644
index 000000000..72a58962d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/run-test.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/test.yml
new file mode 100644
index 000000000..e6ffe722d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/test.yml
@@ -0,0 +1,39 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Create random name prefix
+ set_fact:
+ name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+- name: Create image and container list
+ set_fact:
+ inames: []
+ cnames: []
+
+- debug:
+ msg: "Using name prefix {{ name_prefix }}"
+
+- block:
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
+
+ always:
+ - name: "Make sure all images are removed"
+ docker_image_remove:
+ name: "{{ item }}"
+ with_items: "{{ inames }}"
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+
+ when: docker_api_version is version('1.25', '>=')
+
+- fail: msg="Too old docker / docker-py version to run docker_image tests!"
+ when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/basic.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/basic.yml
new file mode 100644
index 000000000..23e1f0929
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/basic.yml
@@ -0,0 +1,196 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Basic pull tests
+ vars:
+ image_name: "{{ docker_test_image_hello_world_platform }}"
+ block:
+ - name: Make sure image is not there
+ docker_image_remove:
+ name: "{{ image_name }}"
+ force: true
+
+ - name: Pull image (check mode)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: amd64
+ register: present_1_check
+ check_mode: true
+
+ - debug:
+ var: present_1_check.diff
+
+ - name: Pull image
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: amd64
+ register: present_1
+
+ - debug:
+ var: present_1.diff
+
+ - name: Pull image (idempotent 1, check mode)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: amd64
+ pull: always
+ register: present_2_check
+ check_mode: true
+
+ - debug:
+ var: present_2_check.diff
+
+ - name: Pull image (idempotent 1)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: amd64
+ pull: always
+ register: present_2
+
+ - debug:
+ var: present_2.diff
+
+ - name: Pull image (change, check mode)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: arm64
+ pull: always
+ register: present_3_check
+ check_mode: true
+
+ - debug:
+ var: present_3_check.diff
+
+ - name: Pull image (change)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: arm64
+ pull: always
+ register: present_3
+
+ - debug:
+ var: present_3.diff
+
+ - name: Pull image (idempotent 2, check mode)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: arm64
+ pull: not_present
+ register: present_4_check
+ check_mode: true
+
+ - debug:
+ var: present_4_check.diff
+
+ - name: Pull image (idempotent 2)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: arm64
+ pull: not_present
+ register: present_4
+
+ - debug:
+ var: present_4.diff
+
+ - name: Pull image (change, check mode)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: amd64
+ pull: not_present
+ register: present_5_check
+ check_mode: true
+
+ - debug:
+ var: present_5_check.diff
+
+ - name: Pull image (change)
+ docker_image_pull:
+ name: "{{ image_name }}"
+ platform: amd64
+ pull: not_present
+ register: present_5
+
+ - debug:
+ var: present_5.diff
+
+ - assert:
+ that:
+ - present_1_check is changed
+ - present_1_check.actions | length == 1
+ - present_1_check.actions[0] == 'Pulled image ' ~ image_name
+ - present_1_check.diff.before.exists is false
+ - present_1_check.diff.after.id == 'unknown'
+ - present_1 is changed
+ - present_1.actions | length == 1
+ - present_1.actions[0] == 'Pulled image ' ~ image_name
+ - present_1.diff.before.exists is false
+ - present_1.diff.after.id is string
+ - present_2_check is changed
+ - present_2_check.actions | length == 1
+ - present_2_check.actions[0] == 'Pulled image ' ~ image_name
+ - present_2_check.diff.before.id == present_1.diff.after.id
+ - present_2_check.diff.after.id == 'unknown'
+ - present_2 is not changed
+ - present_2.actions | length == 1
+ - present_2.actions[0] == 'Pulled image ' ~ image_name
+ - present_2.diff.before.id == present_1.diff.after.id
+ - present_2.diff.after.id == present_1.diff.after.id
+ - present_3_check is changed
+ - present_3_check.actions | length == 1
+ - present_3_check.actions[0] == 'Pulled image ' ~ image_name
+ - present_3_check.diff.before.id == present_1.diff.after.id
+ - present_3_check.diff.after.id == 'unknown'
+ - present_3 is changed
+ - present_3.actions | length == 1
+ - present_3.actions[0] == 'Pulled image ' ~ image_name
+ - present_3.diff.before.id == present_1.diff.after.id
+ - present_3.diff.after.id != present_1.diff.after.id
+ - present_3.diff.after.id is string
+ - present_4_check is not changed
+ - present_4_check.actions | length == 0
+ - present_4_check.diff.before.id == present_3.diff.after.id
+ - present_4_check.diff.after.id == present_3.diff.after.id
+ - present_4 is not changed
+ - present_4.actions | length == 0
+ - present_4.diff.before.id == present_3.diff.after.id
+ - present_4.diff.after.id == present_3.diff.after.id
+ - present_5_check is changed
+ - present_5_check.actions | length == 1
+ - present_5_check.actions[0] == 'Pulled image ' ~ image_name
+ - present_5_check.diff.before.id == present_3.diff.after.id
+ - present_5_check.diff.after.id == 'unknown'
+ - present_5 is changed
+ - present_5.actions | length == 1
+ - present_5.actions[0] == 'Pulled image ' ~ image_name
+ - present_5.diff.before.id == present_3.diff.after.id
+ - present_5.diff.after.id == present_1.diff.after.id
+
+ always:
+ - name: cleanup
+ docker_image_remove:
+ name: "{{ image_name }}"
+ force: true
+
+- name: Pull image ID (must fail)
+ docker_image_pull:
+ name: "{{ present_1.image.Id }}"
+ register: fail_1
+ ignore_errors: true
+
+- name: Pull invalid tag (must fail)
+ docker_image_pull:
+ name: "{{ docker_test_image_hello_world }}"
+ tag: foo/bar
+ register: fail_2
+ ignore_errors: true
+
+- assert:
+ that:
+ - fail_1 is failed
+ - >-
+ 'Cannot pull an image by ID' == fail_1.msg
+ - fail_2 is failed
+ - >-
+ '"foo/bar" is not a valid docker tag!' == fail_2.msg
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml
new file mode 100644
index 000000000..dd092a8b8
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml
@@ -0,0 +1,89 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Image ID pull tests
+ block:
+ - name: Make sure images are not there
+ docker_image_remove:
+ name: "{{ item }}"
+ force: true
+ loop:
+ - "sha256:{{ docker_test_image_digest_v1_image_id }}"
+ - "sha256:{{ docker_test_image_digest_v2_image_id }}"
+
+ - name: Pull image 1
+ docker_image_pull:
+ name: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}"
+ register: present_1
+ diff: true
+
+ - name: Pull image 1 (idempotent, do pull)
+ docker_image_pull:
+ name: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}"
+ pull: always
+ register: present_2
+ diff: true
+
+ - name: Pull image 1 (idempotent, do not pull)
+ docker_image_pull:
+ name: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}"
+ pull: not_present
+ register: present_3
+ diff: true
+
+ - assert:
+ that:
+ - present_1 is changed
+ - present_1.actions | length == 1
+ - present_1.actions[0] == 'Pulled image ' ~ docker_test_image_digest_base ~ ':sha256:' ~ docker_test_image_digest_v1
+ - present_1.diff.before.exists is false
+ - present_1.diff.after.id is string
+ - present_2 is not changed
+ - present_2.actions | length == 1
+ - present_2.actions[0] == 'Pulled image ' ~ docker_test_image_digest_base ~ ':sha256:' ~ docker_test_image_digest_v1
+ - present_2.diff.before.id == present_1.diff.after.id
+ - present_2.diff.after.id == present_1.diff.after.id
+ - present_3 is not changed
+ - present_3.actions | length == 0
+ - present_3.diff.before.id == present_1.diff.after.id
+ - present_3.diff.after.id == present_1.diff.after.id
+
+ - name: Pull image 2 (check mode)
+ docker_image_pull:
+ name: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v2 }}"
+ pull: always
+ register: present_4
+ diff: true
+ check_mode: true
+
+ - name: Pull image 2
+ docker_image_pull:
+ name: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v2 }}"
+ pull: always
+ register: present_5
+ diff: true
+
+ - assert:
+ that:
+ - present_4 is changed
+ - present_4.actions | length == 1
+ - present_4.actions[0] == 'Pulled image ' ~ docker_test_image_digest_base ~ ':sha256:' ~ docker_test_image_digest_v2
+ - present_4.diff.before.exists is false
+ - present_4.diff.after.id == 'unknown'
+ - present_5 is changed
+ - present_5.actions | length == 1
+ - present_5.actions[0] == 'Pulled image ' ~ docker_test_image_digest_base ~ ':sha256:' ~ docker_test_image_digest_v2
+ - present_5.diff.before.exists is false
+ - present_5.diff.after.id != present_1.diff.after.id
+ - present_5.diff.after.id is string
+
+ always:
+ - name: cleanup
+ docker_image_remove:
+ name: "{{ item }}"
+ force: true
+ loop:
+ - "sha256:{{ docker_test_image_digest_v1_image_id }}"
+ - "sha256:{{ docker_test_image_digest_v2_image_id }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/registry.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/registry.yml
new file mode 100644
index 000000000..2edc3b62d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/registry.yml
@@ -0,0 +1,126 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Run registry tests only when registry is present
+ when: registry_address is defined
+ block:
+ - name: Registering image name
+ set_fact:
+ iname: "{{ name_prefix ~ '-options' }}"
+
+ - name: Determining pushed image names
+ set_fact:
+ hello_world_image_base: "{{ registry_address }}/test/hello-world"
+
+ - name: Registering image name
+ set_fact:
+ inames: "{{ inames + [iname, hello_world_image_base ~ ':latest'] }}"
+
+ - name: Make sure image is not there
+ docker_image_remove:
+ name: "{{ hello_world_image_base }}:latest"
+ force: true
+
+ - name: Make sure we have {{ docker_test_image_hello_world }}
+ docker_image_pull:
+ name: "{{ docker_test_image_hello_world }}"
+ diff: true
+
+ - name: Tag image
+ docker_image_tag:
+ name: "{{ docker_test_image_hello_world }}"
+ repository:
+ - "{{ hello_world_image_base }}:latest"
+
+ - name: Push image to test registry
+ docker_image_push:
+ name: "{{ hello_world_image_base }}:latest"
+
+ - name: Get facts of local image
+ docker_image_info:
+ name: "{{ hello_world_image_base }}:latest"
+ register: facts_1
+
+ - name: Make sure image is not there
+ docker_image_remove:
+ name: "{{ hello_world_image_base }}:latest"
+ force: true
+
+ - name: Get facts of local image (not there)
+ docker_image_info:
+ name: "{{ hello_world_image_base }}:latest"
+ register: facts_2
+
+ - name: Pull image from test registry (check mode)
+ docker_image_pull:
+ name: "{{ hello_world_image_base }}:latest"
+ register: pull_1_check
+ diff: true
+ check_mode: true
+
+ - name: Pull image from test registry
+ docker_image_pull:
+ name: "{{ hello_world_image_base }}:latest"
+ register: pull_1
+ diff: true
+
+ - name: Pull image from test registry (idempotency, not pulling, check mode)
+ docker_image_pull:
+ name: "{{ hello_world_image_base }}:latest"
+ pull: not_present
+ register: pull_2_check
+ diff: true
+ check_mode: true
+
+ - name: Pull image from test registry (idempotency, not pulling)
+ docker_image_pull:
+ name: "{{ hello_world_image_base }}:latest"
+ pull: not_present
+ register: pull_2
+ diff: true
+
+ - name: Pull image from test registry (idempotency, pulling, check mode)
+ docker_image_pull:
+ name: "{{ hello_world_image_base }}:latest"
+ pull: always
+ register: pull_3_check
+ diff: true
+ check_mode: true
+
+ - name: Pull image from test registry (idempotency, pulling)
+ docker_image_pull:
+ name: "{{ hello_world_image_base }}:latest"
+ pull: always
+ register: pull_3
+ diff: true
+
+ - name: Get facts of local image (present)
+ docker_image_info:
+ name: "{{ hello_world_image_base }}:latest"
+ register: facts_3
+
+ - assert:
+ that:
+ - pull_1_check is changed
+ - pull_1_check.diff.before.exists is false
+ - pull_1_check.diff.after.id == 'unknown'
+ - pull_1 is changed
+ - pull_1.diff.before.exists is false
+ - pull_1.diff.after.id == facts_1.images[0].Id
+ - pull_2_check is not changed
+ - pull_2_check.diff.before.id == facts_1.images[0].Id
+ - pull_2_check.diff.before == pull_2.diff.after
+ - pull_2 is not changed
+ - pull_2.diff.before.id == facts_1.images[0].Id
+ - pull_2.diff.before == pull_2.diff.after
+ - pull_3_check is changed
+ - pull_3_check.diff.before.id == facts_1.images[0].Id
+ - pull_3_check.diff.after.id == 'unknown'
+ - pull_3 is not changed
+ - pull_3.diff.before.id == facts_1.images[0].Id
+ - pull_3.diff.before == pull_2.diff.after
+ - facts_1.images | length == 1
+ - facts_2.images | length == 0
+ - facts_3.images | length == 1
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_push/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_push/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/meta/main.yml
new file mode 100644
index 000000000..ff316450e
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/meta/main.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker_registry
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/main.yml
new file mode 100644
index 000000000..88b23cfe7
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/main.yml
@@ -0,0 +1,13 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ include_tasks:
+ file: test.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/run-test.yml
new file mode 100644
index 000000000..72a58962d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/run-test.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/test.yml
new file mode 100644
index 000000000..e6ffe722d
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/test.yml
@@ -0,0 +1,39 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Create random name prefix
+ set_fact:
+ name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+- name: Create image and container list
+ set_fact:
+ inames: []
+ cnames: []
+
+- debug:
+ msg: "Using name prefix {{ name_prefix }}"
+
+- block:
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
+
+ always:
+ - name: "Make sure all images are removed"
+ docker_image_remove:
+ name: "{{ item }}"
+ with_items: "{{ inames }}"
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ with_items: "{{ cnames }}"
+
+ when: docker_api_version is version('1.25', '>=')
+
+- fail: msg="Too old docker / docker-py version to run docker_image tests!"
+ when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/basic.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/basic.yml
new file mode 100644
index 000000000..15ed8744f
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/basic.yml
@@ -0,0 +1,60 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- vars:
+ image_name: registry.example.com:5000/foo/bar:baz
+ block:
+ - name: Make sure image is not present
+ docker_image_remove:
+ name: "{{ image_name }}"
+
+ - name: Push non-existing image (must fail)
+ docker_image_push:
+ name: "{{ image_name }}"
+ register: fail_1
+ ignore_errors: true
+
+ - name: Push image ID (must fail)
+ docker_image_push:
+ name: "sha256:{{ docker_test_image_digest_v1_image_id }}"
+ register: fail_2
+ ignore_errors: true
+
+ - name: Push image with digest (must fail)
+ docker_image_push:
+ name: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}"
+ register: fail_3
+ ignore_errors: true
+
+ - name: Push invalid tag (must fail)
+ docker_image_push:
+ name: "{{ docker_test_image_hello_world }}"
+ tag: foo/bar
+ register: fail_4
+ ignore_errors: true
+
+ - name: Push invalid tag 2 (must fail)
+ docker_image_push:
+ name: "{{ docker_test_image_digest_base }}:foo bar"
+ register: fail_5
+ ignore_errors: true
+
+ - assert:
+ that:
+ - fail_1 is failed
+ - >-
+ 'Cannot find image registry.example.com:5000/foo/bar:baz' == fail_1.msg
+ - fail_2 is failed
+ - >-
+ 'Cannot push an image by ID' == fail_2.msg
+ - fail_3 is failed
+ - >-
+ 'Cannot push an image by digest' == fail_3.msg
+ - fail_4 is failed
+ - >-
+ '"foo/bar" is not a valid docker tag!' == fail_4.msg
+ - fail_5 is failed
+ - >-
+ '"foo bar" is not a valid docker tag!' == fail_5.msg
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/registry.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/registry.yml
new file mode 100644
index 000000000..ca18d196b
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/registry.yml
@@ -0,0 +1,82 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Run registry tests only when registry is present
+ when: registry_address is defined
+ block:
+ - name: Pull images
+ docker_image_pull:
+ name: "{{ item }}"
+ loop:
+ - "{{ docker_test_image_hello_world }}"
+ - "{{ docker_test_image_alpine }}"
+ register: pulled_images
+
+ - name: Determining pushed image names
+ set_fact:
+ image_name_base: "{{ registry_address }}/test/{{ name_prefix }}"
+ image_name_base2: "{{ registry_frontend2_address }}/test/{{ name_prefix }}"
+ image_tag: latest
+
+ - name: Registering image name
+ set_fact:
+ inames: "{{ inames + [image_name_base ~ ':' ~ image_tag, image_name_base2 ~ ':' ~ image_tag] }}"
+
+ - name: Tag first image
+ docker_image_tag:
+ name: "{{ docker_test_image_hello_world }}"
+ repository:
+ - "{{ image_name_base }}:{{ image_tag }}"
+ - "{{ image_name_base2 }}:{{ image_tag }}"
+
+ - name: Push first image
+ docker_image_push:
+ name: "{{ image_name_base }}:{{ image_tag }}"
+ register: push_1
+
+ - name: Push first image (idempotent)
+ docker_image_push:
+ name: "{{ image_name_base }}:{{ image_tag }}"
+ register: push_2
+
+ - name: Tag second image
+ docker_image_tag:
+ name: "{{ docker_test_image_alpine }}"
+ repository:
+ - "{{ image_name_base }}:{{ image_tag }}"
+
+ - name: Push second image with same name
+ docker_image_push:
+ name: "{{ image_name_base }}:{{ image_tag }}"
+ register: push_3
+
+ - assert:
+ that:
+ - push_1 is changed
+ - push_1.image.Id == pulled_images.results[0].image.Id
+ - push_2 is not changed
+ - push_2.image.Id == pulled_images.results[0].image.Id
+ - push_3 is changed
+ - push_3.image.Id == pulled_images.results[1].image.Id
+
+ - when: registry_frontend2_address != 'n/a'
+ block:
+ - name: Make sure we are logged out from registry
+ docker_login:
+ registry_url: "{{ registry_frontend2_address }}"
+ username: testuser
+ password: hunter2
+ state: absent
+
+ - name: Push image (unauthenticated)
+ docker_image_push:
+ name: "{{ image_name_base2 }}:{{ image_tag }}"
+ register: push_4
+ ignore_errors: true
+
+ - assert:
+ that:
+ - push_4 is failed
+ - push_4.msg == 'Error pushing image ' ~ image_name_base2 ~ ':' ~ image_tag ~ ': no basic auth credentials'
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/meta/main.yml
new file mode 100644
index 000000000..471ddd412
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/meta/main.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/tasks/main.yml
new file mode 100644
index 000000000..afa72da82
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/tasks/main.yml
@@ -0,0 +1,296 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- block:
+ - name: Pick image prefix
+ set_fact:
+ iname_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+
+ - name: Define image names
+ set_fact:
+ image: "{{ docker_test_image_hello_world }}"
+ image_id: "{{ docker_test_image_hello_world_image_id }}"
+ image_names:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+
+ - name: Remove image complete
+ docker_image_remove:
+ name: "{{ image_id }}"
+ force: true
+
+ - name: Remove tagged images
+ docker_image_remove:
+ name: "{{ item }}"
+ loop: "{{ image_names }}"
+
+ - name: Make sure image we work with is there
+ docker_image_pull:
+ name: "{{ image }}"
+ register: pulled_image
+ diff: true
+
+ - name: Remove tagged image (not there, check mode)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: remove_1_check
+ check_mode: true
+ diff: true
+
+ - name: Remove tagged image (not there)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: remove_1
+ diff: true
+
+ - name: Inspect image
+ docker_image_info:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: info_1
+
+ - assert:
+ that:
+ - remove_1_check is not changed
+ - remove_1_check.diff == remove_1.diff
+ - remove_1 is not changed
+ - remove_1.diff.before.exists is false
+ - remove_1.diff.after.exists is false
+ - remove_1.deleted | length == 0
+ - remove_1.untagged | length == 0
+ - remove_1_check.deleted == remove_1.deleted
+ - remove_1_check.untagged == remove_1.untagged
+ - info_1.images | length == 0
+
+ - name: Tag image 1
+ docker_image_tag:
+ name: "{{ image }}"
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+
+ - name: Remove tagged image (check mode)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: remove_2_check
+ check_mode: true
+ diff: true
+
+ - name: Remove tagged image
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: remove_2
+ diff: true
+
+ - name: Inspect image
+ docker_image_info:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: info_2
+
+ - assert:
+ that:
+ - remove_2_check is changed
+ - remove_2_check.diff == remove_2.diff
+ - remove_2 is changed
+ - remove_2.diff.before.id == pulled_image.image.Id
+ - remove_2.diff.before.tags | length == 4
+ - remove_2.diff.before.digests | length == 1
+ - remove_2.diff.after.id == pulled_image.image.Id
+ - remove_2.diff.after.tags | length == 3
+ - remove_2.diff.after.digests | length == 1
+ - remove_2.deleted | length == 0
+ - remove_2.untagged | length == 1
+ - remove_2.untagged[0] == iname_prefix ~ '-tagged-1:latest'
+ - remove_2_check.deleted == remove_2.deleted
+ - remove_2_check.untagged == remove_2.untagged
+ - info_2.images | length == 0
+
+ - name: Remove tagged image (idempotent, check mode)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: remove_3_check
+ check_mode: true
+ diff: true
+
+ - name: Remove tagged image (idempotent)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:latest"
+ register: remove_3
+ diff: true
+
+ - assert:
+ that:
+ - remove_3_check is not changed
+ - remove_3_check.diff == remove_3.diff
+ - remove_3 is not changed
+ - remove_3.diff.before.exists is false
+ - remove_3.diff.after.exists is false
+ - remove_3.deleted | length == 0
+ - remove_3.untagged | length == 0
+ - remove_3_check.deleted == remove_3.deleted
+ - remove_3_check.untagged == remove_3.untagged
+
+ - name: Inspect image with tag foo and bar
+ docker_image_info:
+ name:
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: info_3
+
+ - name: Remove tagged image (force, check mode)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:foo"
+ force: true
+ register: remove_4_check
+ check_mode: true
+ diff: true
+
+ - name: Remove tagged image (force)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:foo"
+ force: true
+ register: remove_4
+ diff: true
+
+ - name: Inspect image with tag foo and bar
+ docker_image_info:
+ name:
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: info_4
+
+ - assert:
+ that:
+ - remove_4_check is changed
+ - remove_4_check.diff == remove_4.diff
+ - remove_4 is changed
+ - remove_4.diff.before.id == pulled_image.image.Id
+ - remove_4.diff.before.tags | length == 3
+ - remove_4.diff.before.digests | length == 1
+ - remove_4.diff.after.id == pulled_image.image.Id
+ - remove_4.diff.after.tags | length == 2
+ - remove_4.diff.after.digests | length == 1
+ - remove_4.deleted | length == 0
+ - remove_4.untagged | length == 1
+ - remove_4.untagged[0] == iname_prefix ~ '-tagged-1:foo'
+ - remove_4_check.deleted == remove_4.deleted
+ - remove_4_check.untagged == remove_4.untagged
+ - info_3.images | length == 2
+ - info_3.images[0].Id == pulled_image.image.Id
+ - info_3.images[1].Id == pulled_image.image.Id
+ - info_4.images | length == 1
+ - info_4.images[0].Id == pulled_image.image.Id
+
+ - name: Remove image ID (force, idempotent, check mode)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:foo"
+ force: true
+ register: remove_5_check
+ check_mode: true
+ diff: true
+
+ - name: Remove image ID (force, idempotent)
+ docker_image_remove:
+ name: "{{ iname_prefix }}-tagged-1:foo"
+ force: true
+ register: remove_5
+ diff: true
+
+ - assert:
+ that:
+ - remove_5_check is not changed
+ - remove_5_check.diff == remove_5.diff
+ - remove_5 is not changed
+ - remove_5.diff.before.exists is false
+ - remove_5.diff.after.exists is false
+ - remove_5.deleted | length == 0
+ - remove_5.untagged | length == 0
+ - remove_5_check.deleted == remove_5.deleted
+ - remove_5_check.untagged == remove_5.untagged
+
+ - name: Remove image ID (force, check mode)
+ docker_image_remove:
+ name: "{{ pulled_image.image.Id }}"
+ force: true
+ register: remove_6_check
+ check_mode: true
+ diff: true
+
+ - name: Remove image ID (force)
+ docker_image_remove:
+ name: "{{ pulled_image.image.Id }}"
+ force: true
+ register: remove_6
+ diff: true
+
+ - name: Inspect image with tag foo and bar
+ docker_image_info:
+ name:
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: info_5
+
+ - assert:
+ that:
+ - remove_6_check is changed
+ - remove_6_check.diff == remove_6.diff
+ - remove_6 is changed
+ - remove_6.diff.before.id == pulled_image.image.Id
+ - remove_6.diff.before.tags | length == 2
+ - remove_6.diff.before.digests | length == 1
+ - remove_6.diff.after.exists is false
+ - remove_6.deleted | length > 1
+ - pulled_image.image.Id in remove_6.deleted
+ - remove_6.untagged | length == 3
+ - (iname_prefix ~ '-tagged-1:bar') in remove_6.untagged
+ - image in remove_6.untagged
+ - remove_6_check.deleted | length == 1
+ - remove_6_check.deleted[0] == pulled_image.image.Id
+ - remove_6_check.untagged == remove_6.untagged
+ - info_5.images | length == 0
+
+ - name: Remove image ID (force, idempotent, check mode)
+ docker_image_remove:
+ name: "{{ pulled_image.image.Id }}"
+ force: true
+ register: remove_7_check
+ check_mode: true
+ diff: true
+
+ - name: Remove image ID (force, idempotent)
+ docker_image_remove:
+ name: "{{ pulled_image.image.Id }}"
+ force: true
+ register: remove_7
+ diff: true
+
+ - assert:
+ that:
+ - remove_7_check is not changed
+ - remove_7_check.diff == remove_7.diff
+ - remove_7 is not changed
+ - remove_7.diff.before.exists is false
+ - remove_7.diff.after.exists is false
+ - remove_7.deleted | length == 0
+ - remove_7.untagged | length == 0
+ - remove_7_check.deleted == remove_7.deleted
+ - remove_7_check.untagged == remove_7.untagged
+
+ always:
+ - name: Remove tagged images
+ docker_image_remove:
+ name: "{{ item }}"
+ loop: "{{ image_names }}"
+
+ when: docker_api_version is version('1.25', '>=')
+
+- fail: msg="Too old docker / docker-py version to run docker_image_info tests!"
+ when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/aliases b/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/aliases
new file mode 100644
index 000000000..2e1acc0ad
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+azp/4
+destructive
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/meta/main.yml
new file mode 100644
index 000000000..471ddd412
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/meta/main.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/tasks/main.yml
new file mode 100644
index 000000000..327917485
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/tasks/main.yml
@@ -0,0 +1,402 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- block:
+ - name: Pick image prefix
+ set_fact:
+ iname_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
+
+ - name: Define image names
+ set_fact:
+ image_1: "{{ docker_test_image_hello_world }}"
+ image_2: "{{ docker_test_image_alpine }}"
+ image_3: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}"
+ image_names:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ - "{{ iname_prefix }}-tagged-2:baz"
+
+ - name: Make sure images we work with are there
+ docker_image_pull:
+ name: "{{ item }}"
+ loop:
+ - "{{ image_1 }}"
+ - "{{ image_2 }}"
+ - "{{ image_3 }}"
+ register: pulled_images
+ diff: true
+
+ - name: Remove tagged images
+ docker_image_remove:
+ name: "{{ item }}"
+ loop: "{{ image_names }}"
+
+ - name: Tag image 1 (check mode)
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ register: tag_1_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 1
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ register: tag_1
+ diff: true
+
+ - name: Fetch image infos
+ docker_image_info:
+ name: "{{ image_names }}"
+ register: info_1
+
+ - assert:
+ that:
+ - tag_1 is changed
+ - tag_1.diff.before.images | length == 2
+ - tag_1.diff.before.images[0] != tag_1.diff.after.images[0]
+ - tag_1.diff.before.images[1] != tag_1.diff.after.images[1]
+ - tag_1.diff.before.images[0].exists is false
+ - tag_1.diff.before.images[1].exists is false
+ - tag_1.diff.after.images[0].id == pulled_images.results[0].image.Id
+ - tag_1.diff.after.images[1].id == pulled_images.results[0].image.Id
+ - info_1.images | length == 2
+ - info_1.images[0].Id == pulled_images.results[0].image.Id
+ - info_1.images[1].Id == pulled_images.results[0].image.Id
+ - tag_1_check == tag_1
+
+ - name: Tag image 1 (idempotent, check mode)
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ register: tag_2_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 1 (idempotent)
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ register: tag_2
+ diff: true
+
+ - assert:
+ that:
+ - tag_2 is not changed
+ - tag_2.diff.before == tag_2.diff.after
+ - tag_2.diff.before.images | length == 2
+ - tag_2_check == tag_2
+
+ - name: Tag image 1 (idempotent, different input format, check mode)
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ tag: foo
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1"
+ register: tag_3_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 1 (idempotent, different input format)
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ tag: foo
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1"
+ register: tag_3
+ diff: true
+
+ - assert:
+ that:
+ - tag_3 is not changed
+ - tag_3.diff.before == tag_3.diff.after
+ - tag_3.diff.before.images | length == 2
+ - tag_3_check == tag_3
+
+ - name: Tag image 1 (one more, check mode)
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-2:baz"
+ register: tag_4_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 1 (one more)
+ docker_image_tag:
+ name: "{{ image_1 }}"
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-2:baz"
+ register: tag_4
+ diff: true
+
+ - name: Fetch image infos
+ docker_image_info:
+ name: "{{ image_names }}"
+ register: info_4
+
+ - assert:
+ that:
+ - tag_4 is changed
+ - tag_4.diff.before.images | length == 3
+ - tag_4.diff.before.images[0] == tag_4.diff.after.images[0]
+ - tag_4.diff.before.images[1] == tag_4.diff.after.images[1]
+ - tag_4.diff.before.images[2] != tag_4.diff.after.images[2]
+ - tag_4.diff.before.images[2].exists is false
+ - tag_4.diff.after.images[0].id == pulled_images.results[0].image.Id
+ - tag_4.diff.after.images[1].id == pulled_images.results[0].image.Id
+ - tag_4.diff.after.images[2].id == pulled_images.results[0].image.Id
+ - info_4.images | length == 3
+ - info_4.images[0].Id == pulled_images.results[0].image.Id
+ - info_4.images[1].Id == pulled_images.results[0].image.Id
+ - info_4.images[2].Id == pulled_images.results[0].image.Id
+ - tag_4_check == tag_4
+
+ - name: Tag image 2 (only change missing one, check mode)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: keep
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_5_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 2 (only change missing one)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: keep
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_5
+ diff: true
+
+ - name: Fetch image infos
+ docker_image_info:
+ name: "{{ image_names }}"
+ register: info_5
+
+ - assert:
+ that:
+ - tag_5 is changed
+ - tag_5.diff.before.images | length == 3
+ - tag_5.diff.before.images[0] == tag_5.diff.after.images[0]
+ - tag_5.diff.before.images[1] == tag_5.diff.after.images[1]
+ - tag_5.diff.before.images[2] != tag_5.diff.after.images[2]
+ - tag_5.diff.before.images[2].exists is false
+ - tag_5.diff.after.images[0].id == pulled_images.results[0].image.Id
+ - tag_5.diff.after.images[1].id == pulled_images.results[0].image.Id
+ - tag_5.diff.after.images[2].id == pulled_images.results[1].image.Id
+ - info_5.images | length == 4
+ - info_5.images[0].Id == pulled_images.results[0].image.Id
+ - info_5.images[1].Id == pulled_images.results[0].image.Id
+ - info_5.images[2].Id == pulled_images.results[1].image.Id
+ - info_5.images[3].Id == pulled_images.results[0].image.Id
+ - tag_5_check == tag_5
+
+ - name: Tag image 2 (idempotent, check mode)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: keep
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_6_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 2 (idempotent)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: keep
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_6
+ diff: true
+
+ - assert:
+ that:
+ - tag_6 is not changed
+ - tag_6.diff.before == tag_6.diff.after
+ - tag_6.diff.before.images | length == 3
+ - tag_6_check == tag_6
+
+ - name: Tag image 2 (only change wrong ones, check mode)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: overwrite
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_7_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 2 (only change wrong ones)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: overwrite
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_7
+ diff: true
+
+ - name: Fetch image infos
+ docker_image_info:
+ name: "{{ image_names }}"
+ register: info_7
+
+ - assert:
+ that:
+ - tag_7 is changed
+ - tag_7.diff.before.images | length == 3
+ - tag_7.diff.before.images[0] != tag_7.diff.after.images[0]
+ - tag_7.diff.before.images[1] != tag_7.diff.after.images[1]
+ - tag_7.diff.before.images[2] == tag_7.diff.after.images[2]
+ - tag_7.diff.before.images[0].id == pulled_images.results[0].image.Id
+ - tag_7.diff.before.images[1].id == pulled_images.results[0].image.Id
+ - tag_7.diff.after.images[0].id == pulled_images.results[1].image.Id
+ - tag_7.diff.after.images[1].id == pulled_images.results[1].image.Id
+ - tag_7.diff.after.images[2].id == pulled_images.results[1].image.Id
+ - info_7.images | length == 4
+ - info_7.images[0].Id == pulled_images.results[1].image.Id
+ - info_7.images[1].Id == pulled_images.results[1].image.Id
+ - info_7.images[2].Id == pulled_images.results[1].image.Id
+ - info_7.images[3].Id == pulled_images.results[0].image.Id
+ - tag_7_check == tag_7
+
+ - name: Tag image 2 (idempotent, check mode)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: overwrite
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_8_check
+ diff: true
+ check_mode: true
+
+ - name: Tag image 2 (idempotent)
+ docker_image_tag:
+ name: "{{ image_2 }}"
+ existing_images: overwrite
+ repository:
+ - "{{ iname_prefix }}-tagged-1:latest"
+ - "{{ iname_prefix }}-tagged-1:foo"
+ - "{{ iname_prefix }}-tagged-1:bar"
+ register: tag_8
+ diff: true
+
+ - assert:
+ that:
+ - tag_8 is not changed
+ - tag_8.diff.before == tag_8.diff.after
+ - tag_8.diff.before.images | length == 3
+ - tag_8_check == tag_8
+
+ - name: Tag image 3 (source image has digest)
+ docker_image_tag:
+ name: "{{ image_3 }}"
+ existing_images: overwrite
+ repository:
+ - "{{ iname_prefix }}-tagged-2:baz"
+ register: tag_9
+ diff: true
+
+ - assert:
+ that:
+ - tag_9 is changed
+ - tag_9.diff.before.images | length == 1
+ - tag_9.diff.before.images[0].id == pulled_images.results[0].image.Id
+ - tag_9.diff.after.images[0].id == pulled_images.results[2].image.Id
+
+ - name: Tag image 3 (source image is ID)
+ docker_image_tag:
+ name: "{{ pulled_images.results[2].image.Id }}"
+ existing_images: overwrite
+ repository:
+ - "{{ iname_prefix }}-tagged-1:foo"
+ register: tag_10
+ diff: true
+
+ - assert:
+ that:
+ - tag_10 is changed
+ - tag_10.diff.before.images | length == 1
+ - tag_10.diff.before.images[0].id == pulled_images.results[1].image.Id
+ - tag_10.diff.after.images[0].id == pulled_images.results[2].image.Id
+
+ - name: Tag image 3 (fail because of digest)
+ docker_image_tag:
+ name: "{{ image_3 }}"
+ existing_images: overwrite
+ repository:
+ - "{{ iname_prefix }}-tagged-2@sha256:{{ docker_test_image_digest_v1 }}"
+ register: tag_11
+ ignore_errors: true
+
+ - assert:
+ that:
+ - tag_11 is failed
+ - >-
+ tag_11.msg == 'repository[1] must not have a digest; got: ' ~ iname_prefix ~ '-tagged-2@sha256:' ~ docker_test_image_digest_v1
+
+ - name: Tag image 3 (fail because of image ID)
+ docker_image_tag:
+ name: "{{ image_3 }}"
+ existing_images: overwrite
+ repository:
+ - "sha256:{{ docker_test_image_digest_v1 }}"
+ register: tag_12
+ ignore_errors: true
+
+ - assert:
+ that:
+ - tag_12 is failed
+ - >-
+ tag_12.msg == 'repository[1] must not be an image ID; got: sha256:' ~ docker_test_image_digest_v1
+
+ always:
+ - name: Remove tagged images
+ docker_image_remove:
+ name: "{{ item }}"
+ loop: "{{ image_names }}"
+
+ when: docker_api_version is version('1.25', '>=')
+
+- fail: msg="Too old docker / docker-py version to run docker_image_info tests!"
+ when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml
index 3133a0360..ff316450e 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker_registry
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml
index bd99acc0a..b56fe799f 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml
@@ -4,9 +4,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
when: docker_api_version is version('1.25', '>=')
- fail: msg="Too old docker / docker-py version to run docker_image tests!"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml
index 5769ff1cb..44bdbe8d5 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml
@@ -5,3 +5,5 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
+ - setup_docker_sdk_for_python # for Swarm support
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml
index 4a056151b..d2f7f0258 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml
@@ -28,23 +28,25 @@
msg: "Using name prefix {{ name_prefix }}"
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure all containers are removed"
- docker_container:
- name: "{{ item }}"
- state: absent
- force_kill: true
- loop: "{{ cnames }}"
- - name: "Make sure all networks are removed"
- docker_network:
- name: "{{ item }}"
- state: absent
- force: true
- loop: "{{ dnetworks }}"
+ - name: "Make sure all containers are removed"
+ docker_container:
+ name: "{{ item }}"
+ state: absent
+ force_kill: true
+ loop: "{{ cnames }}"
+ - name: "Make sure all networks are removed"
+ docker_network:
+ name: "{{ item }}"
+ state: absent
+ force: true
+ loop: "{{ dnetworks }}"
when: docker_api_version is version('1.25', '>=') # FIXME: find out API version!
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml
index 5769ff1cb..6407d95b0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml b/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml
index 89c9b3555..c326fc9f3 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml
@@ -697,7 +697,7 @@
- label6
- label7
check_mode: true
- register: output_add_del_overlap_lables_1
+ register: output_add_del_overlap_labels_1
- name: Try to add or update and remove overlapping labels at the same time
docker_node:
@@ -708,7 +708,7 @@
labels_to_remove:
- label6
- label7
- register: output_add_del_overlap_lables_2
+ register: output_add_del_overlap_labels_2
- name: Try to add or update and remove overlapping labels at the same time (idempotent)
docker_node:
@@ -719,7 +719,7 @@
labels_to_remove:
- label6
- label7
- register: output_add_del_overlap_lables_3
+ register: output_add_del_overlap_labels_3
- name: Try to add or update and remove overlapping labels at the same time (idempotent check)
docker_node:
@@ -731,19 +731,19 @@
- label6
- label7
check_mode: true
- register: output_add_del_overlap_lables_4
+ register: output_add_del_overlap_labels_4
- name: assert adding or updating and removing overlapping labels from swarm node
assert:
that:
- - 'output_add_del_overlap_lables_1 is changed'
- - 'output_add_del_overlap_lables_2 is changed'
- - 'output_add_del_overlap_lables_3 is not changed'
- - 'output_add_del_overlap_lables_4 is not changed'
- - 'output_add_del_overlap_lables_2.node.Spec.Labels | length == 3'
- - '"label7" not in output_add_del_overlap_lables_2.node.Spec.Labels'
- - 'output_add_del_overlap_lables_2.node.Spec.Labels.label6 == "value6666"'
- - 'output_add_del_overlap_lables_2.node.Spec.Labels.label22 == "value22"'
+ - 'output_add_del_overlap_labels_1 is changed'
+ - 'output_add_del_overlap_labels_2 is changed'
+ - 'output_add_del_overlap_labels_3 is not changed'
+ - 'output_add_del_overlap_labels_4 is not changed'
+ - 'output_add_del_overlap_labels_2.node.Spec.Labels | length == 3'
+ - '"label7" not in output_add_del_overlap_labels_2.node.Spec.Labels'
+ - 'output_add_del_overlap_labels_2.node.Spec.Labels.label6 == "value6666"'
+ - 'output_add_del_overlap_labels_2.node.Spec.Labels.label22 == "value22"'
####################################################################
## Replace labels #############################################
@@ -828,7 +828,7 @@
check_mode: true
register: output_remove_labels_4
- - name: assert removing all lables from swarm node
+ - name: assert removing all labels from swarm node
assert:
that:
- 'output_remove_labels_1 is changed'
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml
index 5769ff1cb..6407d95b0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml
index 5769ff1cb..6407d95b0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml
index 142614332..8684ca117 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml
@@ -17,16 +17,18 @@
register: dev_fuse_stat
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure plugin is removed"
- docker_plugin:
- plugin_name: "{{ item }}"
- state: absent
- with_items: "{{ plugin_names }}"
+ - name: "Make sure plugin is removed"
+ docker_plugin:
+ plugin_name: "{{ item }}"
+ state: absent
+ with_items: "{{ plugin_names }}"
when: docker_api_version is version('1.25', '>=') and dev_fuse_stat.stat.exists
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml
index 2650229d8..9eeb6626b 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml
@@ -5,4 +5,5 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml b/ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml
index 58d6d5bb9..cca26c802 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml
@@ -18,7 +18,7 @@
assert:
that:
- 'output is failed'
- - '"Error running docker stack" in output.msg'
+ - '"Error response from daemon: This node is not a swarm manager" in output.msg'
- name: Create a swarm cluster
docker_swarm:
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml b/ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml
index 30b5ca9e8..cb905d5cf 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml
@@ -18,7 +18,7 @@
assert:
that:
- 'output is failed'
- - '"Error running docker stack" in output.msg'
+ - '"Error response from daemon: This node is not a swarm manager" in output.msg'
- name: Create a swarm cluster
docker_swarm:
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml
index e7ff3d68b..13f97ae20 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml
@@ -5,5 +5,6 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
- setup_openssl
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml
index 16f681530..f2b90167c 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml
@@ -14,9 +14,11 @@
- docker_api_version is version('1.25', '>=')
block:
- - include_tasks: "{{ item }}"
+ - include_tasks: run-test.yml
with_fileglob:
- - 'tests/*.yml'
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- import_tasks: cleanup.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml
index f55df21f8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml
@@ -2,3 +2,6 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml
index 5769ff1cb..6407d95b0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml
index 288e2a0b0..a2cd5f8f9 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml
@@ -14,7 +14,7 @@
ignore_errors: true
register: output
- - name: assert failure when called when swarm is not in use or not run on mamager node
+ - name: assert failure when called when swarm is not in use or not run on manager node
assert:
that:
- 'output is failed'
@@ -58,7 +58,7 @@
nodes: true
register: output
- - name: assert reding swarm facts with list of nodes option
+ - name: assert reading swarm facts with list of nodes option
assert:
that:
- 'output.swarm_facts.JoinTokens.Manager'
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml
index 5769ff1cb..6407d95b0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml
index 5a5795b5f..bbea0a031 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml
@@ -24,14 +24,16 @@
# Run the tests
- block:
- - name: Create a Swarm cluster
- docker_swarm:
- state: present
- advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
+ - name: Create a Swarm cluster
+ docker_swarm:
+ state: present
+ advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- name: Make sure all services are removed
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml
index 5769ff1cb..6407d95b0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml
index b356e5618..055898402 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml
@@ -17,16 +17,18 @@
msg: "Using name prefix {{ name_prefix }}"
- block:
- - include_tasks: run-test.yml
- with_fileglob:
- - "tests/*.yml"
+ - include_tasks: run-test.yml
+ with_fileglob:
+ - "tests/*.yml"
+ loop_control:
+ loop_var: test_name
always:
- - name: "Make sure all volumes are removed"
- docker_volume:
- name: "{{ item }}"
- state: absent
- with_items: "{{ vnames }}"
+ - name: "Make sure all volumes are removed"
+ docker_volume:
+ name: "{{ item }}"
+ state: absent
+ with_items: "{{ vnames }}"
when: docker_api_version is version('1.25', '>=')
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml b/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml
index 65853ddd8..72a58962d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml
@@ -3,5 +3,5 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: "Loading tasks from {{ item }}"
- include_tasks: "{{ item }}"
+- name: "Loading tasks from {{ test_name }}"
+ include_tasks: "{{ test_name }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml
index e7ff3d68b..7440275b2 100644
--- a/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml
@@ -5,5 +5,7 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
+ - setup_docker_current_container_network_ip
- setup_openssl
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/vars/main.yml b/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/vars/main.yml
index e4eafc24e..1859bdfe6 100644
--- a/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/vars/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/vars/main.yml
@@ -4,10 +4,14 @@
# SPDX-License-Identifier: GPL-3.0-or-later
docker_test_image_digest_v1: e004c2cc521c95383aebb1fb5893719aa7a8eae2e7a71f316a4410784edb00a9
+docker_test_image_digest_v1_image_id: 758ec7f3a1ee85f8f08399b55641bfb13e8c1109287ddc5e22b68c3d653152ee
docker_test_image_digest_v2: ee44b399df993016003bf5466bd3eeb221305e9d0fa831606bc7902d149c775b
+docker_test_image_digest_v2_image_id: dc3bacd8b5ea796cea5d6070c8f145df9076f26a6bc1c8981fd5b176d37de843
docker_test_image_digest_base: quay.io/ansible/docker-test-containers
docker_test_image_hello_world: quay.io/ansible/docker-test-containers:hello-world
+docker_test_image_hello_world_image_id: sha256:bf756fb1ae65adf866bd8c456593cd24beb6a0a061dedf42b26a993176745f6b
docker_test_image_hello_world_base: quay.io/ansible/docker-test-containers
+docker_test_image_hello_world_platform: docker.io/library/hello-world:latest
docker_test_image_busybox: quay.io/ansible/docker-test-containers:busybox
docker_test_image_alpine: quay.io/ansible/docker-test-containers:alpine3.8
docker_test_image_alpine_different: quay.io/ansible/docker-test-containers:alpine3.7
diff --git a/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml
index 6fdc1c8ec..ee4a358cb 100644
--- a/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml
@@ -6,3 +6,4 @@
dependencies:
- setup_docker
- setup_paramiko
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml
index 94554f716..8bfa52511 100644
--- a/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml
@@ -68,7 +68,6 @@
docker_host: "ssh://root@localhost"
use_ssh_client: true
register: output
- ignore_errors: true
- name: Make sure we got information
assert:
@@ -80,11 +79,3 @@
- 'output.volumes is not defined'
- 'output.images is not defined'
- 'output.disk_usage is not defined'
- when: docker_py_version is version('4.4.0', '>=')
-
-- name: Make sure we got information
- assert:
- that:
- - output is failed
- - "'use_ssh_client=True requires Docker SDK for Python 4.4.0 or newer' in output.msg"
- when: docker_py_version is version('4.4.0', '<')
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml
index 5769ff1cb..471ddd412 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml
index 6f2a3b6c5..9a01aa289 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml
@@ -15,12 +15,3 @@
loop:
- ansible-docker-test-docker-inventory-container-1
- ansible-docker-test-docker-inventory-container-2
-
- - name: remove docker pagkages
- action: "{{ ansible_facts.pkg_mgr }}"
- args:
- name:
- - docker
- - docker-ce
- - docker-ce-cli
- state: absent
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml
index 0c1f33685..72507e414 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml
@@ -13,6 +13,10 @@
import_role:
name: setup_docker
+ - name: Setup Docker Python deps
+ import_role:
+ name: setup_docker_python_deps
+
- name: Start containers
docker_container:
name: "{{ item.name }}"
@@ -21,6 +25,8 @@
command: '/bin/sh -c "sleep 10m"'
published_ports:
- 22/tcp
+ labels:
+ foo: !unsafe 'EVALU{{ "" }}ATED'
loop:
- name: ansible-docker-test-docker-inventory-container-1
- name: ansible-docker-test-docker-inventory-container-2
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml
index c0f28f57d..976b25b21 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml
@@ -25,7 +25,6 @@
# will be other containers.
- inventory_hostname.startswith('ansible-docker-test-docker-inventory-container-')
block:
-
- name: Run raw command
raw: ls /
register: output
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml
index 28f8dc008..71346bfa1 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml
@@ -47,3 +47,13 @@
# When the integration tests are run inside a docker container, there
# will be other containers.
- inventory_hostname.startswith('ansible-docker-test-docker-inventory-container-')
+ - name: Write labels into file
+ copy:
+ dest: "/tmp/{{ inventory_hostname }}-labels.txt"
+ content: |-
+ {{ docker_config.Labels }}
+ delegate_to: localhost
+ when:
+ # When the integration tests are run inside a docker container, there
+ # will be other containers.
+ - inventory_hostname.startswith('ansible-docker-test-docker-inventory-container-')
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh
index acc1d5f45..318275d99 100755
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh
@@ -9,17 +9,23 @@ set -euo pipefail
cleanup() {
echo "Cleanup"
- ansible-playbook playbooks/docker_cleanup.yml
+ ansible-playbook playbooks/docker_cleanup.yml "$@"
echo "Done"
}
trap cleanup INT TERM EXIT
echo "Setup"
-ANSIBLE_ROLES_PATH=.. ansible-playbook playbooks/docker_setup.yml
+ANSIBLE_ROLES_PATH=.. ansible-playbook playbooks/docker_setup.yml "$@"
echo "Test docker_containers inventory 1"
-ansible-playbook -i inventory_1.docker.yml playbooks/test_inventory_1.yml
+ansible-playbook -i inventory_1.docker.yml playbooks/test_inventory_1.yml "$@"
echo "Test docker_containers inventory 2"
-ansible-playbook -i inventory_2.docker.yml playbooks/test_inventory_2.yml
+rm -f /tmp/ansible-docker-test-docker-inventory-container-*-labels.txt
+ansible-playbook -i inventory_2.docker.yml playbooks/test_inventory_2.yml "$@"
+
+echo "Validate that 'EVALUATED' does not appear in the labels"
+for FILENAME in /tmp/ansible-docker-test-docker-inventory-container-*-labels.txt; do
+ grep -qv EVALUATED "${FILENAME}" || ( echo "${FILENAME} contains EVALUATED!" && exit 1 )
+done
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml
index 3c6c1367c..aacaf67bf 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml
@@ -10,6 +10,10 @@
include_role:
name: setup_docker
+ - name: Setup Docker Python deps
+ import_role:
+ name: setup_docker_python_deps
+
# There seems to be no better way to install docker-machine. At least I couldn't find any packages for RHEL7/8.
- name: Download docker-machine binary
vars:
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh
index b39a08c41..5d00aa666 100755
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh
@@ -23,14 +23,14 @@ SAVED_PATH="$PATH"
cleanup() {
PATH="${SAVED_PATH}"
echo "Cleanup"
- ansible-playbook -i teardown.docker_machine.yml playbooks/teardown.yml
+ ansible-playbook -i teardown.docker_machine.yml playbooks/teardown.yml "$@"
echo "Done"
}
trap cleanup INT TERM EXIT
echo "Pre-setup (install docker, docker-machine)"
-ANSIBLE_ROLES_PATH=.. ansible-playbook playbooks/pre-setup.yml
+ANSIBLE_ROLES_PATH=.. ansible-playbook playbooks/pre-setup.yml "$@"
echo "Print docker-machine version"
docker-machine --version
@@ -43,10 +43,10 @@ echo "Test that the docker_machine inventory plugin is being loaded"
ANSIBLE_DEBUG=yes ansible-inventory -i inventory_1.docker_machine.yml --list | grep -F "Loading InventoryModule 'docker_machine'"
echo "Setup"
-ansible-playbook playbooks/setup.yml
+ansible-playbook playbooks/setup.yml "$@"
echo "Test docker_machine inventory 1"
-ansible-playbook -i inventory_1.docker_machine.yml playbooks/test_inventory_1.yml
+ansible-playbook -i inventory_1.docker_machine.yml playbooks/test_inventory_1.yml "$@"
echo "Activate Docker Machine mock"
PATH=${SCRIPT_DIR}:$PATH
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml
index 5769ff1cb..6407d95b0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml
@@ -5,3 +5,4 @@
dependencies:
- setup_docker
+ - setup_docker_sdk_for_python
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml
index 4039a6bde..a6bedd41a 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml
@@ -11,12 +11,3 @@
docker_swarm:
state: absent
force: true
-
- - name: remove docker pagkages
- action: "{{ ansible_facts.pkg_mgr }}"
- args:
- name:
- - docker
- - docker-ce
- - docker-ce-cli
- state: absent
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml
index 1ae4c63fe..9dd43dd2e 100644
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml
@@ -13,6 +13,10 @@
import_role:
name: setup_docker
+ - name: Setup Docker SDK for Python
+ import_role:
+ name: setup_docker_sdk_for_python
+
- name: Create a Swarm cluster
community.docker.docker_swarm:
state: present
diff --git a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh
index 746b8592f..1759b888b 100755
--- a/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh
+++ b/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh
@@ -9,17 +9,17 @@ set -euo pipefail
cleanup() {
echo "Cleanup"
- ansible-playbook playbooks/swarm_cleanup.yml
+ ansible-playbook playbooks/swarm_cleanup.yml "$@"
echo "Done"
}
trap cleanup INT TERM EXIT
echo "Setup"
-ANSIBLE_ROLES_PATH=.. ansible-playbook playbooks/swarm_setup.yml
+ANSIBLE_ROLES_PATH=.. ansible-playbook playbooks/swarm_setup.yml "$@"
echo "Test docker_swarm inventory 1"
-ansible-playbook -i inventory_1.docker_swarm.yml playbooks/test_inventory_1.yml
+ansible-playbook -i inventory_1.docker_swarm.yml playbooks/test_inventory_1.yml "$@"
echo "Test docker_swarm inventory 2"
-ansible-playbook -i inventory_2.docker_swarm.yml playbooks/test_inventory_2.yml
+ansible-playbook -i inventory_2.docker_swarm.yml playbooks/test_inventory_2.yml "$@"
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml
index 0509fe0ef..412fc5644 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml
@@ -5,7 +5,6 @@
docker_cli_version: '0.0'
docker_api_version: '0.0'
-docker_py_version: '0.0'
docker_skip_cleanup: true
docker_prereq_packages: []
docker_packages:
@@ -13,10 +12,6 @@ docker_packages:
docker_cli_packages:
- docker-ce-cli
-docker_pip_extra_packages: []
-docker_pip_package: docker
-docker_pip_package_limit: ''
-
docker_cleanup_packages:
- docker
- docker-ce
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml
index 96ca226c7..ec68f655c 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml
@@ -3,13 +3,6 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-- name: Remove pip packages
- pip:
- state: present
- name: "{{ [docker_pip_package] | union(docker_pip_extra_packages) }}"
- listen: cleanup docker
- when: not docker_skip_cleanup | bool
-
- name: Remove docker pagkages
action: "{{ ansible_facts.pkg_mgr }}"
args:
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml
index 64f6eb34a..cb07fbf78 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml
@@ -5,6 +5,7 @@
- name: Install docker
apk:
- name: docker
+ name:
+ - docker
update_cache: true
notify: cleanup docker
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml
index e8f078d3b..e3d7c413f 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml
@@ -25,6 +25,14 @@
set_fact:
needs_docker_daemon: '{{ not ansible_module_running_in_container }}'
+ - name:
+ debug:
+ msg: |-
+ OS family: {{ ansible_facts.os_family }}
+ Distribution: {{ ansible_facts.distribution }}
+ Distribution major version: {{ ansible_facts.distribution_major_version }}
+ Distribution full version: {{ ansible_facts.distribution_version }}
+
- name: Include distribution specific variables
include_vars: "{{ lookup('first_found', params) }}"
vars:
@@ -68,36 +76,18 @@
register: docker_api_version_stdout
ignore_errors: true
- - name: Limit docker pypi package version to < 4.3.0
- set_fact:
- docker_pip_package_limit: '<4.3.0'
- when: (docker_api_version_stdout.stdout | default('0.0')) is version('1.39', '<')
-
- - name: Install/upgrade Python requirements
- pip:
- name: "{{ [docker_pip_package ~ docker_pip_package_limit] + docker_pip_extra_packages }}"
- extra_args: "-c {{ remote_constraints }}"
- state: "{{ 'latest' if force_docker_sdk_for_python_pypi | default(false) else 'present' }}"
- notify: cleanup docker
-
# Detect docker CLI and docker-py versions
- name: Check Docker CLI version
command: "docker version -f {% raw %}'{{.Client.Version}}'{% endraw %}"
register: docker_cli_version_stdout
ignore_errors: true
- - name: Check docker-py version
- command: "{{ ansible_python.executable }} -c 'import docker; print(docker.__version__)'"
- register: docker_py_version_stdout
- ignore_errors: true
-
- set_fact:
docker_cli_version: "{{ docker_cli_version_stdout.stdout | default('0.0') }}"
docker_api_version: "{{ docker_api_version_stdout.stdout | default('0.0') }}"
- docker_py_version: "{{ docker_py_version_stdout.stdout | default('0.0') }}"
- debug:
- msg: "Docker CLI version: {{ docker_cli_version }}; Docker API version: {{ docker_api_version }}; docker-py library version: {{ docker_py_version }}"
+ msg: "Docker CLI version: {{ docker_cli_version }}; Docker API version: {{ docker_api_version }}"
- block:
# Cleanup docker daemon
@@ -162,13 +152,3 @@
images: "{{ docker_images.stdout_lines | default([]) }}"
when: docker_cli_version is version('0.0', '>')
-
- - name: Inspect current container
- docker_container_info:
- name: "{{ ansible_module_container_id }}"
- register: current_container_info
- when: ansible_module_running_in_container
-
- - name: Determine network name
- set_fact:
- current_container_network_ip: "{{ (current_container_info.container.NetworkSettings.Networks | dictsort)[0].0 | default('') if ansible_module_running_in_container else '' }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml
index b1e28987c..bbf9ed32c 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml
@@ -8,6 +8,3 @@ docker_prereq_packages:
- device-mapper-persistent-data
- lvm2
- libseccomp
-
-docker_pip_extra_packages:
- - requests==2.6.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml
index d7c82455b..f55df21f8 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml
@@ -2,9 +2,3 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-
-docker_pip_extra_packages:
- # Installing requests >=2.12.0 on Ubuntu 14.04 breaks certificate validation. We restrict to an older version
- # to ensure out get_url tests work out fine. This is only an issue if pyOpenSSL is also installed.
- # Not sure why RHEL7 needs this specific version
- - requests==2.6.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml
index e4eafc24e..1859bdfe6 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml
@@ -4,10 +4,14 @@
# SPDX-License-Identifier: GPL-3.0-or-later
docker_test_image_digest_v1: e004c2cc521c95383aebb1fb5893719aa7a8eae2e7a71f316a4410784edb00a9
+docker_test_image_digest_v1_image_id: 758ec7f3a1ee85f8f08399b55641bfb13e8c1109287ddc5e22b68c3d653152ee
docker_test_image_digest_v2: ee44b399df993016003bf5466bd3eeb221305e9d0fa831606bc7902d149c775b
+docker_test_image_digest_v2_image_id: dc3bacd8b5ea796cea5d6070c8f145df9076f26a6bc1c8981fd5b176d37de843
docker_test_image_digest_base: quay.io/ansible/docker-test-containers
docker_test_image_hello_world: quay.io/ansible/docker-test-containers:hello-world
+docker_test_image_hello_world_image_id: sha256:bf756fb1ae65adf866bd8c456593cd24beb6a0a061dedf42b26a993176745f6b
docker_test_image_hello_world_base: quay.io/ansible/docker-test-containers
+docker_test_image_hello_world_platform: docker.io/library/hello-world:latest
docker_test_image_busybox: quay.io/ansible/docker-test-containers:busybox
docker_test_image_alpine: quay.io/ansible/docker-test-containers:alpine3.8
docker_test_image_alpine_different: quay.io/ansible/docker-test-containers:alpine3.7
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/meta/main.yml
new file mode 100644
index 000000000..5769ff1cb
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/meta/main.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml
new file mode 100644
index 000000000..48d357a3b
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml
@@ -0,0 +1,13 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Buildx is available from Alpine 3.14 on
+ set_fact:
+ docker_has_buildx: "{{ ansible_facts.distribution_version is version('3.14', '>=') }}"
+
+- name: Install Docker buildx CLI plugin
+ apk:
+ name: docker-cli-buildx
+ when: docker_has_buildx
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml
new file mode 100644
index 000000000..5d2709017
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Install Docker buildx CLI plugin
+ community.general.pacman:
+ name: docker-buildx
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml
new file mode 100644
index 000000000..6bb81a941
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: For some reason we don't have the buildx plugin
+ set_fact:
+ docker_has_buildx: false
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml
new file mode 100644
index 000000000..fd667cc24
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml
@@ -0,0 +1,14 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Buildx is available in OpenSuSE 15.5, not sure which versions before
+ set_fact:
+ docker_has_buildx: "{{ ansible_facts.distribution_version is version('15.5', '>=') }}"
+
+- name: Install Docker buildx CLI plugin
+ community.general.zypper:
+ name: docker-buildx
+ disable_gpg_check: true
+ when: docker_has_buildx
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml
new file mode 100644
index 000000000..979ad2ba6
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml
@@ -0,0 +1,49 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- name: Setup Docker
+ when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ block:
+ - name:
+ debug:
+ msg: |-
+ OS family: {{ ansible_facts.os_family }}
+ Distribution: {{ ansible_facts.distribution }}
+ Distribution major version: {{ ansible_facts.distribution_major_version }}
+ Distribution full version: {{ ansible_facts.distribution_version }}
+
+ - name: Set facts for Docker features to defaults
+ set_fact:
+ docker_has_buildx: true
+
+ - name: Include distribution specific variables
+ include_vars: "{{ lookup('first_found', params) }}"
+ vars:
+ params:
+ files:
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.distribution }}.yml"
+ - "{{ ansible_facts.os_family }}.yml"
+ - default.yml
+ paths:
+ - "{{ role_path }}/vars"
+
+ - name: Include distribution specific tasks
+ include_tasks: "{{ lookup('first_found', params) }}"
+ vars:
+ params:
+ files:
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.distribution }}.yml"
+ - "{{ ansible_facts.os_family }}.yml"
+ paths:
+ - "{{ role_path }}/tasks"
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/default.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/vars/default.yml
index f55df21f8..f55df21f8 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/default.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/vars/default.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/meta/main.yml
new file mode 100644
index 000000000..5769ff1cb
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/meta/main.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml
new file mode 100644
index 000000000..7190dbad5
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml
@@ -0,0 +1,13 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Compose is available from Alpine 3.15 on
+ set_fact:
+ docker_has_compose: "{{ ansible_facts.distribution_version is version('3.15', '>=') }}"
+
+- name: Install Docker compose CLI plugin
+ apk:
+ name: docker-cli-compose
+ when: docker_has_compose
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml
new file mode 100644
index 000000000..89dedb0b2
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Install Docker compose CLI plugin
+ community.general.pacman:
+ name: docker-compose
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml
new file mode 100644
index 000000000..b4ece59ae
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: For some reason we don't have the buildx plugin
+ set_fact:
+ docker_has_compose: false
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml
new file mode 100644
index 000000000..5b80302bf
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml
@@ -0,0 +1,14 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Compose is available in OpenSuSE 15.5, not sure which versions before
+ set_fact:
+ docker_has_compose: "{{ ansible_facts.distribution_version is version('15.5', '>=') }}"
+
+- name: Install Docker compose CLI plugin
+ community.general.zypper:
+ name: docker-compose
+ disable_gpg_check: true
+ when: docker_has_compose
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/main.yml
new file mode 100644
index 000000000..7a971c229
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/main.yml
@@ -0,0 +1,65 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- name: Setup Docker
+ when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ block:
+ - name:
+ debug:
+ msg: |-
+ OS family: {{ ansible_facts.os_family }}
+ Distribution: {{ ansible_facts.distribution }}
+ Distribution major version: {{ ansible_facts.distribution_major_version }}
+ Distribution full version: {{ ansible_facts.distribution_version }}
+
+ - name: Set facts for Docker features to defaults
+ set_fact:
+ docker_has_compose: true
+ docker_compose_version: "0.0"
+
+ - name: Include distribution specific variables
+ include_vars: "{{ lookup('first_found', params) }}"
+ vars:
+ params:
+ files:
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.distribution }}.yml"
+ - "{{ ansible_facts.os_family }}.yml"
+ - default.yml
+ paths:
+ - "{{ role_path }}/vars"
+
+ - name: Include distribution specific tasks
+ include_tasks: "{{ lookup('first_found', params) }}"
+ vars:
+ params:
+ files:
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.distribution }}.yml"
+ - "{{ ansible_facts.os_family }}.yml"
+ paths:
+ - "{{ role_path }}/tasks"
+
+ - name: Obtain Docker Compose version
+ when: docker_has_compose
+ block:
+ - command:
+ cmd: docker info --format '{% raw %}{{ json .ClientInfo.Plugins }}{% endraw %}'
+ register: docker_cli_plugins_stdout
+ - set_fact:
+ docker_has_compose: >-
+ {{ docker_cli_plugins_stdout.stdout | from_json | selectattr('Name', 'eq', 'compose') | map(attribute='Version') | length > 0 }}
+ docker_compose_version: >-
+ {{ docker_cli_plugins_stdout.stdout | from_json | selectattr('Name', 'eq', 'compose') | map(attribute='Version') | first | default('0.0') | regex_replace('^v', '') }}
+
+ - debug:
+ msg: "Has Docker compoes plugin: {{ docker_has_compose }}; Docker compose plugin version: {{ docker_compose_version }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/nothing.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/nothing.yml
new file mode 100644
index 000000000..a93d788ac
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/nothing.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# nothing to do
+[]
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/vars/default.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/vars/default.yml
new file mode 100644
index 000000000..f55df21f8
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/vars/default.yml
@@ -0,0 +1,4 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/defaults/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/defaults/main.yml
deleted file mode 100644
index f701c90e3..000000000
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/defaults/main.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-# Copyright (c) Ansible Project
-# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-skip_docker_compose: false
-docker_compose_packages:
- - docker-compose
-docker_compose_pip_packages:
- - docker-compose
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/setup.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/setup.yml
deleted file mode 100644
index 08c68a89a..000000000
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/setup.yml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-# Copyright (c) Ansible Project
-# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-- name: Include distribution specific variables
- include_vars: "{{ lookup('first_found', params) }}"
- vars:
- params:
- files:
- - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
- - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
- - "{{ ansible_facts.distribution }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.os_family }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.distribution }}.yml"
- - "{{ ansible_facts.os_family }}.yml"
- - default.yml
- paths:
- - "{{ role_path }}/vars"
-
-- block:
- - name: Include distribution specific tasks
- include_tasks: "{{ lookup('first_found', params) }}"
- vars:
- params:
- files:
- - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
- - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
- - "{{ ansible_facts.distribution }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.os_family }}-py{{ ansible_python.version.major }}.yml"
- - "{{ ansible_facts.distribution }}.yml"
- - "{{ ansible_facts.os_family }}.yml"
- paths:
- - "{{ role_path }}/tasks"
-
- - name: Install docker-compose
- pip:
- state: present
- name: "{{ docker_compose_pip_packages }}"
- extra_args: "-c {{ remote_constraints }}"
-
- - name: Register docker-compose version
- command: "{{ ansible_python.executable }} -c 'import compose; print(compose.__version__)'"
- register: docker_compose_version
- ignore_errors: true
-
- - name: Declare docker-compose version
- set_fact:
- docker_compose_version: "{{ docker_compose_version.stdout | default('0.0.0') }}"
-
- - name: Declare docker-compose as existing
- set_fact:
- has_docker_compose: true
-
- when: not skip_docker_compose
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml
deleted file mode 100644
index c5d18002b..000000000
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-# Copyright (c) Ansible Project
-# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-skip_docker_compose: true
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/defaults/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/defaults/main.yml
new file mode 100644
index 000000000..0ebf5269f
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/defaults/main.yml
@@ -0,0 +1,15 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+skip_docker_compose: false
+
+docker_pip_extra_packages: []
+docker_pip_package: docker
+docker_pip_package_limit: '<7.0.0'
+
+docker_compose_packages:
+ - docker-compose
+docker_compose_pip_packages:
+ - docker-compose
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/meta/main.yml
index b6e985d7f..b6e985d7f 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/meta/main.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Alpine.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Alpine.yml
index 85042fdf0..85042fdf0 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Alpine.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Alpine.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Archlinux.yml
index 2e62ff052..2e62ff052 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Archlinux.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Debian.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Debian.yml
index 1729ccabe..1729ccabe 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Debian.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Debian.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Fedora.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Fedora.yml
index a5f3d467b..a5f3d467b 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Fedora.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Fedora.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-7.yml
index 62f0e3738..62f0e3738 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-7.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-7.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-8.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-8.yml
index 549868455..549868455 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-8.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-8.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-9.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-9.yml
index 549868455..549868455 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-9.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-9.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Suse.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml
index 46e50fd4d..46e50fd4d 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Suse.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/main.yml
index 630885104..630885104 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/main.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml
new file mode 100644
index 000000000..0db7293df
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml
@@ -0,0 +1,79 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+- name: Include distribution specific variables
+ include_vars: "{{ lookup('first_found', params) }}"
+ vars:
+ params:
+ files:
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.distribution }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.os_family }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.distribution }}.yml"
+ - "{{ ansible_facts.os_family }}.yml"
+ - default.yml
+ paths:
+ - "{{ role_path }}/vars"
+
+- block:
+ - name: Include distribution specific tasks
+ include_tasks: "{{ lookup('first_found', params) }}"
+ vars:
+ params:
+ files:
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.distribution }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.os_family }}-py{{ ansible_python.version.major }}.yml"
+ - "{{ ansible_facts.distribution }}.yml"
+ - "{{ ansible_facts.os_family }}.yml"
+ paths:
+ - "{{ role_path }}/tasks"
+
+ - name: Limit docker pypi package version to < 4.3.0
+ set_fact:
+ docker_pip_package_limit: '<4.3.0'
+ when: docker_api_version is version('1.39', '<')
+
+ - name: Install/upgrade Docker SDK for Python
+ pip:
+ name: "{{ [docker_pip_package ~ docker_pip_package_limit] + docker_pip_extra_packages }}"
+ extra_args: "-c {{ remote_constraints }}"
+ state: present
+
+ - name: Install docker-compose
+ pip:
+ state: present
+ name: "{{ docker_compose_pip_packages }}"
+ extra_args: "-c {{ remote_constraints }}"
+
+ - name: Check docker-py version
+ command: "{{ ansible_python.executable }} -c 'import docker; print(docker.__version__)'"
+ register: docker_py_version_stdout
+ ignore_errors: true
+
+ - name: Register docker-compose version
+ command: "{{ ansible_python.executable }} -c 'import compose; print(compose.__version__)'"
+ register: docker_compose_version
+ ignore_errors: true
+
+ - name: Declare docker-py and docker-compose version
+ set_fact:
+ docker_py_version: "{{ docker_py_version_stdout.stdout | default('0.0') }}"
+ docker_compose_version: "{{ docker_compose_version.stdout | default('0.0.0') }}"
+
+ - debug:
+ msg: "Docker SDK for Python version: {{ docker_py_version }}; Docker Compose version: {{ docker_compose_version }}"
+
+ - name: Declare docker-compose as existing
+ set_fact:
+ has_docker_compose: true
+
+ when: not skip_docker_compose
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml
new file mode 100644
index 000000000..fb03ae738
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml
@@ -0,0 +1,11 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_compose_packages:
+ - docker-compose
+docker_compose_pip_packages:
+ - docker-compose
+ # Force PyYAML to 5.3.1
+ - PyYAML==5.3.1
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml
new file mode 100644
index 000000000..f0698a3e4
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml
@@ -0,0 +1,9 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_compose_pip_packages:
+ - docker-compose
+ # Force PyYAML to 5.3.1
+ - PyYAML==5.3.1
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/CentOS-8.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/CentOS-8.yml
index c5d18002b..c5d18002b 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/CentOS-8.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/CentOS-8.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml
new file mode 100644
index 000000000..727d541fd
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_extra_packages:
+ # https://github.com/docker/docker-py/issues/3113
+ - requests<2.29.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml
new file mode 100644
index 000000000..727d541fd
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_extra_packages:
+ # https://github.com/docker/docker-py/issues/3113
+ - requests<2.29.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml
new file mode 100644
index 000000000..99b27c1c6
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml
@@ -0,0 +1,10 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+skip_docker_compose: true
+
+docker_pip_extra_packages:
+ # Not sure why RHEL7 needs this specific version
+ - requests==2.6.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-8.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-8.yml
index 7279eac17..7279eac17 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-8.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-8.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-9.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-9.yml
index 7279eac17..7279eac17 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-9.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-9.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py2.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py2.yml
index c5d18002b..c5d18002b 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py2.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py2.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py3.yml
index 46c58b253..7279eac17 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py3.yml
@@ -3,4 +3,4 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
-docker_compose_pip_packages: []
+docker_compose_packages: []
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml
new file mode 100644
index 000000000..f701e1f77
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml
@@ -0,0 +1,9 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_extra_packages:
+ # Installing requests >=2.12.0 on Ubuntu 14.04 breaks certificate validation. We restrict to an older version
+ # to ensure out get_url tests work out fine. This is only an issue if pyOpenSSL is also installed.
+ - requests==2.6.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-16.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-16.yml
index c5d18002b..c5d18002b 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-16.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-16.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-18.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-18.yml
index c5d18002b..c5d18002b 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-18.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-18.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu.yml
index 46c58b253..46c58b253 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu.yml
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/default.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/default.yml
new file mode 100644
index 000000000..f55df21f8
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/default.yml
@@ -0,0 +1,4 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml
new file mode 100644
index 000000000..2a770b722
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_docker_python_deps
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml
new file mode 100644
index 000000000..21ed39723
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml
@@ -0,0 +1,25 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- name: Setup Docker
+ when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ block:
+ - name: Detect whether we are running inside a container
+ current_container_facts:
+
+ - name: Inspect current container
+ docker_container_info:
+ name: "{{ ansible_module_container_id }}"
+ register: current_container_info
+ when: ansible_module_running_in_container
+
+ - name: Determine network name
+ set_fact:
+ current_container_network_ip: "{{ (current_container_info.container.NetworkSettings.Networks | dictsort)[0].0 | default('') if ansible_module_running_in_container else '' }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/aliases b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/aliases
new file mode 100644
index 000000000..0a430dff1
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/aliases
@@ -0,0 +1,5 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+needs/target/setup_epel
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/defaults/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/defaults/main.yml
new file mode 100644
index 000000000..cd11129ed
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/defaults/main.yml
@@ -0,0 +1,12 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_api_packages:
+ - requests
+ # - paramiko
+ # - pyOpenSSL
+
+docker_pip_api_packages_python2:
+ - backports.ssl-match-hostname
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/meta/main.yml
new file mode 100644
index 000000000..d4a5c7d05
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/meta/main.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_remote_constraints
+ - setup_pkg_mgr
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/tasks/main.yml
new file mode 100644
index 000000000..67c2651d2
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/tasks/main.yml
@@ -0,0 +1,15 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- name: Install/upgrade Python requirements
+ pip:
+ name: "{{ docker_pip_api_packages + (docker_pip_api_packages_python2 if ansible_facts.python.version.major == 2 else []) }}"
+ extra_args: "-c {{ remote_constraints }}"
+ state: present
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml
new file mode 100644
index 000000000..ff5720177
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml
@@ -0,0 +1,10 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_api_packages:
+ # Not sure why RHEL7 needs this specific version of requests
+ - requests==2.6.0
+ # - paramiko
+ # - pyOpenSSL
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml
new file mode 100644
index 000000000..41a8bceb5
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml
@@ -0,0 +1,11 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_api_packages:
+ # Installing requests >=2.12.0 on Ubuntu 14.04 breaks certificate validation. We restrict to an older version
+ # to ensure out get_url tests work out fine. This is only an issue if pyOpenSSL is also installed.
+ - requests==2.6.0
+ # - paramiko
+ # - pyOpenSSL
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/default.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/default.yml
new file mode 100644
index 000000000..f55df21f8
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/default.yml
@@ -0,0 +1,4 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases
index 357972ff5..e1026a831 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases
@@ -3,4 +3,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
needs/target/setup_docker
+needs/target/setup_docker_current_container_network_ip
needs/target/setup_openssl
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml
index 0a1f363cb..6833be48a 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml
@@ -4,9 +4,8 @@
# SPDX-License-Identifier: GPL-3.0-or-later
- name: "Make sure all images are removed"
- docker_image:
+ docker_image_remove:
name: "{{ item }}"
- state: absent
with_items: "{{ docker_registry_setup_inames }}"
- name: "Get registry logs"
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml
index 4ab14ed10..f13fc1adc 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml
@@ -5,5 +5,7 @@
dependencies:
#- setup_docker -- done in setup.yml, to work around cleanup problems!
+ #- setup_docker_current_container_network_ip
+ - setup_docker_python_deps
- setup_openssl
- setup_remote_tmp_dir
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml
index b3a8662ee..454c6604a 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml
@@ -16,6 +16,10 @@
include_role:
name: setup_docker
+- name: Figure out current container's network IP
+ include_role:
+ name: setup_docker_current_container_network_ip
+
- name: Create random name prefix and test registry name
set_fact:
docker_registry_container_name_registry: '{{ ''ansible-docker-test-registry-%0x'' % ((2**32) | random) }}'
@@ -36,10 +40,10 @@
- debug:
msg: Using test registry name {{ docker_registry_container_name_registry }} and nginx frontend names {{ docker_registry_container_name_nginx }} and {{ docker_registry_container_name_nginx2 }}
-- fail: msg="Too old docker / docker-py version to set up docker registry!"
- when: not(docker_py_version is version('1.8.0', '>=') and docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
+- fail: msg="Too old docker version to set up docker registry!"
+ when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
-- when: docker_py_version is version('1.8.0', '>=') and docker_api_version is version('1.25', '>=')
+- when: docker_api_version is version('1.25', '>=')
block:
# Set up registry container
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/vars/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/vars/main.yml
index e4eafc24e..1859bdfe6 100644
--- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/vars/main.yml
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/vars/main.yml
@@ -4,10 +4,14 @@
# SPDX-License-Identifier: GPL-3.0-or-later
docker_test_image_digest_v1: e004c2cc521c95383aebb1fb5893719aa7a8eae2e7a71f316a4410784edb00a9
+docker_test_image_digest_v1_image_id: 758ec7f3a1ee85f8f08399b55641bfb13e8c1109287ddc5e22b68c3d653152ee
docker_test_image_digest_v2: ee44b399df993016003bf5466bd3eeb221305e9d0fa831606bc7902d149c775b
+docker_test_image_digest_v2_image_id: dc3bacd8b5ea796cea5d6070c8f145df9076f26a6bc1c8981fd5b176d37de843
docker_test_image_digest_base: quay.io/ansible/docker-test-containers
docker_test_image_hello_world: quay.io/ansible/docker-test-containers:hello-world
+docker_test_image_hello_world_image_id: sha256:bf756fb1ae65adf866bd8c456593cd24beb6a0a061dedf42b26a993176745f6b
docker_test_image_hello_world_base: quay.io/ansible/docker-test-containers
+docker_test_image_hello_world_platform: docker.io/library/hello-world:latest
docker_test_image_busybox: quay.io/ansible/docker-test-containers:busybox
docker_test_image_alpine: quay.io/ansible/docker-test-containers:alpine3.8
docker_test_image_alpine_different: quay.io/ansible/docker-test-containers:alpine3.7
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/aliases b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/aliases
new file mode 100644
index 000000000..0a430dff1
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/aliases
@@ -0,0 +1,5 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+needs/target/setup_epel
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/defaults/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/defaults/main.yml
new file mode 100644
index 000000000..29a257f81
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/defaults/main.yml
@@ -0,0 +1,10 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_py_version: '0.0'
+
+docker_pip_extra_packages: []
+docker_pip_package: docker
+docker_pip_package_limit: ''
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml
new file mode 100644
index 000000000..d4a5c7d05
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+dependencies:
+ - setup_remote_constraints
+ - setup_pkg_mgr
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml
new file mode 100644
index 000000000..91cd5fcba
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml
@@ -0,0 +1,47 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+####################################################################
+# WARNING: These are designed specifically for Ansible tests #
+# and should not be used as examples of how to write Ansible roles #
+####################################################################
+
+- name: Setup Docker SDK for Python
+ when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
+ block:
+ - name: Include distribution specific variables
+ include_vars: "{{ lookup('first_found', params) }}"
+ vars:
+ params:
+ files:
+ - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml"
+ - "{{ ansible_facts.distribution }}.yml"
+ - "{{ ansible_facts.os_family }}.yml"
+ - default.yml
+ paths:
+ - "{{ role_path }}/vars"
+
+ - name: Limit docker pypi package version to < 4.3.0
+ set_fact:
+ docker_pip_package_limit: '<4.3.0'
+ when: docker_api_version is version('1.39', '<')
+
+ - name: Install/upgrade Python requirements
+ pip:
+ name: "{{ [docker_pip_package ~ docker_pip_package_limit] + docker_pip_extra_packages }}"
+ extra_args: "-c {{ remote_constraints }}"
+ state: "{{ 'latest' if force_docker_sdk_for_python_pypi | default(false) else 'present' }}"
+
+ - name: Check docker-py version
+ command: "{{ ansible_python.executable }} -c 'import docker; print(docker.__version__)'"
+ register: docker_py_version_stdout
+ ignore_errors: true
+
+ - set_fact:
+ docker_py_version: "{{ docker_py_version_stdout.stdout | default('0.0') }}"
+
+ - debug:
+ msg: "Docker SDK for Python version: {{ docker_py_version }}"
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml
new file mode 100644
index 000000000..9fa5efa5c
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml
@@ -0,0 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_extra_packages:
+ # Not sure why RHEL7 needs this specific version
+ - requests==2.6.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/Ubuntu-14.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/Ubuntu-14.yml
new file mode 100644
index 000000000..f701e1f77
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/Ubuntu-14.yml
@@ -0,0 +1,9 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+docker_pip_extra_packages:
+ # Installing requests >=2.12.0 on Ubuntu 14.04 breaks certificate validation. We restrict to an older version
+ # to ensure out get_url tests work out fine. This is only an issue if pyOpenSSL is also installed.
+ - requests==2.6.0
diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/default.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/default.yml
new file mode 100644
index 000000000..f55df21f8
--- /dev/null
+++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/default.yml
@@ -0,0 +1,4 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/ansible_collections/community/docker/tests/sanity/extra/action-group.json b/ansible_collections/community/docker/tests/sanity/extra/action-group.json
new file mode 100644
index 000000000..477ca3f8b
--- /dev/null
+++ b/ansible_collections/community/docker/tests/sanity/extra/action-group.json
@@ -0,0 +1,11 @@
+{
+ "include_symlinks": true,
+ "prefixes": [
+ "meta/runtime.yml",
+ "plugins/modules/"
+ ],
+ "output": "path-message",
+ "requirements": [
+ "pyyaml"
+ ]
+}
diff --git a/ansible_collections/community/docker/tests/sanity/extra/action-group.json.license b/ansible_collections/community/docker/tests/sanity/extra/action-group.json.license
new file mode 100644
index 000000000..edff8c768
--- /dev/null
+++ b/ansible_collections/community/docker/tests/sanity/extra/action-group.json.license
@@ -0,0 +1,3 @@
+GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+SPDX-License-Identifier: GPL-3.0-or-later
+SPDX-FileCopyrightText: Ansible Project
diff --git a/ansible_collections/community/docker/tests/sanity/extra/action-group.py b/ansible_collections/community/docker/tests/sanity/extra/action-group.py
new file mode 100755
index 000000000..efe31ab91
--- /dev/null
+++ b/ansible_collections/community/docker/tests/sanity/extra/action-group.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+# Copyright (c) 2024, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+"""Make sure all modules that should show up in the action group."""
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import os
+import yaml
+
+
+def main():
+ """Main entry point."""
+
+ # Load redirects
+ meta_runtime = 'meta/runtime.yml'
+ try:
+ with open(meta_runtime, 'rb') as f:
+ data = yaml.safe_load(f)
+ action_group = data['action_groups']['docker']
+ except Exception as exc:
+ print('%s: cannot load action group: %s' % (meta_runtime, exc))
+ return
+
+ exclusions = ['current_container_facts']
+ modules_directory = 'plugins/modules/'
+ modules_suffix = '.py'
+
+ for file in os.listdir(modules_directory):
+ if not file.endswith(modules_suffix):
+ continue
+ module_name = file[:-len(modules_suffix)]
+
+ should_be_in_action_group = module_name not in exclusions
+
+ if should_be_in_action_group:
+ if module_name not in action_group:
+ print('%s: module %s is not part of docker action group' % (meta_runtime, module_name))
+ else:
+ action_group.remove(module_name)
+
+ path = os.path.join(modules_directory, file)
+ documentation = []
+ in_docs = False
+ with open(path, 'r', encoding='utf-8') as f:
+ for line in f:
+ if line.startswith('DOCUMENTATION ='):
+ in_docs = True
+ elif line.startswith(("'''", '"""')) and in_docs:
+ in_docs = False
+ elif in_docs:
+ documentation.append(line)
+ if in_docs:
+ print('%s: cannot find DOCUMENTATION end' % (path))
+ if not documentation:
+ print('%s: cannot find DOCUMENTATION' % (path))
+ continue
+
+ try:
+ docs = yaml.safe_load('\n'.join(documentation))
+ if not isinstance(docs, dict):
+ raise Exception('is not a top-level dictionary')
+ except Exception as exc:
+ print('%s: cannot load DOCUMENTATION as YAML: %s' % (path, exc))
+ continue
+
+ docs_fragments = docs.get('extends_documentation_fragment') or []
+ is_in_action_group = 'community.docker.attributes.actiongroup_docker' in docs_fragments
+
+ if should_be_in_action_group != is_in_action_group:
+ if should_be_in_action_group:
+ print('%s: module does not document itself as part of action group, but it should' % (path))
+ else:
+ print('%s: module documents itself as part of action group, but it should not be' % (path))
+
+ for module_name in action_group:
+ print('%s: module %s mentioned in docker action group does not exist' % (meta_runtime, module_name))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py b/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py
index c636beb08..251e6d70f 100755
--- a/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py
+++ b/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py
@@ -17,7 +17,7 @@ def main():
suffix = ':{env}'.format(env=env["ANSIBLE_COLLECTIONS_PATH"]) if 'ANSIBLE_COLLECTIONS_PATH' in env else ''
env['ANSIBLE_COLLECTIONS_PATH'] = '{root}{suffix}'.format(root=os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd()))), suffix=suffix)
p = subprocess.run(
- ['antsibull-docs', 'lint-collection-docs', '--plugin-docs', '--disallow-semantic-markup', '--skip-rstcheck', '.'],
+ ['antsibull-docs', 'lint-collection-docs', '--plugin-docs', '--skip-rstcheck', '.'],
env=env,
check=False,
)
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt b/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt
deleted file mode 100644
index 1a9f48884..000000000
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-.azure-pipelines/scripts/publish-codecov.py replace-urlopen
-.azure-pipelines/scripts/publish-codecov.py compile-2.6!skip # Uses Python 3.6+ syntax
-.azure-pipelines/scripts/publish-codecov.py compile-2.7!skip # Uses Python 3.6+ syntax
-.azure-pipelines/scripts/publish-codecov.py compile-3.5!skip # Uses Python 3.6+ syntax
-.azure-pipelines/scripts/publish-codecov.py future-import-boilerplate
-.azure-pipelines/scripts/publish-codecov.py metaclass-boilerplate
-plugins/modules/current_container_facts.py validate-modules:return-syntax-error
-plugins/module_utils/module_container/module.py compile-2.6!skip # Uses Python 2.7+ syntax
-plugins/module_utils/module_container/module.py import-2.6!skip # Uses Python 2.7+ syntax
-plugins/modules/docker_container.py import-2.6!skip # Import uses Python 2.7+ syntax
-plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt b/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt
index 1a9f48884..2bc38ac22 100644
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt
+++ b/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt
@@ -7,5 +7,7 @@
plugins/modules/current_container_facts.py validate-modules:return-syntax-error
plugins/module_utils/module_container/module.py compile-2.6!skip # Uses Python 2.7+ syntax
plugins/module_utils/module_container/module.py import-2.6!skip # Uses Python 2.7+ syntax
+plugins/modules/docker_compose_v2.py validate-modules:return-syntax-error
+plugins/modules/docker_compose_v2_pull.py validate-modules:return-syntax-error
plugins/modules/docker_container.py import-2.6!skip # Import uses Python 2.7+ syntax
plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt b/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt
index 3d71834db..f3c4575fb 100644
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt
+++ b/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt
@@ -1,3 +1,5 @@
.azure-pipelines/scripts/publish-codecov.py replace-urlopen
plugins/modules/current_container_facts.py validate-modules:return-syntax-error
+plugins/modules/docker_compose_v2.py validate-modules:return-syntax-error
+plugins/modules/docker_compose_v2_pull.py validate-modules:return-syntax-error
plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt b/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt
index 2a06013da..c0d5c549c 100644
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt
+++ b/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt
@@ -1,2 +1,3 @@
.azure-pipelines/scripts/publish-codecov.py replace-urlopen
+plugins/modules/docker_compose_v2.py validate-modules:return-syntax-error
plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt b/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt
index 2a06013da..12e0b26f9 100644
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt
+++ b/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt
@@ -1,2 +1 @@
-.azure-pipelines/scripts/publish-codecov.py replace-urlopen
plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt b/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt
new file mode 100644
index 000000000..12e0b26f9
--- /dev/null
+++ b/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt
@@ -0,0 +1 @@
+plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt.license b/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt.license
new file mode 100644
index 000000000..edff8c768
--- /dev/null
+++ b/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt.license
@@ -0,0 +1,3 @@
+GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+SPDX-License-Identifier: GPL-3.0-or-later
+SPDX-FileCopyrightText: Ansible Project
diff --git a/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt b/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt
deleted file mode 100644
index 81b68cbd8..000000000
--- a/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-.azure-pipelines/scripts/publish-codecov.py replace-urlopen
-.azure-pipelines/scripts/publish-codecov.py compile-2.6!skip # Uses Python 3.6+ syntax
-.azure-pipelines/scripts/publish-codecov.py compile-2.7!skip # Uses Python 3.6+ syntax
-.azure-pipelines/scripts/publish-codecov.py compile-3.5!skip # Uses Python 3.6+ syntax
-.azure-pipelines/scripts/publish-codecov.py future-import-boilerplate
-.azure-pipelines/scripts/publish-codecov.py metaclass-boilerplate
-plugins/module_utils/module_container/module.py compile-2.6!skip # Uses Python 2.7+ syntax
-plugins/module_utils/module_container/module.py import-2.6!skip # Uses Python 2.7+ syntax
-plugins/modules/docker_container.py import-2.6!skip # Import uses Python 2.7+ syntax
-plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin
diff --git a/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py b/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py
index 5ae6a8e12..279b469c0 100644
--- a/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py
+++ b/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py
@@ -13,6 +13,7 @@ from ansible_collections.community.docker.tests.unit.compat import unittest
from ansible.errors import AnsibleError
from ansible.playbook.play_context import PlayContext
from ansible.plugins.loader import connection_loader
+from ansible.module_utils.six import PY2
class TestDockerConnectionClass(unittest.TestCase):
@@ -36,7 +37,8 @@ class TestDockerConnectionClass(unittest.TestCase):
def test_docker_connection_module_too_old(self, mock_new_docker_verison, mock_old_docker_version):
self.dc._version = None
self.dc.remote_user = 'foo'
- self.assertRaisesRegexp(AnsibleError, '^docker connection type requires docker 1.3 or higher$', self.dc._get_actual_user)
+ (self.assertRaisesRegexp if PY2 else self.assertRaisesRegex)(
+ AnsibleError, '^docker connection type requires docker 1.3 or higher$', self.dc._get_actual_user)
@mock.patch('ansible_collections.community.docker.plugins.connection.docker.Connection._old_docker_version',
return_value=('false', 'garbage', '', 1))
@@ -54,4 +56,5 @@ class TestDockerConnectionClass(unittest.TestCase):
def test_docker_connection_module_wrong_cmd(self, mock_new_docker_version, mock_old_docker_version):
self.dc._version = None
self.dc.remote_user = 'foo'
- self.assertRaisesRegexp(AnsibleError, '^Docker version check (.*?) failed: ', self.dc._get_actual_user)
+ (self.assertRaisesRegexp if PY2 else self.assertRaisesRegex)(
+ AnsibleError, '^Docker version check (.*?) failed: ', self.dc._get_actual_user)
diff --git a/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py b/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py
index ea16c0d9f..e5761247d 100644
--- a/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py
+++ b/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py
@@ -9,14 +9,24 @@ __metaclass__ = type
import pytest
from ansible.inventory.data import InventoryData
+from ansible.parsing.dataloader import DataLoader
+from ansible.template import Templar
from ansible_collections.community.docker.plugins.inventory.docker_containers import InventoryModule
+from ansible_collections.community.docker.tests.unit.compat.mock import create_autospec
@pytest.fixture(scope="module")
-def inventory():
+def templar():
+ dataloader = create_autospec(DataLoader, instance=True)
+ return Templar(loader=dataloader)
+
+
+@pytest.fixture(scope="module")
+def inventory(templar):
r = InventoryModule()
r.inventory = InventoryData()
+ r.templar = templar
return r
@@ -114,6 +124,7 @@ def test_populate(inventory, mocker):
'compose': {},
'groups': {},
'keyed_groups': {},
+ 'filters': None,
}))
inventory._populate(client)
@@ -145,6 +156,7 @@ def test_populate_service(inventory, mocker):
'groups': {},
'keyed_groups': {},
'docker_host': 'unix://var/run/docker.sock',
+ 'filters': None,
}))
inventory._populate(client)
@@ -186,6 +198,7 @@ def test_populate_stack(inventory, mocker):
'docker_host': 'unix://var/run/docker.sock',
'default_ip': '127.0.0.1',
'private_ssh_port': 22,
+ 'filters': None,
}))
inventory._populate(client)
@@ -212,3 +225,46 @@ def test_populate_stack(inventory, mocker):
assert len(inventory.inventory.groups['unix://var/run/docker.sock'].hosts) == 1
assert len(inventory.inventory.groups) == 10
assert len(inventory.inventory.hosts) == 1
+
+
+def test_populate_filter_none(inventory, mocker):
+ client = FakeClient(LOVING_THARP)
+
+ inventory.get_option = mocker.MagicMock(side_effect=create_get_option({
+ 'verbose_output': True,
+ 'connection_type': 'docker-api',
+ 'add_legacy_groups': False,
+ 'compose': {},
+ 'groups': {},
+ 'keyed_groups': {},
+ 'filters': [
+ {'exclude': True},
+ ],
+ }))
+ inventory._populate(client)
+
+ assert len(inventory.inventory.hosts) == 0
+
+
+def test_populate_filter(inventory, mocker):
+ client = FakeClient(LOVING_THARP)
+
+ inventory.get_option = mocker.MagicMock(side_effect=create_get_option({
+ 'verbose_output': True,
+ 'connection_type': 'docker-api',
+ 'add_legacy_groups': False,
+ 'compose': {},
+ 'groups': {},
+ 'keyed_groups': {},
+ 'filters': [
+ {'include': 'docker_state.Running is true'},
+ {'exclude': True},
+ ],
+ }))
+ inventory._populate(client)
+
+ host_1 = inventory.inventory.get_host('loving_tharp')
+ host_1_vars = host_1.get_vars()
+
+ assert host_1_vars['ansible_host'] == 'loving_tharp'
+ assert len(inventory.inventory.hosts) == 1
diff --git a/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py b/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py
index ea0035655..57040b631 100644
--- a/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py
+++ b/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py
@@ -619,7 +619,7 @@ class TCPSocketStreamTest(unittest.TestCase):
def test_read_from_socket_no_stream_no_tty(self):
res = self.request(stream=False, tty=False, demux=False)
- res == self.stdout_data + self.stderr_data
+ assert res == self.stdout_data + self.stderr_data
def test_read_from_socket_no_stream_no_tty_demux(self):
res = self.request(stream=False, tty=False, demux=True)
diff --git a/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py b/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
index 428163e61..77e5017ec 100644
--- a/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
+++ b/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
@@ -20,14 +20,18 @@ if sys.version_info < (2, 7):
from ansible_collections.community.docker.plugins.module_utils._api.transport import ssladapter
+HAS_MATCH_HOSTNAME = True
try:
from backports.ssl_match_hostname import (
match_hostname, CertificateError
)
except ImportError:
- from ssl import (
- match_hostname, CertificateError
- )
+ try:
+ from ssl import (
+ match_hostname, CertificateError
+ )
+ except ImportError:
+ HAS_MATCH_HOSTNAME = False
try:
from ssl import OP_NO_SSLv3, OP_NO_SSLv2, OP_NO_TLSv1
@@ -47,6 +51,7 @@ class SSLAdapterTest(unittest.TestCase):
assert not ssl_context.options & OP_NO_TLSv1
+@pytest.mark.skipif(not HAS_MATCH_HOSTNAME, reason='match_hostname is not available')
class MatchHostnameTest(unittest.TestCase):
cert = {
'issuer': (
diff --git a/ansible_collections/community/docker/tests/unit/plugins/module_utils/compose_v2_test_cases.py b/ansible_collections/community/docker/tests/unit/plugins/module_utils/compose_v2_test_cases.py
new file mode 100644
index 000000000..d7258396c
--- /dev/null
+++ b/ansible_collections/community/docker/tests/unit/plugins/module_utils/compose_v2_test_cases.py
@@ -0,0 +1,10588 @@
+# Copyright 2022 Red Hat | Ansible
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+from ansible_collections.community.docker.plugins.module_utils.compose_v2 import (
+ Event,
+)
+
+
+EVENT_TEST_CASES = [
+ # #######################################################################################################################
+ # ## Docker Compose 2.18.1 ##############################################################################################
+ # #######################################################################################################################
+ # docker_compose_v2: "Absent" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-absent',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removing\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removed\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Removing\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Removed\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removed',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Absent (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-absent-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removing\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removed\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Removing\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Resource is still in use\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ None,
+ 'Resource is still in use',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Cleanup" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-cleanup',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Stopped\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Removing\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Removed\n'
+ ' Network ansible-docker-test-01234567-pull_default Removing\n'
+ ' Network ansible-docker-test-01234567-pull_default Removed\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Removed',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present',
+ '2.18.1',
+ False,
+ ' ansible-docker-test-01234567-container Pulling \n'
+ ' ansible-docker-test-01234567-container Pulled \n'
+ ' Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-container',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-container',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 80c52c26780_ansible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 80c52c26780_ansible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '80c52c26780_ansible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '80c52c26780_ansible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 9121995872d_ansible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 9121995872d_ansible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '9121995872d_ansible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '9121995872d_ansible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-(changed)',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2-present-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-container Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-container Pulled \n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-container',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-container',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-7c5458ac-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-container Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-container Pulled \n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-container',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-container',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-dba91fb6-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-(idempotent-check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (idempotent)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-(idempotent)',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present stopped" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-stopped',
+ '2.18.1',
+ False,
+ ' Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present stopped (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-stopped-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=always',
+ '2.18.1',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 002a15404ac_ansible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 002a15404ac_ansible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '002a15404ac_ansible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '002a15404ac_ansible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container ec060c7b341_ansible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container ec060c7b341_ansible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ec060c7b341_ansible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ec060c7b341_ansible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=missing',
+ '2.18.1',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=missing-(idempotent)',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=missing-(idempotent,-check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=never',
+ '2.18.1',
+ False,
+ ' Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' Network ansible-docker-test-01234567-pull_default Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=never',
+ '2.18.1',
+ False,
+ ' Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' Network ansible-docker-test-01234567-pull_default Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ 'Error response from daemon: No such image: does-not-exist:latest\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'unknown',
+ '',
+ 'Error',
+ 'Error response from daemon: No such image: does-not-exist:latest',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-7c5458ac-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-dba91fb6-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present without explicit pull" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-without-explicit-pull',
+ '2.18.1',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Error \n'
+ "Error response from daemon: pull access denied for does-not-exist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n", # noqa: E501
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ "Error response from daemon: pull access denied for does-not-exist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied", # noqa: E501
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-present-without-explicit-pull-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Error \n'
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Restarted" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-restarted',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Restarting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Restarting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-restarted-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Restarting\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Restarting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Started" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-started',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Started (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-started-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Stopped" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-stopped',
+ '2.18.1',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n'
+ '\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Stopped (check)" on 2024-01-07 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-07-docker_compose_v2-stopped-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n'
+ '\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2_pull-pull-(check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Error \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont - Pull error for image: does-not-exist:latest \n'
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.18.1',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2_pull-pull-with-policy=always-(again)',
+ '2.18.1',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in 2.12-ubuntu1804
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in 2.12-ubuntu1804
+ (
+ '2.18.1-2.12-ubuntu1804-2024-01-13-docker_compose_v2_pull-pull-with-policy=always-(again,-check)',
+ '2.18.1',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # #######################################################################################################################
+ # ## Docker Compose 2.21.0 ##############################################################################################
+ # #######################################################################################################################
+ # docker_compose_v2: "Absent" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-absent',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removing\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removed\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Removing\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Removed\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removed',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Absent (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-absent-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removing\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removed\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Removing\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Resource is still in use\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ None,
+ 'Resource is still in use',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Cleanup" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-cleanup',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Stopped\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Removing\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Removed\n'
+ ' Network ansible-docker-test-01234567-pull_default Removing\n'
+ ' Network ansible-docker-test-01234567-pull_default Removed\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Removed',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present',
+ '2.21.0',
+ False,
+ ' Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 054e03eb5ea_ansible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 054e03eb5ea_ansible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '054e03eb5ea_ansible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '054e03eb5ea_ansible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 0a77f424a61_ansible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 0a77f424a61_ansible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '0a77f424a61_ansible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '0a77f424a61_ansible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 0e165a36533_ansible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 0e165a36533_ansible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '0e165a36533_ansible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '0e165a36533_ansible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 26bf8ff1675_ansible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 26bf8ff1675_ansible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '26bf8ff1675_ansible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '26bf8ff1675_ansible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 27c209a84a5_ansible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 27c209a84a5_ansible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '27c209a84a5_ansible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '27c209a84a5_ansible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 4b568108657_ansible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 4b568108657_ansible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '4b568108657_ansible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '4b568108657_ansible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 6dc8d091c94_ansible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 6dc8d091c94_ansible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '6dc8d091c94_ansible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '6dc8d091c94_ansible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 71b893893dc_ansible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 71b893893dc_ansible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '71b893893dc_ansible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '71b893893dc_ansible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 71e7a319c23_ansible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 71e7a319c23_ansible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '71e7a319c23_ansible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '71e7a319c23_ansible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 78e827e6673_ansible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 78e827e6673_ansible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '78e827e6673_ansible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '78e827e6673_ansible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 7971b0c189d_ansible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 7971b0c189d_ansible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '7971b0c189d_ansible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '7971b0c189d_ansible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 7b8d91093c9_ansible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 7b8d91093c9_ansible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '7b8d91093c9_ansible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '7b8d91093c9_ansible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 7bedd9b4513_ansible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 7bedd9b4513_ansible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '7bedd9b4513_ansible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '7bedd9b4513_ansible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container 87873e68934_ansible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container 87873e68934_ansible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '87873e68934_ansible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '87873e68934_ansible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container a81dce9774b_ansible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container a81dce9774b_ansible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'a81dce9774b_ansible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'a81dce9774b_ansible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container d28b7978587_ansible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container d28b7978587_ansible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'd28b7978587_ansible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'd28b7978587_ansible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container dea4aafe907_ansible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container dea4aafe907_ansible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'dea4aafe907_ansible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'dea4aafe907_ansible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container e508faa8323_ansible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container e508faa8323_ansible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'e508faa8323_ansible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'e508faa8323_ansible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container ef57cb7913f_ansible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container ef57cb7913f_ansible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ef57cb7913f_ansible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ef57cb7913f_ansible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container efe8857a191_ansible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container efe8857a191_ansible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'efe8857a191_ansible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'efe8857a191_ansible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container f0de40ba686_ansible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container f0de40ba686_ansible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'f0de40ba686_ansible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'f0de40ba686_ansible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container f6416652e13_ansible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container f6416652e13_ansible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'f6416652e13_ansible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'f6416652e13_ansible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-(changed)',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-19ffba88-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1ba2643a-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1f1d0d58-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-2460e737-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4baa7139-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4fcbaf1e-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-51914faa-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-5f3d2e16-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-601188b1-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-64d917f4-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-6aaaa304-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-834c1a9b-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-971ad57c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ad622acd-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-b2745d99-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ce1fa4d7-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d1d30700-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d2caf0c9-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d616c3a5-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-07-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d6ae094c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-e700ac20-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-13-docker_compose_v2-present-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ede01681-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-(idempotent-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (idempotent)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-(idempotent)',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present stopped" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-stopped',
+ '2.21.0',
+ False,
+ ' Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present stopped (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-stopped-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 0b4286904e0_ansible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 0b4286904e0_ansible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '0b4286904e0_ansible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '0b4286904e0_ansible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 0d5362bac93_ansible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 0d5362bac93_ansible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '0d5362bac93_ansible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '0d5362bac93_ansible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 3d7b7be6dbe_ansible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 3d7b7be6dbe_ansible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '3d7b7be6dbe_ansible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '3d7b7be6dbe_ansible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 49ff7fef052_ansible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 49ff7fef052_ansible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '49ff7fef052_ansible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '49ff7fef052_ansible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 5d30320650e_ansible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 5d30320650e_ansible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '5d30320650e_ansible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '5d30320650e_ansible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 611a044106b_ansible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 611a044106b_ansible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '611a044106b_ansible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '611a044106b_ansible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 61802a08aa6_ansible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 61802a08aa6_ansible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '61802a08aa6_ansible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '61802a08aa6_ansible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 61bd1b13d9c_ansible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 61bd1b13d9c_ansible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '61bd1b13d9c_ansible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '61bd1b13d9c_ansible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 769aec9cd4d_ansible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 769aec9cd4d_ansible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '769aec9cd4d_ansible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '769aec9cd4d_ansible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 813ca227a6f_ansible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 813ca227a6f_ansible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '813ca227a6f_ansible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '813ca227a6f_ansible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 8a586ed91d6_ansible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 8a586ed91d6_ansible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '8a586ed91d6_ansible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '8a586ed91d6_ansible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 8bec416e98d_ansible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 8bec416e98d_ansible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '8bec416e98d_ansible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '8bec416e98d_ansible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 906450ba6e7_ansible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 906450ba6e7_ansible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '906450ba6e7_ansible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '906450ba6e7_ansible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container a99ed30c7d6_ansible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container a99ed30c7d6_ansible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'a99ed30c7d6_ansible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'a99ed30c7d6_ansible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container b78faf8a742_ansible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container b78faf8a742_ansible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'b78faf8a742_ansible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'b78faf8a742_ansible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container be1b2a9ca28_ansible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container be1b2a9ca28_ansible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'be1b2a9ca28_ansible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'be1b2a9ca28_ansible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container c9d730c2613_ansible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container c9d730c2613_ansible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'c9d730c2613_ansible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'c9d730c2613_ansible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container da16aa68f6f_ansible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container da16aa68f6f_ansible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'da16aa68f6f_ansible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'da16aa68f6f_ansible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container dff4b309c58_ansible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container dff4b309c58_ansible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'dff4b309c58_ansible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'dff4b309c58_ansible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container ecd243ea972_ansible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container ecd243ea972_ansible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ecd243ea972_ansible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ecd243ea972_ansible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container f48d54a75fb_ansible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container f48d54a75fb_ansible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'f48d54a75fb_ansible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'f48d54a75fb_ansible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container fa8f62dfced_ansible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container fa8f62dfced_ansible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'fa8f62dfced_ansible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'fa8f62dfced_ansible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=missing',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=missing-(idempotent)',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=missing-(idempotent,-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=never',
+ '2.21.0',
+ False,
+ ' Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' Network ansible-docker-test-01234567-pull_default Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-rhel9.3
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=never',
+ '2.21.0',
+ False,
+ ' Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' Network ansible-docker-test-01234567-pull_default Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ 'Error response from daemon: No such image: does-not-exist:latest\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'unknown',
+ '',
+ 'Error',
+ 'Error response from daemon: No such image: does-not-exist:latest',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.15-centos7-2024-01-07-docker_compose_v2-present-with-pull=never',
+ '2.21.0',
+ False,
+ ' Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' Network ansible-docker-test-01234567-pull_default Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ 'Error response from daemon: no such image: does-not-exist:latest: No such image: does-not-exist:latest\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'unknown',
+ '',
+ 'Error',
+ 'Error response from daemon: no such image: does-not-exist:latest: No such image: does-not-exist:latest',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-19ffba88-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1ba2643a-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-1f1d0d58-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-2460e737-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4baa7139-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.14-rhel9.0
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-4fcbaf1e-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-51914faa-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-5f3d2e16-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-601188b1-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-64d917f4-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-6aaaa304-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-834c1a9b-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-971ad57c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ad622acd-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-b2745d99-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ce1fa4d7-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d1d30700-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-rhel9.3
+ (
+ '2.21.0-devel-rhel9.3-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d2caf0c9-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d616c3a5-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-d6ae094c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-e700ac20-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-ede01681-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present without explicit pull" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-without-explicit-pull',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Error \n'
+ "Error response from daemon: pull access denied for does-not-exist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n", # noqa: E501
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ "Error response from daemon: pull access denied for does-not-exist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied", # noqa: E501
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-present-without-explicit-pull-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Error \n'
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Restarted" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-restarted',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Restarting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Restarting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-restarted-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Restarting\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Restarting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Started" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-started',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Started (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-started-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Stopped" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-stopped',
+ '2.21.0',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n'
+ '\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Stopped (check)" on 2024-01-07 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-07 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-07-docker_compose_v2-stopped-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n'
+ '\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2_pull-pull-(check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Error \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont - Pull error for image: does-not-exist:latest \n'
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in 2.15-rhel7.9
+ (
+ '2.21.0-2.15-rhel7.9-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 34.2kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in 2.15-rhel9.1
+ (
+ '2.21.0-2.15-rhel9.1-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.12kB/2.207MB\n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in 2.16-rhel9.2
+ (
+ '2.21.0-2.16-rhel9.2-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.12kB/2.207MB\n'
+ ' 486039affc0a Downloading [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in devel-rhel9.3
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in 2.16-centos7
+ (
+ '2.21.0-2.16-centos7-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [================================================> ] 2.13MB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-devel-ubuntu2204-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [===============================================> ] 2.097MB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in devel-debian-bookworm
+ (
+ '2.21.0-devel-debian-bookworm-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [==============================================> ] 2.032MB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in devel-ubuntu2004
+ (
+ '2.21.0-devel-ubuntu2004-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [============================================> ] 1.966MB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in 2.15-centos7
+ (
+ '2.21.0-2.15-centos7-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [=======================================> ] 1.737MB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in devel-debian-bullseye
+ (
+ '2.21.0-devel-debian-bullseye-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [=====================================> ] 1.638MB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2_pull-pull-with-policy=always-(again)',
+ '2.21.0',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (again, check)" on 2024-01-13 in devel-ubuntu2204
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in 2.14-rhel9.0
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in 2.15-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in 2.15-rhel7.9
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in 2.15-rhel9.1
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in 2.16-centos7
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in 2.16-rhel9.2
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in devel-debian-bookworm
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in devel-debian-bullseye
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in devel-rhel9.3
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in devel-ubuntu2004
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in devel-ubuntu2204
+ (
+ '2.21.0-2.14-rhel9.0-2024-01-13-docker_compose_v2_pull-pull-with-policy=always-(again,-check)',
+ '2.21.0',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # #######################################################################################################################
+ # ## Docker Compose 2.23.3 ##############################################################################################
+ # #######################################################################################################################
+ # docker_compose_v2: "Absent" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Absent" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-absent',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removing\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removed\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Removing\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Removed\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removed',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Absent (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Absent (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-absent-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removing\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Removed\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Removing\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Resource is still in use\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ None,
+ 'Resource is still in use',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Cleanup" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Cleanup" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Stopping service" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-cleanup',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Stopped\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Removing\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Removed\n'
+ ' Network ansible-docker-test-01234567-pull_default Removing\n'
+ ' Network ansible-docker-test-01234567-pull_default Removed\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Stopped',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Removed',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Removing',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Removed',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present',
+ '2.23.3',
+ False,
+ ' Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-07 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-(changed-check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container df477f7889c_ansible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container df477f7889c_ansible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'df477f7889c_ansible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'df477f7889c_ansible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2-present-(changed-check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' DRY-RUN MODE - Container e3161c3ca1e_ansible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container e3161c3ca1e_ansible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'e3161c3ca1e_ansible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'e3161c3ca1e_ansible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (changed)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present (changed)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-(changed)',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreate\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Recreated\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2-present-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-26fefc5c-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (check)" on 2024-01-07 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-bc362ba-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (idempotent check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present (idempotent check)" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Started (idempotent check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-(idempotent-check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present (idempotent)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present (idempotent)" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Started (idempotent)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-(idempotent)',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present stopped" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present stopped" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-stopped',
+ '2.23.3',
+ False,
+ ' Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present stopped (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present stopped (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-stopped-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-start-stop_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Created\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-start-stop_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Created',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=always" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=always',
+ '2.23.3',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-07 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=always-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container 9f33f2ddb62_ansible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container 9f33f2ddb62_ansible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ '9f33f2ddb62_ansible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ '9f33f2ddb62_ansible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=always (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2-present-with-pull=always-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreate\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Recreated\n'
+ ' DRY-RUN MODE - Container e6dd7e14964_ansible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container e6dd7e14964_ansible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreate',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Recreated',
+ None,
+ ),
+ Event(
+ 'container',
+ 'e6dd7e14964_ansible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'e6dd7e14964_ansible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=missing" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=missing',
+ '2.23.3',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (check)" on 2024-01-07 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=missing-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent)" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=missing-(idempotent)',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=missing (idempotent, check)" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never (idempotent, check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=missing-(idempotent,-check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Running\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Running',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=never',
+ '2.23.3',
+ False,
+ ' Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' Network ansible-docker-test-01234567-pull_default Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=never',
+ '2.23.3',
+ False,
+ ' Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' Network ansible-docker-test-01234567-pull_default Created\n'
+ ' Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ 'Error response from daemon: no such image: does-not-exist:latest: No such image: does-not-exist:latest\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'unknown',
+ '',
+ 'Error',
+ 'Error response from daemon: no such image: does-not-exist:latest: No such image: does-not-exist:latest',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2-present-with-pull=never-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-26fefc5c-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present with pull=never (check)" on 2024-01-07 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-with-pull=never-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Creating\n'
+ ' DRY-RUN MODE - Network ansible-docker-test-01234567-pull_default Created\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Creating\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1 Created\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1 Starting\n'
+ ' DRY-RUN MODE - Container nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1 Started\n',
+ [
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'ansible-docker-test-01234567-pull_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-pull-ansible-docker-test-01234567-cont-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'nsible-docker-test-bc362ba-pull-ansible-docker-test-01234567-cont-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present without explicit pull" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present without explicit pull" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2_pull: "Pull" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-without-explicit-pull',
+ '2.23.3',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Error \n'
+ "Error response from daemon: pull access denied for does-not-exist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n", # noqa: E501
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ "Error response from daemon: pull access denied for does-not-exist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied", # noqa: E501
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Present without explicit pull (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Present without explicit pull (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-present-without-explicit-pull-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Error \n'
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Restarted" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Restarted" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-restarted',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Restarting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Restarting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Restarted (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-restarted-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Restarting\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Restarting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Started" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Started" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-started',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Started (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Started (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-started-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Starting\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Started\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Stopped" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Stopped" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-stopped',
+ '2.23.3',
+ False,
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n'
+ '\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2: "Stopped (check)" on 2024-01-07 in devel-archlinux
+ # Duplicated in: docker_compose_v2: "Stopped (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-07-docker_compose_v2-stopped-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Running\n'
+ '\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopping\n'
+ ' DRY-RUN MODE - Container ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1 Stopped\n',
+ [
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Running',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopping',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ansible-docker-test-01234567-start-stop-ansible-docker-test-01234567-container-1',
+ 'Stopped',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2_pull-pull-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Error \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont - Pull error for image: does-not-exist:latest \n'
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed\n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Error',
+ 'pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2_pull-pull-with-policy=always',
+ '2.23.3',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=always (check)" on 2024-01-13 in devel-archlinux
+ # Duplicated in: docker_compose_v2_pull: "Pull with policy=missing (check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2_pull-pull-with-policy=always-(check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulling \n'
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=missing" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2_pull-pull-with-policy=missing',
+ '2.23.3',
+ False,
+ ' ansible-docker-test-01234567-cont Pulling \n'
+ ' 486039affc0a Pulling fs layer \n'
+ ' 486039affc0a Downloading [> ] 32.16kB/2.207MB\n'
+ ' 486039affc0a Verifying Checksum \n'
+ ' 486039affc0a Download complete \n'
+ ' 486039affc0a Extracting [> ] 32.77kB/2.207MB\n'
+ ' 486039affc0a Extracting [==========================================> ] 1.868MB/2.207MB\n'
+ ' 486039affc0a Extracting [==================================================>] 2.207MB/2.207MB\n'
+ ' 486039affc0a Pull complete \n'
+ ' ansible-docker-test-01234567-cont Pulled \n',
+ [
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulling',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pulling fs layer',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Verifying Checksum',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Download complete',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '486039affc0a',
+ 'Pull complete',
+ None,
+ ),
+ Event(
+ 'service',
+ 'ansible-docker-test-01234567-cont',
+ 'Pulled',
+ None,
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=missing (idempotent)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2_pull-pull-with-policy=missing-(idempotent)',
+ '2.23.3',
+ False,
+ ' ansible-docker-test-01234567-cont Skipped - Image is already present locally \n',
+ [
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Skipped',
+ 'Image is already present locally',
+ ),
+ ],
+ [],
+ ),
+ # docker_compose_v2_pull: "Pull with policy=missing (idempotent, check)" on 2024-01-13 in devel-archlinux
+ (
+ '2.23.3-devel-archlinux-2024-01-13-docker_compose_v2_pull-pull-with-policy=missing-(idempotent,-check)',
+ '2.23.3',
+ True,
+ ' DRY-RUN MODE - ansible-docker-test-01234567-cont Skipped - Image is already present locally \n',
+ [
+ Event(
+ 'unknown',
+ 'ansible-docker-test-01234567-cont',
+ 'Skipped',
+ 'Image is already present locally',
+ ),
+ ],
+ [],
+ ),
+]
diff --git a/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__logfmt.py b/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__logfmt.py
new file mode 100644
index 000000000..efcc15ff6
--- /dev/null
+++ b/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__logfmt.py
@@ -0,0 +1,100 @@
+# Copyright (c) 2024, Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import pytest
+
+from ansible_collections.community.docker.plugins.module_utils._logfmt import (
+ InvalidLogFmt,
+ parse_line,
+)
+
+
+SUCCESS_TEST_CASES = [
+ (
+ 'time="2024-02-02T08:14:10+01:00" level=warning msg="a network with name influxNetwork exists but was not'
+ ' created for project \\"influxdb\\".\\nSet `external: true` to use an existing network"',
+ {},
+ {
+ 'time': '2024-02-02T08:14:10+01:00',
+ 'level': 'warning',
+ 'msg': 'a network with name influxNetwork exists but was not created for project "influxdb".\nSet `external: true` to use an existing network',
+ },
+ ),
+ (
+ 'time="2024-02-02T08:14:10+01:00" level=warning msg="a network with name influxNetwork exists but was not'
+ ' created for project \\"influxdb\\".\\nSet `external: true` to use an existing network"',
+ {'logrus_mode': True},
+ {
+ 'time': '2024-02-02T08:14:10+01:00',
+ 'level': 'warning',
+ 'msg': 'a network with name influxNetwork exists but was not created for project "influxdb".\nSet `external: true` to use an existing network',
+ },
+ ),
+ (
+ 'foo=bar a=14 baz="hello kitty" cool%story=bro f %^asdf',
+ {},
+ {
+ 'foo': 'bar',
+ 'a': '14',
+ 'baz': 'hello kitty',
+ 'cool%story': 'bro',
+ 'f': None,
+ '%^asdf': None,
+ },
+ ),
+ (
+ '{"foo":"bar"}',
+ {},
+ {
+ '{': None,
+ 'foo': None,
+ ':': None,
+ 'bar': None,
+ '}': None,
+ },
+ ),
+]
+
+
+FAILURE_TEST_CASES = [
+ (
+ 'foo=bar a=14 baz="hello kitty" cool%story=bro f %^asdf',
+ {'logrus_mode': True},
+ 'Key must always be followed by "=" in logrus mode',
+ ),
+ (
+ '{}',
+ {'logrus_mode': True},
+ 'Key must always be followed by "=" in logrus mode',
+ ),
+ (
+ '[]',
+ {'logrus_mode': True},
+ 'Key must always be followed by "=" in logrus mode',
+ ),
+ (
+ '{"foo=bar": "baz=bam"}',
+ {'logrus_mode': True},
+ 'Key must always be followed by "=" in logrus mode',
+ ),
+]
+
+
+@pytest.mark.parametrize('line, kwargs, result', SUCCESS_TEST_CASES)
+def test_parse_line_success(line, kwargs, result):
+ res = parse_line(line, **kwargs)
+ print(repr(res))
+ assert res == result
+
+
+@pytest.mark.parametrize('line, kwargs, message', FAILURE_TEST_CASES)
+def test_parse_line_success(line, kwargs, message):
+ with pytest.raises(InvalidLogFmt) as exc:
+ parse_line(line, **kwargs)
+
+ print(repr(exc.value.args[0]))
+ assert exc.value.args[0] == message
diff --git a/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_compose_v2.py b/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_compose_v2.py
new file mode 100644
index 000000000..7292af2a7
--- /dev/null
+++ b/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_compose_v2.py
@@ -0,0 +1,242 @@
+# Copyright 2022 Red Hat | Ansible
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import pytest
+
+from ansible_collections.community.docker.plugins.module_utils.compose_v2 import (
+ Event,
+ parse_events,
+)
+
+from .compose_v2_test_cases import EVENT_TEST_CASES
+
+
+EXTRA_TEST_CASES = [
+ (
+ '2.24.2-manual-build-dry-run',
+ '2.24.2',
+ True,
+ ' DRY-RUN MODE - build service foobar \n'
+ ' DRY-RUN MODE - ==> ==> writing image dryRun-8843d7f92416211de9ebb963ff4ce28125932878 \n'
+ ' DRY-RUN MODE - ==> ==> naming to my-python \n'
+ ' DRY-RUN MODE - Network compose_default Creating\n'
+ ' DRY-RUN MODE - Network compose_default Created\n'
+ ' DRY-RUN MODE - Container compose-foobar-1 Creating\n'
+ ' DRY-RUN MODE - Container compose-foobar-1 Created\n'
+ ' DRY-RUN MODE - Container ompose-foobar-1 Starting\n'
+ ' DRY-RUN MODE - Container ompose-foobar-1 Started\n',
+ [
+ Event(
+ 'service',
+ 'foobar',
+ 'Building',
+ None,
+ ),
+ Event(
+ 'network',
+ 'compose_default',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'network',
+ 'compose_default',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'compose-foobar-1',
+ 'Creating',
+ None,
+ ),
+ Event(
+ 'container',
+ 'compose-foobar-1',
+ 'Created',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ompose-foobar-1',
+ 'Starting',
+ None,
+ ),
+ Event(
+ 'container',
+ 'ompose-foobar-1',
+ 'Started',
+ None,
+ ),
+ ],
+ [],
+ ),
+ (
+ # https://github.com/ansible-collections/community.docker/issues/785
+ '2.20.0-manual-pull',
+ '2.20.0',
+ False,
+ '4f4fb700ef54 Waiting\n'
+ '238022553356 Downloading 541B/541B\n'
+ '972e292d3a60 Downloading 106kB/10.43MB\n'
+ 'f2543dc9f0a9 Downloading 25.36kB/2.425MB\n'
+ '972e292d3a60 Downloading 5.925MB/10.43MB\n'
+ 'f2543dc9f0a9 Downloading 2.219MB/2.425MB\n'
+ 'f2543dc9f0a9 Extracting 32.77kB/2.425MB\n'
+ '4f4fb700ef54 Downloading 32B/32B\n'
+ 'f2543dc9f0a9 Extracting 2.425MB/2.425MB\n'
+ '972e292d3a60 Extracting 131.1kB/10.43MB\n'
+ '972e292d3a60 Extracting 10.43MB/10.43MB\n'
+ '238022553356 Extracting 541B/541B\n'
+ '4f4fb700ef54 Extracting 32B/32B\n',
+ [
+ Event(
+ 'image-layer',
+ '4f4fb700ef54',
+ 'Waiting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '238022553356',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '972e292d3a60',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ 'f2543dc9f0a9',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '972e292d3a60',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ 'f2543dc9f0a9',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ 'f2543dc9f0a9',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '4f4fb700ef54',
+ 'Downloading',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ 'f2543dc9f0a9',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '972e292d3a60',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '972e292d3a60',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '238022553356',
+ 'Extracting',
+ None,
+ ),
+ Event(
+ 'image-layer',
+ '4f4fb700ef54',
+ 'Extracting',
+ None,
+ ),
+ ],
+ [],
+ ),
+ (
+ # https://github.com/ansible-collections/community.docker/issues/787
+ '2.20.3-logrus-warn',
+ '2.20.3',
+ False,
+ 'time="2024-02-02T08:14:10+01:00" level=warning msg="a network with name influxNetwork exists but was not'
+ ' created for project \\"influxdb\\".\\nSet `external: true` to use an existing network"\n',
+ [],
+ [
+ 'a network with name influxNetwork exists but was not created for project "influxdb".\nSet `external: true` to use an existing network',
+ ],
+ ),
+ (
+ # https://github.com/ansible-collections/community.docker/issues/807
+ '2.20.3-image-warning-error',
+ '2.20.3',
+ False,
+ " dummy3 Warning \n"
+ " dummy2 Warning \n"
+ " dummy Error \n"
+ " dummy4 Warning Foo bar \n"
+ " dummy5 Error Bar baz bam \n",
+ [
+ Event(
+ 'unknown',
+ 'dummy',
+ 'Error',
+ None,
+ ),
+ Event(
+ 'unknown',
+ 'dummy5',
+ 'Error',
+ 'Bar baz bam',
+ ),
+ ],
+ [
+ 'Unspecified warning for dummy3',
+ 'Unspecified warning for dummy2',
+ 'dummy4: Foo bar',
+ ],
+ ),
+]
+
+_ALL_TEST_CASES = EVENT_TEST_CASES + EXTRA_TEST_CASES
+
+
+@pytest.mark.parametrize(
+ 'test_id, compose_version, dry_run, stderr, events, warnings',
+ _ALL_TEST_CASES,
+ ids=[tc[0] for tc in _ALL_TEST_CASES],
+)
+def test_parse_events(test_id, compose_version, dry_run, stderr, events, warnings):
+ collected_warnings = []
+
+ def collect_warning(msg):
+ collected_warnings.append(msg)
+
+ collected_events = parse_events(stderr, dry_run=dry_run, warn_function=collect_warning)
+
+ print(collected_events)
+ print(collected_warnings)
+
+ assert collected_events == events
+ assert collected_warnings == warnings
diff --git a/ansible_collections/community/docker/tests/unit/requirements.yml b/ansible_collections/community/docker/tests/unit/requirements.yml
index 586a6a1b3..e91ea4745 100644
--- a/ansible_collections/community/docker/tests/unit/requirements.yml
+++ b/ansible_collections/community/docker/tests/unit/requirements.yml
@@ -5,3 +5,4 @@
collections:
- community.internal_test_tools
+- community.library_inventory_filtering_v1
diff --git a/ansible_collections/community/docker/tests/utils/shippable/shippable.sh b/ansible_collections/community/docker/tests/utils/shippable/shippable.sh
index 2ca96b888..c824e2abf 100755
--- a/ansible_collections/community/docker/tests/utils/shippable/shippable.sh
+++ b/ansible_collections/community/docker/tests/utils/shippable/shippable.sh
@@ -65,22 +65,18 @@ else
retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check
fi
-if [ "${SHIPPABLE_BUILD_ID:-}" ]; then
- export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
- SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
- TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/docker"
- mkdir -p "${TEST_DIR}"
- cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}"
- cd "${TEST_DIR}"
-else
- export ANSIBLE_COLLECTIONS_PATHS="${PWD}/../../../"
-fi
+export ANSIBLE_COLLECTIONS_PATHS="${PWD}/../../../"
if [ "${test}" == "sanity/extra" ]; then
retry pip install junit-xml --disable-pip-version-check
fi
# START: HACK
+
+retry git clone --depth=1 --single-branch --branch stable-1 https://github.com/ansible-collections/community.library_inventory_filtering.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/library_inventory_filtering_v1"
+# NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
+# retry ansible-galaxy -vvv collection install community.library_inventory_filtering_v1
+
if [ "${test}" == "sanity/extra" ]; then
# Nothing further should be added to this list.
# This is to prevent modules or plugins in this collection having a runtime dependency on other collections.