diff --git a/openshift/release/ansible/ansible_collections/community.docker-3.10.3.info/GALAXY.yml b/openshift/release/ansible/ansible_collections/community.docker-3.10.3.info/GALAXY.yml new file mode 100644 index 00000000..92898feb --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community.docker-3.10.3.info/GALAXY.yml @@ -0,0 +1,8 @@ +download_url: https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-3.10.3.tar.gz +format_version: 1.0.0 +name: docker +namespace: community +server: https://galaxy.ansible.com/api/ +signatures: [] +version: 3.10.3 +version_url: /api/v3/plugin/ansible/content/published/collections/index/community/docker/versions/3.10.3/ diff --git a/openshift/release/ansible/ansible_collections/community.library_inventory_filtering_v1-1.0.1.info/GALAXY.yml b/openshift/release/ansible/ansible_collections/community.library_inventory_filtering_v1-1.0.1.info/GALAXY.yml new file mode 100644 index 00000000..61afad26 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community.library_inventory_filtering_v1-1.0.1.info/GALAXY.yml @@ -0,0 +1,8 @@ +download_url: https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-library_inventory_filtering_v1-1.0.1.tar.gz +format_version: 1.0.0 +name: library_inventory_filtering_v1 +namespace: community +server: https://galaxy.ansible.com/api/ +signatures: [] +version: 1.0.1 +version_url: /api/v3/plugin/ansible/content/published/collections/index/community/library_inventory_filtering_v1/versions/1.0.1/ diff --git a/openshift/release/ansible/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml b/openshift/release/ansible/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml index 2e5b1837..ae4197a4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml @@ -29,7 +29,7 @@ schedules: always: true branches: include: - - stable-* + - stable-2 variables: - name: checkoutPath @@ -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,39 +66,39 @@ stages: test: 'devel/sanity/extra' - name: Units test: 'devel/units/1' - - stage: Ansible_2_14 - displayName: Sanity & Units 2.14 + - stage: Ansible_2_17 + displayName: Sanity & Units 2.17 dependsOn: [] jobs: - template: templates/matrix.yml parameters: targets: - name: Sanity - test: '2.14/sanity/1' + test: '2.17/sanity/1' - name: Units - test: '2.14/units/1' - - stage: Ansible_2_13 - displayName: Sanity & Units 2.13 + test: '2.17/units/1' + - stage: Ansible_2_16 + displayName: Sanity & Units 2.16 dependsOn: [] jobs: - template: templates/matrix.yml parameters: targets: - name: Sanity - test: '2.13/sanity/1' + test: '2.16/sanity/1' - name: Units - test: '2.13/units/1' - - stage: Ansible_2_12 - displayName: Sanity & Units 2.12 + test: '2.16/units/1' + - stage: Ansible_2_15 + displayName: Sanity & Units 2.15 dependsOn: [] jobs: - template: templates/matrix.yml parameters: targets: - name: Sanity - test: '2.12/sanity/1' + test: '2.15/sanity/1' - name: Units - test: '2.12/units/1' + test: '2.15/units/1' ### Docker - stage: Docker_devel @@ -109,70 +109,68 @@ 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 test: ubuntu2204 - - name: Alpine 3 - test: alpine3 + - name: Alpine 3.19 + test: alpine319 groups: - 4 - 5 - - stage: Docker_2_14 - displayName: Docker 2.14 + - 6 + - stage: Docker_2_17 + displayName: Docker 2.17 dependsOn: [] jobs: - template: templates/matrix.yml parameters: - testFormat: 2.14/linux/{0} + testFormat: 2.17/linux/{0} targets: - - name: Fedora 36 - test: fedora36 + - name: Alpine 3.19 + test: alpine319 groups: - 4 - 5 - - stage: Docker_2_13 - displayName: Docker 2.13 + - 6 + - stage: Docker_2_16 + displayName: Docker 2.16 dependsOn: [] jobs: - template: templates/matrix.yml parameters: - testFormat: 2.13/linux/{0} + testFormat: 2.16/linux/{0} targets: + - name: Fedora 38 + test: fedora38 - name: CentOS 7 test: centos7 - - name: Fedora 35 - test: fedora35 - - name: openSUSE 15 py2 - test: opensuse15py2 + - name: openSUSE 15 + test: opensuse15 - name: Alpine 3 test: alpine3 groups: - 4 - 5 - - stage: Docker_2_12 - displayName: Docker 2.12 + - 6 + - stage: Docker_2_15 + displayName: Docker 2.15 dependsOn: [] jobs: - template: templates/matrix.yml parameters: - testFormat: 2.12/linux/{0} + testFormat: 2.15/linux/{0} targets: - - name: Fedora 33 - test: fedora33 - - name: Fedora 34 - test: fedora34 - - name: Ubuntu 18.04 - test: ubuntu1804 + - name: Fedora 37 + test: fedora37 + - name: CentOS 7 + test: centos7 groups: - 4 - 5 + - 6 ### Community Docker - stage: Docker_community_devel @@ -185,15 +183,14 @@ stages: targets: - name: Debian Bullseye test: debian-bullseye/3.9 + - name: Debian Bookworm + test: debian-bookworm/3.11 - name: ArchLinux - test: archlinux/3.10 - - 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 + test: archlinux/3.12 groups: - 4 - 5 + - 6 ### Remote - stage: Remote_devel @@ -204,58 +201,68 @@ stages: parameters: testFormat: devel/{0} targets: - - name: RHEL 7.9 - test: rhel/7.9 - - 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_14 - displayName: Remote 2.14 + # - 6 -- Docker 26 no longer works with docker-compose v1 + - stage: Remote_2_17 + displayName: Remote 2.17 dependsOn: [] jobs: - template: templates/matrix.yml parameters: - testFormat: 2.14/{0} + testFormat: 2.17/{0} targets: - - name: RHEL 9.0 - test: rhel/9.0 + - 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_13 - displayName: Remote 2.13 + # - 6 -- Docker 26 no longer works with docker-compose v1 + - stage: Remote_2_16 + displayName: Remote 2.16 dependsOn: [] jobs: - template: templates/matrix.yml parameters: - testFormat: 2.13/{0} + testFormat: 2.16/{0} targets: - - name: RHEL 8.5 - test: rhel/8.5 + - name: RHEL 9.2 + test: rhel/9.2 groups: - 1 - 2 - 3 - 4 - 5 - - stage: Remote_2_12 - displayName: Remote 2.12 + - stage: Remote_2_15 + displayName: Remote 2.15 dependsOn: [] jobs: - template: templates/matrix.yml parameters: - testFormat: 2.12/{0} + testFormat: 2.15/{0} targets: - - name: RHEL 8.4 - test: rhel/8.4 + - 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 @@ -269,17 +276,17 @@ stages: condition: succeededOrFailed() dependsOn: - Ansible_devel - - Ansible_2_14 - - Ansible_2_13 - - Ansible_2_12 + - Ansible_2_17 + - Ansible_2_16 + - Ansible_2_15 - Remote_devel - - Remote_2_14 - - Remote_2_13 - - Remote_2_12 + - Remote_2_17 + - Remote_2_16 + - Remote_2_15 - Docker_devel - - Docker_2_14 - - Docker_2_13 - - Docker_2_12 + - Docker_2_17 + - Docker_2_16 + - Docker_2_15 - Docker_community_devel jobs: - template: templates/coverage.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ansible-test.yml b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ansible-test.yml index dbd37733..d4778e09 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ansible-test.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ansible-test.yml @@ -18,6 +18,11 @@ on: schedule: - cron: '0 9 * * *' +concurrency: + # Make sure there is at most one active run per PR, but do not cancel any non-PR runs + group: ${{ github.workflow }}-${{ (github.head_ref && github.event.number) || github.run_id }} + cancel-in-progress: true + jobs: sanity: name: EOL Sanity (Ⓐ${{ matrix.ansible }}) @@ -25,6 +30,9 @@ jobs: matrix: ansible: - '2.11' + - '2.12' + - '2.13' + - '2.14' # 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 @@ -38,11 +46,14 @@ jobs: - name: Perform sanity testing uses: felixfontein/ansible-test-gh-action@main with: - ansible-core-github-repository-slug: felixfontein/ansible + ansible-core-github-repository-slug: ${{ contains(fromJson('["2.10", "2.11"]'), matrix.ansible) && 'felixfontein/ansible' || 'ansible/ansible' }} ansible-core-version: stable-${{ matrix.ansible }} + codecov-token: ${{ secrets.CODECOV_TOKEN }} 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. @@ -61,18 +72,22 @@ jobs: matrix: ansible: - '2.11' + - '2.12' + - '2.13' + - '2.14' 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: felixfontein/ansible + ansible-core-github-repository-slug: ${{ contains(fromJson('["2.10", "2.11"]'), matrix.ansible) && 'felixfontein/ansible' || 'ansible/ansible' }} ansible-core-version: stable-${{ matrix.ansible }} + codecov-token: ${{ secrets.CODECOV_TOKEN }} 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. @@ -96,6 +111,10 @@ jobs: - '' target: - '' + extra-constraints: + # Specifying this other than '' likely destroys change detection, but at least it will make + # CI pass when necessary... + - '' exclude: - ansible: '' include: @@ -108,24 +127,118 @@ jobs: docker: fedora32 python: '' target: azp/5/ + - ansible: '2.11' + docker: fedora32 + python: '' + target: azp/6/ - ansible: '2.11' docker: alpine3 python: '' target: azp/4/ + extra-constraints: urllib3 < 2.0.0 - ansible: '2.11' docker: alpine3 python: '' target: azp/5/ + - ansible: '2.11' + docker: alpine3 + python: '' + target: azp/6/ + # 2.12 + - ansible: '2.12' + docker: fedora33 + python: '' + target: azp/4/ + - ansible: '2.12' + docker: fedora33 + python: '' + target: azp/5/ + - ansible: '2.12' + docker: fedora33 + python: '' + target: azp/6/ + - ansible: '2.12' + docker: fedora34 + python: '' + target: azp/4/ + - ansible: '2.12' + docker: fedora34 + python: '' + target: azp/5/ + - ansible: '2.12' + docker: fedora34 + python: '' + target: azp/6/ + - ansible: '2.12' + docker: ubuntu1804 + python: '' + target: azp/4/ + - ansible: '2.12' + 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/ + # 2.14 + - ansible: '2.14' + docker: alpine3 + python: '' + target: azp/4/ + - ansible: '2.14' + docker: alpine3 + python: '' + target: azp/5/ + - ansible: '2.14' + 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: felixfontein/ansible + ansible-core-github-repository-slug: ${{ contains(fromJson('["2.10", "2.11"]'), matrix.ansible) && 'felixfontein/ansible' || 'ansible/ansible' }} ansible-core-version: stable-${{ matrix.ansible }} + codecov-token: ${{ secrets.CODECOV_TOKEN }} coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }} docker-image: ${{ matrix.docker }} integration-continue-on-error: 'false' @@ -139,6 +252,11 @@ 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 pull-request-change-detection: 'true' target: ${{ matrix.target }} target-python-version: ${{ matrix.python }} diff --git a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/docs-pr.yml b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/docs-pr.yml index efd4dcd9..74aad882 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/docs-pr.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/docs-pr.yml @@ -19,7 +19,7 @@ jobs: permissions: contents: read name: Build Ansible Docs - uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main + uses: felixfontein/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@base-ref with: collection-name: community.docker init-lenient: false @@ -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: '> * `$` [$](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$)' + extra-collections: community.library_inventory_filtering_v1 publish-docs-gh-pages: # for now we won't run this on forks diff --git a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/docs-push.yml b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/docs-push.yml index ccc32085..8ed0d874 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/docs-push.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ee.yml b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ee.yml index 9a1d74c8..d884f56e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ee.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/ee.yml @@ -22,25 +22,73 @@ env: jobs: build: - name: Build and test EE (Ⓐ${{ matrix.runner_tag }}) + name: Build and test EE (${{ matrix.name }}) strategy: + fail-fast: false matrix: - runner_tag: - - devel - - stable-2.12-latest - - stable-2.11-latest - - stable-2.9-latest + name: + - '' + ansible_core: + - '' + ansible_runner: + - '' + base_image: + - '' + pre_base: + - '' + extra_vars: + - '' + other_deps: + - '' + exclude: + - ansible_core: '' + include: + - 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 + ansible_core: https://github.com/ansible/ansible/archive/stable-2.15.tar.gz + ansible_runner: ansible-runner + base_image: quay.io/rockylinux/rockylinux:9 + pre_base: '"#"' + - name: ansible-core 2.14 @ CentOS Stream 9 + ansible_core: https://github.com/ansible/ansible/archive/stable-2.14.tar.gz + ansible_runner: ansible-runner + base_image: quay.io/centos/centos:stream9 + pre_base: '"#"' + - name: ansible-core 2.13 @ RHEL UBI 8 + ansible_core: https://github.com/ansible/ansible/archive/stable-2.13.tar.gz + ansible_runner: ansible-runner + other_deps: |2 + python_interpreter: + package_system: python39 python39-pip python39-wheel python39-cryptography + base_image: docker.io/redhat/ubi8:latest + pre_base: '"#"' + - name: ansible-core 2.12 @ CentOS Stream 8 + ansible_core: https://github.com/ansible/ansible/archive/stable-2.12.tar.gz + ansible_runner: ansible-runner + other_deps: |2 + python_interpreter: + package_system: python39 python39-pip python39-wheel python39-cryptography + base_image: quay.io/centos/centos:stream8 + pre_base: '"#"' 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.10' + python-version: '3.11' - name: Install ansible-builder and ansible-navigator run: pip install ansible-builder ansible-navigator @@ -74,11 +122,26 @@ jobs: # EE config cat > execution-environment.yml < requirements.yml < ansible-navigator run --mode stdout - --pull-policy never - --set-environment-variable ANSIBLE_PRIVATE_ROLE_VARS=true --container-engine docker --container-options=-v --container-options=/var/run/docker.sock:/var/run/docker.sock + --pull-policy never + --set-environment-variable ANSIBLE_PRIVATE_ROLE_VARS=true --execution-environment-image test-ee:latest -v all.yml + ${{ matrix.extra_vars }} working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/tests/ee diff --git a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/import-galaxy.yml b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/import-galaxy.yml new file mode 100644 index 00000000..0c0ee402 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/reuse.yml b/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/reuse.yml index 8d9ebde8..8064af14 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/.github/workflows/reuse.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.md b/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.md new file mode 100644 index 00000000..13d287f2 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.md @@ -0,0 +1,1507 @@ +# Docker Community Collection Release Notes + +**Topics** + +- v3\.10\.3 + - Release Summary + - Bugfixes +- v3\.10\.2 + - Release Summary + - Bugfixes +- v3\.10\.1 + - Release Summary + - Bugfixes + - Known Issues +- v3\.10\.0 + - Release Summary + - Minor Changes + - Deprecated Features +- v3\.9\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v3\.8\.1 + - Release Summary + - Security Fixes + - Bugfixes +- v3\.8\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v3\.7\.0 + - Release Summary + - Minor Changes + - Bugfixes + - New Modules +- v3\.6\.0 + - Release Summary + - Major Changes + - Minor Changes + - Bugfixes + - New Modules +- v3\.5\.0 + - Release Summary + - Minor Changes + - Deprecated Features + - Bugfixes +- v3\.4\.11 + - Release Summary + - Bugfixes +- v3\.4\.10 + - Release Summary + - Bugfixes +- v3\.4\.9 + - Release Summary + - Bugfixes +- v3\.4\.8 + - Release Summary + - Known Issues +- v3\.4\.7 + - Release Summary + - Bugfixes +- v3\.4\.6 + - Release Summary + - Bugfixes + - Known Issues +- v3\.4\.5 + - Release Summary + - Bugfixes +- v3\.4\.4 + - Release Summary + - Minor Changes + - Known Issues +- v3\.4\.3 + - Release Summary +- v3\.4\.2 + - Release Summary + - Bugfixes +- v3\.4\.1 + - Release Summary + - Bugfixes +- v3\.4\.0 + - Release Summary + - Minor Changes + - Bugfixes + - New Modules +- v3\.3\.2 + - Release Summary + - Bugfixes +- v3\.3\.1 + - Release Summary + - Bugfixes +- v3\.3\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v3\.2\.2 + - Release Summary + - Bugfixes +- v3\.2\.1 + - Release Summary +- v3\.2\.0 + - Release Summary + - Minor Changes + - Deprecated Features +- v3\.1\.0 + - Release Summary + - Minor Changes +- v3\.0\.2 + - Release Summary + - Bugfixes +- v3\.0\.1 + - Release Summary + - Bugfixes +- v3\.0\.0 + - Release Summary + - Major Changes + - Minor Changes + - Breaking Changes / Porting Guide + - Removed Features \(previously deprecated\) + - Security Fixes + - Bugfixes +- v2\.7\.0 + - Release Summary + - Minor Changes + - Deprecated Features + - Bugfixes +- v2\.6\.0 + - Release Summary + - Minor Changes + - Deprecated Features + - Bugfixes +- v2\.5\.1 + - Release Summary + - Bugfixes +- v2\.5\.0 + - Release Summary + - Minor Changes +- v2\.4\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v2\.3\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v2\.2\.1 + - Release Summary + - Bugfixes +- v2\.2\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v2\.1\.1 + - Release Summary + - Bugfixes +- v2\.1\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v2\.0\.2 + - Release Summary + - Bugfixes +- v2\.0\.1 + - Release Summary +- v2\.0\.0 + - Release Summary + - Breaking Changes / Porting Guide + - Deprecated Features + - Removed Features \(previously deprecated\) +- v1\.10\.0 + - Release Summary + - Minor Changes +- v1\.9\.1 + - Release Summary + - Bugfixes +- v1\.9\.0 + - Release Summary + - Minor Changes + - Deprecated Features + - Bugfixes + - New Plugins + - Connection +- v1\.8\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v1\.7\.0 + - Release Summary + - Minor Changes +- v1\.6\.1 + - Release Summary + - Bugfixes +- v1\.6\.0 + - Release Summary + - Minor Changes + - Deprecated Features + - Bugfixes +- v1\.5\.0 + - Release Summary + - Minor Changes + - Bugfixes + - New Modules +- v1\.4\.0 + - Release Summary + - Minor Changes + - Breaking Changes / Porting Guide + - Security Fixes + - Bugfixes +- v1\.3\.0 + - Release Summary + - Minor Changes + - Bugfixes + - New Modules +- v1\.2\.2 + - Release Summary + - Security Fixes +- v1\.2\.1 + - Release Summary + - Bugfixes +- v1\.2\.0 + - Release Summary + - Minor Changes + - Bugfixes +- v1\.1\.0 + - Release Summary + - Minor Changes + - Deprecated Features + - Bugfixes + - New Plugins + - Connection + - Inventory + - New Modules +- v1\.0\.1 + - Release Summary + - Bugfixes +- v1\.0\.0 + - Release Summary + - Minor Changes +- v0\.1\.0 + - Release Summary + - Minor Changes + - Removed Features \(previously deprecated\) + - Bugfixes + + +## v3\.10\.3 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* docker and nsenter connection plugins\, docker\_container\_exec module \- avoid using the deprecated ansible\.module\_utils\.compat\.selectors module util with Python 3 \([https\://github\.com/ansible\-collections/community\.docker/issues/870](https\://github\.com/ansible\-collections/community\.docker/issues/870)\, [https\://github\.com/ansible\-collections/community\.docker/pull/871](https\://github\.com/ansible\-collections/community\.docker/pull/871)\)\. + + +## v3\.10\.2 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* vendored Docker SDK for Python \- include a fix requests 2\.32\.2\+ compatibility \([https\://github\.com/ansible\-collections/community\.docker/issues/860](https\://github\.com/ansible\-collections/community\.docker/issues/860)\, [https\://github\.com/psf/requests/issues/6707](https\://github\.com/psf/requests/issues/6707)\, [https\://github\.com/ansible\-collections/community\.docker/pull/864](https\://github\.com/ansible\-collections/community\.docker/pull/864)\)\. + + +## v3\.10\.1 + + +### Release Summary + +Hotfix release for requests 2\.32\.0 compatibility\. + + +### Bugfixes + +* vendored Docker SDK for Python \- include a hotfix for requests 2\.32\.0 compatibility \([https\://github\.com/ansible\-collections/community\.docker/issues/860](https\://github\.com/ansible\-collections/community\.docker/issues/860)\, [https\://github\.com/docker/docker\-py/issues/3256](https\://github\.com/docker/docker\-py/issues/3256)\, [https\://github\.com/ansible\-collections/community\.docker/pull/861](https\://github\.com/ansible\-collections/community\.docker/pull/861)\)\. + + +### Known Issues + +* Please note that the fix for requests 2\.32\.0 included in community\.docker 3\.10\.1 only + fixes problems with the vendored Docker SDK for Python code\. Modules and plugins that + use Docker SDK for Python can still fail due to the SDK currently being incompatible + with requests 2\.32\.0\. + + If you still experience problems with requests 2\.32\.0\, such as error messages like + Not supported URL scheme http\+docker\, please restrict requests to \<2\.32\.0\. + + +## v3\.10\.0 + + +### Release Summary + +Feature release\. + + +### Minor Changes + +* docker\_container \- adds healthcheck\.start\_interval to support healthcheck start interval setting on containers \([https\://github\.com/ansible\-collections/community\.docker/pull/848](https\://github\.com/ansible\-collections/community\.docker/pull/848)\)\. +* docker\_container \- adds healthcheck\.test\_cli\_compatible to allow omit test option on containers without remove existing image test \([https\://github\.com/ansible\-collections/community\.docker/pull/847](https\://github\.com/ansible\-collections/community\.docker/pull/847)\)\. +* docker\_image\_build \- add outputs option to allow configuring outputs for the build \([https\://github\.com/ansible\-collections/community\.docker/pull/852](https\://github\.com/ansible\-collections/community\.docker/pull/852)\)\. +* docker\_image\_build \- add secrets option to allow passing secrets to the build \([https\://github\.com/ansible\-collections/community\.docker/pull/852](https\://github\.com/ansible\-collections/community\.docker/pull/852)\)\. +* docker\_image\_build \- allow platform to be a list of platforms instead of only a single platform for multi\-platform builds \([https\://github\.com/ansible\-collections/community\.docker/pull/852](https\://github\.com/ansible\-collections/community\.docker/pull/852)\)\. +* docker\_network \- adds config\_only and config\_from to support creating and using config only networks \([https\://github\.com/ansible\-collections/community\.docker/issues/395](https\://github\.com/ansible\-collections/community\.docker/issues/395)\)\. +* docker\_prune \- add new options builder\_cache\_all\, builder\_cache\_filters\, and builder\_cache\_keep\_storage\, and a new return value builder\_cache\_caches\_deleted for pruning build caches \([https\://github\.com/ansible\-collections/community\.docker/issues/844](https\://github\.com/ansible\-collections/community\.docker/issues/844)\, [https\://github\.com/ansible\-collections/community\.docker/issues/845](https\://github\.com/ansible\-collections/community\.docker/issues/845)\)\. +* docker\_swarm\_service \- adds sysctls to support sysctl settings on swarm services \([https\://github\.com/ansible\-collections/community\.docker/issues/190](https\://github\.com/ansible\-collections/community\.docker/issues/190)\)\. + + +### Deprecated Features + +* docker\_compose \- the Docker Compose v1 module is deprecated and will be removed from community\.docker 4\.0\.0\. Please migrate to the community\.docker\.docker\_compose\_v2 module\, which works with Docker Compose v2 \([https\://github\.com/ansible\-collections/community\.docker/issues/823](https\://github\.com/ansible\-collections/community\.docker/issues/823)\, [https\://github\.com/ansible\-collections/community\.docker/pull/833](https\://github\.com/ansible\-collections/community\.docker/pull/833)\)\. +* various modules and plugins \- the ssl\_version option has been deprecated and will be removed from community\.docker 4\.0\.0\. It has already been removed from Docker SDK for Python 7\.0\.0\, and was only necessary in the past to work around SSL/TLS issues \([https\://github\.com/ansible\-collections/community\.docker/pull/853](https\://github\.com/ansible\-collections/community\.docker/pull/853)\)\. + + +## v3\.9\.0 + + +### Release Summary + +Bugfix and feature release\. + + +### Minor Changes + +* The EE requirements now include PyYAML\, since the docker\_compose\_v2\* modules depend on it when the definition option is used\. This should not have a noticable effect on generated EEs since ansible\-core itself depends on PyYAML as well\, and ansible\-builder explicitly ignores this dependency \([https\://github\.com/ansible\-collections/community\.docker/pull/832](https\://github\.com/ansible\-collections/community\.docker/pull/832)\)\. +* docker\_compose\_v2\* \- the new option check\_files\_existing allows to disable the check for one of the files compose\.yaml\, compose\.yml\, docker\-compose\.yaml\, and docker\-compose\.yml in project\_src if files is not specified\. This is necessary if a non\-standard compose filename is specified through other means\, like the COMPOSE\_FILE environment variable \([https\://github\.com/ansible\-collections/community\.docker/issues/838](https\://github\.com/ansible\-collections/community\.docker/issues/838)\, [https\://github\.com/ansible\-collections/community\.docker/pull/839](https\://github\.com/ansible\-collections/community\.docker/pull/839)\)\. +* docker\_compose\_v2\* modules \- allow to provide an inline definition of the compose content instead of having to provide a project\_src directory with the compose file written into it \([https\://github\.com/ansible\-collections/community\.docker/issues/829](https\://github\.com/ansible\-collections/community\.docker/issues/829)\, [https\://github\.com/ansible\-collections/community\.docker/pull/832](https\://github\.com/ansible\-collections/community\.docker/pull/832)\)\. +* vendored Docker SDK for Python \- remove unused code that relies on functionality deprecated in Python 3\.12 \([https\://github\.com/ansible\-collections/community\.docker/pull/834](https\://github\.com/ansible\-collections/community\.docker/pull/834)\)\. + + +### Bugfixes + +* docker\_compose\_v2\* \- allow project\_src to be a relative path\, by converting it to an absolute path before using it \([https\://github\.com/ansible\-collections/community\.docker/issues/827](https\://github\.com/ansible\-collections/community\.docker/issues/827)\, [https\://github\.com/ansible\-collections/community\.docker/pull/828](https\://github\.com/ansible\-collections/community\.docker/pull/828)\)\. +* docker\_compose\_v2\* modules \- abort with a nice error message instead of crash when the Docker Compose CLI plugin version is dev \([https\://github\.com/ansible\-collections/community\.docker/issues/825](https\://github\.com/ansible\-collections/community\.docker/issues/825)\, [https\://github\.com/ansible\-collections/community\.docker/pull/826](https\://github\.com/ansible\-collections/community\.docker/pull/826)\)\. +* inventory plugins \- add unsafe wrapper to avoid marking strings that do not contain \{ or \} as unsafe\, to work around a bug in AWX \([https\://github\.com/ansible\-collections/community\.docker/pull/835](https\://github\.com/ansible\-collections/community\.docker/pull/835)\)\. + + +## 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\://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)\)\. + + +### 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/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 Warning 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 logfmt 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 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/issues/813)\, [https\://github\.com/ansible\-collections/community\.docker/pull/814](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/issues/794)\, [https\://github\.com/ansible\-collections/community\.docker/pull/796](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/issues/792)\, [https\://github\.com/ansible\-collections/community\.docker/pull/797](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/issues/783)\, [https\://github\.com/ansible\-collections/community\.docker/pull/797](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](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/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)\)\. + + +## 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](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/issues/772)\, [https\://github\.com/ansible\-collections/community\.docker/pull/775](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/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 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](https\://github\.com/ansible\-collections/community\.docker/pull/773)\)\. + + +### New Modules + +* community\.docker\.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](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](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](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](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/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 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/pull/698)\, [https\://github\.com/ansible\-collections/community\.docker/issues/610](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](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)\)\. + + +### New Modules + +* community\.docker\.docker\_compose\_v2 \- Manage multi\-container Docker applications with Docker Compose CLI plugin +* community\.docker\.docker\_compose\_v2\_pull \- Pull a Docker compose project +* community\.docker\.docker\_image\_build \- Build Docker images using Docker buildx +* 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 + + +## 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/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)\)\. + + +### 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](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](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](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](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](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/issues/695)\, [https\://github\.com/ansible\-collections/community\.docker/pull/696](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](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/](https\://docs\.ansible\.com/ansible/devel/collections/community/docker/)\. + + +## v3\.4\.7 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* docker\_swarm\_info \- if service\=true 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)\)\. + + +## v3\.4\.6 + + +### Release Summary + +Bugfix release with documentation warnings about using certain functionality when connecting to the Docker daemon with TCP TLS\. + + +### 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 poll\(\) instead of select\(\) except on Windows \([https\://github\.com/ansible\-collections/community\.docker/pull/619](https\://github\.com/ansible\-collections/community\.docker/pull/619)\)\. + + +### Known Issues + +* docker\_api connection plugin \- does not work with TCP TLS sockets\! This is caused by the inability to send an close\_notify TLS alert without closing the connection with Python\'s SSLSocket \([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 not work with TCP TLS sockets when the stdin option is used\! This is caused by the inability to send an close\_notify TLS alert without closing the connection with Python\'s SSLSocket \([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)\)\. + + +## v3\.4\.5 + + +### Release Summary + +Maintenance release which adds compatibility with requests 2\.29\.0 and 2\.30\.0 and urllib3 2\.0\. + + +### 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)\)\. + + +## v3\.4\.4 + + +### Release Summary + +Maintenance release with updated EE requirements and updated documentation\. + + +### 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)\)\. + + +### 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)\)\. + + +## v3\.4\.3 + + +### Release Summary + +Maintenance release with improved documentation\. + + +## v3\.4\.2 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* docker\_prune \- return correct value for changed\. 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)\)\. + + +## v3\.4\.1 + + +### Release Summary + +Regular bugfix release\. + + +### 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 tmfs\_size and tmpfs\_mode 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)\)\. + + +## v3\.4\.0 + + +### Release Summary + +Regular bugfix and feature release\. + + +### 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 containers\_all \([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)\)\. + + +### 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 DOCKER\_TIMEOUT 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)\)\. + + +### New Modules + +* community\.docker\.docker\_container\_copy\_into \- Copy a file into a Docker container + + +## v3\.3\.2 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* docker\_container \- when detach\=false\, 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)\)\. + + +## v3\.3\.1 + + +### Release Summary + +Bugfix release\. + + +### 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)\)\. + + +## v3\.3\.0 + + +### Release Summary + +Feature and bugfix release\. + + +### 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 archive\_path\, 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)\)\. + + +### Bugfixes + +* docker\_container\_exec \- fix chdir 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)\)\. + + +## v3\.2\.2 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* docker\_container \- the kill\_signal 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)\)\. + + +## v3\.2\.1 + + +### Release Summary + +Maintenance release with improved documentation\. + + +## v3\.2\.0 + + +### Release Summary + +Feature and deprecation release\. + + +### Minor Changes + +* docker\_container \- added image\_name\_mismatch 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)\)\. + + +### Deprecated Features + +* docker\_container \- the ignore\_image option is deprecated and will be removed in community\.docker 4\.0\.0\. Use image\: ignore in comparisons instead \([https\://github\.com/ansible\-collections/community\.docker/pull/487](https\://github\.com/ansible\-collections/community\.docker/pull/487)\)\. +* docker\_container \- the purge\_networks option is deprecated and will be removed in community\.docker 4\.0\.0\. Use networks\: strict in comparisons instead\, and make sure to provide networks\, with value \[\] if all networks should be removed \([https\://github\.com/ansible\-collections/community\.docker/pull/487](https\://github\.com/ansible\-collections/community\.docker/pull/487)\)\. + + +## v3\.1\.0 + + +### Release Summary + +Feature release\. + + +### 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 data\_path\_port parameter when initializing a swarm \([https\://github\.com/ansible\-collections/community\.docker/issues/296](https\://github\.com/ansible\-collections/community\.docker/issues/296)\)\. + + +## v3\.0\.2 + + +### Release Summary + +Bugfix release\. + + +### 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)\)\. + + +## v3\.0\.1 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* docker\_container \- fix handling of env\_file \([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)\)\. + + +## v3\.0\.0 + + +### Release Summary + +The 3\.0\.0 release features a rewrite of the docker\_container module\, and many modules and plugins no longer depend on the Docker SDK for Python\. + + +### 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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 requests 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)\)\. + + +### Minor Changes + +* All software licenses are now in the LICENSES/ directory of the collection root\. Moreover\, SPDX\-License\-Identifier\: 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 distutils\.version in favor of vendored copy included 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](https\://github\.com/ansible\-collections/community\.docker/pull/271)\)\. +* docker\_container \- add a new parameter image\_comparison 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 cgroupns\_mode \([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 platform \([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)\)\. + + +### 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 \- exposed\_ports is no longer ignored in comparisons\. Before\, its value was assumed to be identical with the value of published\_ports \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\. +* docker\_container \- log\_options can no longer be specified when log\_driver is not specified \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\. +* docker\_container \- publish\_all\_ports is no longer ignored in comparisons \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\. +* docker\_container \- restart\_retries can no longer be specified when restart\_policy is not specified \([https\://github\.com/ansible\-collections/community\.docker/pull/422](https\://github\.com/ansible\-collections/community\.docker/pull/422)\)\. +* docker\_container \- stop\_timeout is no longer ignored for idempotency if told to be not ignored in comparisons\. So far it defaulted to ignore there\, and setting it to strict 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 use\_ssh\_client\=true\, 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)\)\. + + +### 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 docker\_compose 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 tls\_hostname \(localhost\) has been removed\. If you want to continue using localhost\, 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 all value is no longer allowed in published\_ports\. Use publish\_all\_ports\=true instead \([https\://github\.com/ansible\-collections/community\.docker/pull/399](https\://github\.com/ansible\-collections/community\.docker/pull/399)\)\. +* docker\_container \- the default of command\_handling was changed from compatibility to correct\. 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 out and err have been removed\. Use stdout and stderr instead \([https\://github\.com/ansible\-collections/community\.docker/pull/363](https\://github\.com/ansible\-collections/community\.docker/pull/363)\)\. + + +### Security Fixes + +* modules and plugins communicating directly with the Docker daemon \- when connecting by SSH and not using use\_ssh\_client\=true\, 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)\)\. + + +### Bugfixes + +* docker\_image \- when composing the build context\, trim trailing whitespace from \.dockerignore 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 compose 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 use\_ssh\_client\=true\. 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 ProxyCommand handling for SSH connections when not using use\_ssh\_client\=true\. 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 docker\_host\. 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)\)\. + + +## v2\.7\.0 + + +### 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\. + + +### Minor Changes + +* Move common utility functions from the common module\_util to a new module\_util called util\. 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)\)\. + + +### 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 docker\_container\, docker\_container\_exec\, docker\_container\_info\, docker\_compose\, docker\_login\, docker\_image\, docker\_image\_info\, docker\_image\_load\, docker\_host\_info\, docker\_network\, docker\_network\_info\, docker\_node\_info\, docker\_swarm\_info\, docker\_swarm\_service\, docker\_swarm\_service\_info\, docker\_volume\_info\, and docker\_volume\, 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)\)\. + + +### 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)\)\. + + +## v2\.6\.0 + + +### Release Summary + +Bugfix and feature release\. + + +### Minor Changes + +* docker\_container \- added image\_label\_mismatch 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)\)\. + + +### 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 tls\_hostname 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 out and err 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)\)\. + + +### 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)\)\. + + +## v2\.5\.1 + + +### Release Summary + +Maintenance release\. + + +### Bugfixes + +* Include PSF\-license\.txt file for plugins/module\_utils/\_version\.py\. + + +## v2\.5\.0 + + +### Release Summary + +Regular feature release\. + + +### Minor Changes + +* docker\_config \- add support for template\_driver with one option golang \([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 data\_path\_addr 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)\)\. + + +## v2\.4\.0 + + +### Release Summary + +Regular feature and bugfix release\. + + +### Minor Changes + +* Prepare collection for inclusion in an Execution Environment by declaring its dependencies\. The docker\_stack\* 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 local 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)\)\. + + +### Bugfixes + +* docker connection plugin \- make sure that docker\_extra\_args 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)\)\. + + +## v2\.3\.0 + + +### Release Summary + +Regular feature and bugfix release\. + + +### 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 actual\_user 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 ANSIBLE\_DOCKER\_TIMEOUT environment variable\, the timeout setting in the docker\_connection section of ansible\.cfg\, and the ansible\_docker\_timeout 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 ANSIBLE\_DOCKER\_TIMEOUT environment variable\, the timeout setting in the docker\_connection section of ansible\.cfg\, and the ansible\_docker\_timeout variable \([https\://github\.com/ansible\-collections/community\.docker/pull/308](https\://github\.com/ansible\-collections/community\.docker/pull/308)\)\. + + +### 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)\)\. + + +## v2\.2\.1 + + +### Release Summary + +Regular bugfix release\. + + +### 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)\)\. + + +## v2\.2\.0 + + +### Release Summary + +Regular feature and bugfix release\. + + +### Minor Changes + +* docker\_config \- add support for rolling update\, set rolling\_versions to true 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 rolling\_versions to true 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 cap\_add and cap\_drop parameters\. Usage is the same as with the capabilities and cap\_drop parameters for docker\_container \([https\://github\.com/ansible\-collections/community\.docker/pull/294](https\://github\.com/ansible\-collections/community\.docker/pull/294)\)\. + + +### Bugfixes + +* 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](https\://github\.com/ansible\-collections/community\.docker/issues/292)\)\. + + +## v2\.1\.1 + + +### Release Summary + +Emergency release to amend breaking change in previous release\. + + +### 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 distutils\.version 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)\)\. + + +## v2\.1\.0 + + +### Release Summary + +Feature and bugfix release\. + + +### Minor Changes + +* docker\_container\_exec \- add detach 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 env 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)\)\. + + +### Bugfixes + +* Various modules and plugins \- use vendored version of distutils\.version included in ansible\-core 2\.12 if available\. This avoids breakage when distutils 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 distutils\.spawn\.find\_executable with Ansible\'s get\_bin\_path to find the docker 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 chdir 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)\)\. + + +## v2\.0\.2 + + +### Release Summary + +Bugfix release\. + + +### 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 \- 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/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 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](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](https\://github\.com/ansible\-collections/community\.docker/pull/249)\)\. + + +## v2\.0\.1 + + +### Release Summary + +Maintenance release with some documentation fixes\. + + +## v2\.0\.0 + + +### Release Summary + +New major release with some deprecations removed and a breaking change in the docker\_compose module regarding the timeout parameter\. + + +### Breaking Changes / Porting Guide + +* docker\_compose \- fixed timeout defaulting behavior so that stop\_grace\_period\, if defined in the compose file\, will be used if timeout is not specified \([https\://github\.com/ansible\-collections/community\.docker/pull/163](https\://github\.com/ansible\-collections/community\.docker/pull/163)\)\. + + +### Deprecated Features + +* docker\_container \- using the special value all in published\_ports has been deprecated\. Use publish\_all\_ports\=true instead \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\. + + +### Removed Features \(previously deprecated\) + +* docker\_container \- the default value of container\_default\_behavior changed to no\_defaults \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\. +* docker\_container \- the default value of network\_mode is now the name of the first network specified in networks if such are specified and networks\_cli\_compatible\=true \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\. +* docker\_container \- the special value all can no longer be used in published\_ports next to other values\. Please use publish\_all\_ports\=true instead \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\. +* docker\_login \- removed the email option \([https\://github\.com/ansible\-collections/community\.docker/pull/210](https\://github\.com/ansible\-collections/community\.docker/pull/210)\)\. + + +## v1\.10\.0 + + +### Release Summary + +Regular feature and bugfix release\. + + +### Minor Changes + +* Add the modules docker\_container\_exec\, docker\_image\_load and docker\_plugin to the docker 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 data\_src 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 data\_src 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)\)\. + + +## v1\.9\.1 + + +### Release Summary + +Regular bugfix release\. + + +### Bugfixes + +* docker\_compose \- fixed incorrect changed status for services with profiles defined\, but none enabled \([https\://github\.com/ansible\-collections/community\.docker/pull/192](https\://github\.com/ansible\-collections/community\.docker/pull/192)\)\. + + +## v1\.9\.0 + + +### Release Summary + +New bugfixes and features release\. + + +### Minor Changes + +* docker\_\* modules \- include ImportError 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 env\_file 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 publish\_all\_ports option to publish all exposed ports to random ports except those explicitly bound with published\_ports \(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 command\_handling option with current deprecated default value compatibility 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 correct 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 mounts option \([https\://github\.com/ansible\-collections/community\.docker/pull/181](https\://github\.com/ansible\-collections/community\.docker/pull/181)\)\. + + +### Deprecated Features + +* docker\_container \- the new command\_handling\'s default value\, compatibility\, is deprecated and will change to correct 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)\)\. + + +### Bugfixes + +* docker\_compose \- fixes task failures when bringing up services while using docker\-compose \<1\.17\.0 \([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 container on detached\=false 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)\)\. + + +### New Plugins + + +#### Connection + +* community\.docker\.nsenter \- execute on host running controller container + + +## v1\.8\.0 + + +### Release Summary + +Regular bugfix and feature release\. + + +### 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 profiles 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 connection\_type\=docker\-api\, now pass Docker daemon connection options from inventory plugin to connection plugin\. This can be disabled by setting configure\_docker\_daemon\=false \([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 containers\_filters\, images\_filters\, networks\_filters\, and volumes\_filters 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 alias 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)\)\. + + +### Bugfixes + +* docker\_compose \- fix idempotence bug when using stopped\: true \([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)\)\. + + +## v1\.7\.0 + + +### Release Summary + +Small feature and bugfix release\. + + +### 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)\)\. + + +## v1\.6\.1 + + +### Release Summary + +Bugfix release to reduce deprecation warning spam\. + + +### Bugfixes + +* docker\_\* modules and plugins\, except docker\_swarm connection plugin and docker\_compose and docker\_stack\*\` modules \- only emit \`\`tls\_hostname 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)\)\. + + +## v1\.6\.0 + + +### Release Summary + +Regular bugfix and feature release\. + + +### 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 memory\_swap\: \-1 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 memory \([https\://github\.com/ansible\-collections/community\.docker/pull/138](https\://github\.com/ansible\-collections/community\.docker/pull/138)\)\. + + +### Deprecated Features + +* docker\_\* modules and plugins\, except docker\_swarm connection plugin and docker\_compose and docker\_stack\*\` modules \- the current default \`\`localhost for tls\_hostname is deprecated\. In community\.docker 2\.0\.0 it will be computed from docker\_host instead \([https\://github\.com/ansible\-collections/community\.docker/pull/134](https\://github\.com/ansible\-collections/community\.docker/pull/134)\)\. + + +### Bugfixes + +* docker\-compose \- fix not pulling when state\: present and stopped\: true \([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 published\_port 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)\)\. + + +## v1\.5\.0 + + +### Release Summary + +Regular feature release\. + + +### Minor Changes + +* Add the use\_ssh\_client 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)\)\. + + +### Bugfixes + +* all modules \- use to\_native to convert exceptions to strings \([https\://github\.com/ansible\-collections/community\.docker/pull/121](https\://github\.com/ansible\-collections/community\.docker/pull/121)\)\. + + +### New Modules + +* community\.docker\.docker\_container\_exec \- Execute command in a docker container + + +## v1\.4\.0 + + +### Release Summary + +Security release to address another potential secret leak\. Also includes regular bugfixes and features\. + + +### Minor Changes + +* docker\_swarm\_service \- change publish\.published\_port 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)\)\. + + +### Breaking Changes / Porting Guide + +* docker\_swarm \- if join\_token is specified\, a returned join token with the same value will be replaced by VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER\. Make sure that you do not blindly use the join tokens from the return value of this module when the module is invoked with join\_token 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)\)\. + + +### Security Fixes + +* docker\_swarm \- the join\_token option is now marked as no\_log 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)\)\. + + +### Bugfixes + +* docker\_swarm\_service \- fix KeyError on caused by reference to deprecated option update\_failure\_action \([https\://github\.com/ansible\-collections/community\.docker/pull/100](https\://github\.com/ansible\-collections/community\.docker/pull/100)\)\. +* docker\_swarm\_service \- mark secrets module option with no\_log\=False since it does not leak secrets \([https\://github\.com/ansible\-collections/community\.general/pull/2001](https\://github\.com/ansible\-collections/community\.general/pull/2001)\)\. + + +## v1\.3\.0 + + +### Release Summary + +Regular feature and bugfix release\. + + +### Minor Changes + +* docker\_container \- add storage\_opts 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 source\=pull with new option pull\_platform \([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 \(replicas\_max\_per\_node\) 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)\)\. + + +### 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)\)\. + + +### New Modules + +* community\.docker\.docker\_image\_load \- Load docker image\(s\) from archives +* community\.docker\.docker\_plugin \- Manage Docker plugins + + +## v1\.2\.2 + + +### Release Summary + +Security bugfix release to address CVE\-2021\-20191\. + + +### Security Fixes + +* docker\_swarm \- enabled no\_log for the option signing\_ca\_key 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)\)\. + + +## v1\.2\.1 + + +### Release Summary + +Bugfix release\. + + +### Bugfixes + +* docker connection plugin \- fix Docker version parsing\, as some docker versions have a leading v in the output of the command docker version \-\-format \"\{\{\.Server\.Version\}\}\" \([https\://github\.com/ansible\-collections/community\.docker/pull/76](https\://github\.com/ansible\-collections/community\.docker/pull/76)\)\. + + +## v1\.2\.0 + + +### Release Summary + +Feature release with one new feature and two bugfixes\. + + +### Minor Changes + +* docker\_container \- added default\_host\_ip 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 \(\"\"\) \([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)\)\. + + +### 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)\)\. + + +## v1\.1\.0 + + +### Release Summary + +Feature release with three new plugins and modules\. + + +### Minor Changes + +* docker\_container \- support specifying cgroup\_parent \([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 detached\=false\, status 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 platform 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)\)\. + + +### Deprecated Features + +* docker\_container \- currently published\_ports can contain port mappings next to the special value all\, 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)\)\. + + +### Bugfixes + +* docker\_image \- if push\=true is used with repository\, and the image does not need to be tagged\, still push\. This can happen if repository and name are equal \([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)\)\. + + +### New Plugins + + +#### Connection + +* community\.docker\.docker\_api \- Run tasks in docker containers + + +#### Inventory + +* community\.docker\.docker\_containers \- Ansible dynamic inventory plugin for Docker containers\. + + +### New Modules + +* community\.docker\.current\_container\_facts \- Return facts about whether the module runs in a Docker container + + +## v1\.0\.1 + + +### Release Summary + +Maintenance release with a bugfix for docker\_container\. + + +### Bugfixes + +* docker\_container \- the validation for capabilities in device\_requests 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)\)\. + + +## v1\.0\.0 + + +### Release Summary + +This is the first production \(non\-prerelease\) release of community\.docker\. + + +### Minor Changes + +* Add collection\-side support of the docker 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 ansible\_key label but the force 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)\)\. + + +## v0\.1\.0 + + +### Release Summary + +The community\.docker continues the work on the Ansible docker modules and plugins from their state in community\.general 1\.2\.0\. The changes listed here are thus relative to the modules and plugins community\.general\.docker\*\. + +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 + +* docker\_container \- now supports the device\_requests 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)\)\. + + +### Removed Features \(previously deprecated\) + +* docker\_container \- no longer returns ansible\_facts \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_container \- the default of networks\_cli\_compatible changed to true \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_container \- the unused option trust\_image\_content has been removed \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_image \- state\=build has been removed\. Use present instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_image \- the container\_limits\, dockerfile\, http\_timeout\, nocache\, rm\, path\, buildargs\, pull have been removed\. Use the corresponding suboptions of build instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_image \- the force option has been removed\. Use the more specific force\_\* options instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_image \- the source 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 use\_tls option has been removed\. Use tls and validate\_certs 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 build\.pull option changed to false \([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 docker\_image\_info instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](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](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](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](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_swarm \- state\=inspect has been removed\. Use docker\_swarm\_info instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_swarm\_service \- the constraints option has been removed\. Use placement\.constraints instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_swarm\_service \- the limit\_cpu and limit\_memory options has been removed\. Use the corresponding suboptions in limits instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_swarm\_service \- the log\_driver and log\_driver\_options options has been removed\. Use the corresponding suboptions in logging instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_swarm\_service \- the reserve\_cpu and reserve\_memory options has been removed\. Use the corresponding suboptions in reservations instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_swarm\_service \- the restart\_policy\, restart\_policy\_attempts\, restart\_policy\_delay and restart\_policy\_window options has been removed\. Use the corresponding suboptions in restart\_config instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_swarm\_service \- the update\_delay\, update\_parallelism\, update\_failure\_action\, update\_monitor\, update\_max\_failure\_ratio and update\_order options has been removed\. Use the corresponding suboptions in update\_config instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_volume \- no longer returns ansible\_facts \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. +* docker\_volume \- the force option has been removed\. Use recreate instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. + + +### 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/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt.license b/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.md.license similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt.license rename to openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.md.license diff --git a/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.rst b/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.rst index b28d4bd6..dff8b150 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.rst +++ b/openshift/release/ansible/ansible_collections/community/docker/CHANGELOG.rst @@ -4,6 +4,411 @@ Docker Community Collection Release Notes .. contents:: Topics +v3.10.3 +======= + +Release Summary +--------------- + +Bugfix release. + +Bugfixes +-------- + +- docker and nsenter connection plugins, docker_container_exec module - avoid using the deprecated ``ansible.module_utils.compat.selectors`` module util with Python 3 (https://github.com/ansible-collections/community.docker/issues/870, https://github.com/ansible-collections/community.docker/pull/871). + +v3.10.2 +======= + +Release Summary +--------------- + +Bugfix release. + +Bugfixes +-------- + +- vendored Docker SDK for Python - include a fix requests 2.32.2+ compatibility (https://github.com/ansible-collections/community.docker/issues/860, https://github.com/psf/requests/issues/6707, https://github.com/ansible-collections/community.docker/pull/864). + +v3.10.1 +======= + +Release Summary +--------------- + +Hotfix release for requests 2.32.0 compatibility. + +Bugfixes +-------- + +- vendored Docker SDK for Python - include a hotfix for requests 2.32.0 compatibility (https://github.com/ansible-collections/community.docker/issues/860, https://github.com/docker/docker-py/issues/3256, https://github.com/ansible-collections/community.docker/pull/861). + +Known Issues +------------ + +- Please note that the fix for requests 2.32.0 included in community.docker 3.10.1 only + fixes problems with the *vendored* Docker SDK for Python code. Modules and plugins that + use Docker SDK for Python can still fail due to the SDK currently being incompatible + with requests 2.32.0. + + If you still experience problems with requests 2.32.0, such as error messages like + ``Not supported URL scheme http+docker``, please restrict requests to ``<2.32.0``. + +v3.10.0 +======= + +Release Summary +--------------- + +Feature release. + +Minor Changes +------------- + +- docker_container - adds ``healthcheck.start_interval`` to support healthcheck start interval setting on containers (https://github.com/ansible-collections/community.docker/pull/848). +- docker_container - adds ``healthcheck.test_cli_compatible`` to allow omit test option on containers without remove existing image test (https://github.com/ansible-collections/community.docker/pull/847). +- docker_image_build - add ``outputs`` option to allow configuring outputs for the build (https://github.com/ansible-collections/community.docker/pull/852). +- docker_image_build - add ``secrets`` option to allow passing secrets to the build (https://github.com/ansible-collections/community.docker/pull/852). +- docker_image_build - allow ``platform`` to be a list of platforms instead of only a single platform for multi-platform builds (https://github.com/ansible-collections/community.docker/pull/852). +- docker_network - adds ``config_only`` and ``config_from`` to support creating and using config only networks (https://github.com/ansible-collections/community.docker/issues/395). +- docker_prune - add new options ``builder_cache_all``, ``builder_cache_filters``, and ``builder_cache_keep_storage``, and a new return value ``builder_cache_caches_deleted`` for pruning build caches (https://github.com/ansible-collections/community.docker/issues/844, https://github.com/ansible-collections/community.docker/issues/845). +- docker_swarm_service - adds ``sysctls`` to support sysctl settings on swarm services (https://github.com/ansible-collections/community.docker/issues/190). + +Deprecated Features +------------------- + +- docker_compose - the Docker Compose v1 module is deprecated and will be removed from community.docker 4.0.0. Please migrate to the ``community.docker.docker_compose_v2`` module, which works with Docker Compose v2 (https://github.com/ansible-collections/community.docker/issues/823, https://github.com/ansible-collections/community.docker/pull/833). +- various modules and plugins - the ``ssl_version`` option has been deprecated and will be removed from community.docker 4.0.0. It has already been removed from Docker SDK for Python 7.0.0, and was only necessary in the past to work around SSL/TLS issues (https://github.com/ansible-collections/community.docker/pull/853). + +v3.9.0 +====== + +Release Summary +--------------- + +Bugfix and feature release. + +Minor Changes +------------- + +- The EE requirements now include PyYAML, since the ``docker_compose_v2*`` modules depend on it when the ``definition`` option is used. This should not have a noticable effect on generated EEs since ansible-core itself depends on PyYAML as well, and ansible-builder explicitly ignores this dependency (https://github.com/ansible-collections/community.docker/pull/832). +- docker_compose_v2* - the new option ``check_files_existing`` allows to disable the check for one of the files ``compose.yaml``, ``compose.yml``, ``docker-compose.yaml``, and ``docker-compose.yml`` in ``project_src`` if ``files`` is not specified. This is necessary if a non-standard compose filename is specified through other means, like the ``COMPOSE_FILE`` environment variable (https://github.com/ansible-collections/community.docker/issues/838, https://github.com/ansible-collections/community.docker/pull/839). +- docker_compose_v2* modules - allow to provide an inline definition of the compose content instead of having to provide a ``project_src`` directory with the compose file written into it (https://github.com/ansible-collections/community.docker/issues/829, https://github.com/ansible-collections/community.docker/pull/832). +- vendored Docker SDK for Python - remove unused code that relies on functionality deprecated in Python 3.12 (https://github.com/ansible-collections/community.docker/pull/834). + +Bugfixes +-------- + +- docker_compose_v2* - allow ``project_src`` to be a relative path, by converting it to an absolute path before using it (https://github.com/ansible-collections/community.docker/issues/827, https://github.com/ansible-collections/community.docker/pull/828). +- docker_compose_v2* modules - abort with a nice error message instead of crash when the Docker Compose CLI plugin version is ``dev`` (https://github.com/ansible-collections/community.docker/issues/825, https://github.com/ansible-collections/community.docker/pull/826). +- inventory plugins - add unsafe wrapper to avoid marking strings that do not contain ``{`` or ``}`` as unsafe, to work around a bug in AWX (https://github.com/ansible-collections/community.docker/pull/835). + +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 +----------- + +- community.docker.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 +----------- + +- community.docker.docker_compose_v2 - Manage multi-container Docker applications with Docker Compose CLI plugin +- community.docker.docker_compose_v2_pull - Pull a Docker compose project +- community.docker.docker_image_build - Build Docker images using Docker buildx +- 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 + +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 +`__ +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 `__ +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 +====== + +Release Summary +--------------- + +Bugfix release. + +Bugfixes +-------- + +- docker_swarm_info - if ``service=true`` 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/pull/637). + +v3.4.6 +====== + +Release Summary +--------------- + +Bugfix release with documentation warnings about using certain functionality when connecting to the Docker daemon with TCP TLS. + +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). +- vendored Docker SDK for Python code - fix for errors on pipe close in Windows (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). +- vendored Docker SDK for Python code - use ``poll()`` instead of ``select()`` except on Windows (https://github.com/ansible-collections/community.docker/pull/619). + +Known Issues +------------ + +- docker_api connection plugin - does **not work with TCP TLS sockets**! This is caused by the inability to send an ``close_notify`` TLS alert without closing the connection with Python's ``SSLSocket`` (https://github.com/ansible-collections/community.docker/issues/605, https://github.com/ansible-collections/community.docker/pull/621). +- docker_container_exec - does **not work with TCP TLS sockets** when the ``stdin`` option is used! This is caused by the inability to send an ``close_notify`` TLS alert without closing the connection with Python's ``SSLSocket`` (https://github.com/ansible-collections/community.docker/issues/605, https://github.com/ansible-collections/community.docker/pull/621). + +v3.4.5 +====== + +Release Summary +--------------- + +Maintenance release which adds compatibility with requests 2.29.0 and 2.30.0 and urllib3 2.0. + +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). + +v3.4.4 +====== + +Release Summary +--------------- + +Maintenance release with updated EE requirements and updated documentation. + +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/pull/612). + +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/pull/612). + +v3.4.3 +====== + +Release Summary +--------------- + +Maintenance release with improved documentation. + +v3.4.2 +====== + +Release Summary +--------------- + +Bugfix release. + +Bugfixes +-------- + +- docker_prune - return correct value for ``changed``. So far the module always claimed that nothing changed (https://github.com/ansible-collections/community.docker/pull/593). + +v3.4.1 +====== + +Release Summary +--------------- + +Regular bugfix release. + +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). +- docker_container - fix ``tmfs_size`` and ``tmpfs_mode`` not being set (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). v3.4.0 ====== @@ -30,7 +435,7 @@ Bugfixes New Modules ----------- -- docker_container_copy_into - Copy a file into a Docker container +- community.docker.docker_container_copy_into - Copy a file into a Docker container v3.3.2 ====== @@ -198,7 +603,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 -------------------------------- @@ -391,7 +796,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 ====== @@ -440,7 +845,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 @@ -462,7 +867,7 @@ New major release with some deprecations removed and a breaking change in the `` Breaking Changes / Porting Guide -------------------------------- -- docker_compose - fixed ``timeout`` defaulting behavior so that ``stop_grace_period``, if defined in the compose file, will be used if `timeout`` is not specified (https://github.com/ansible-collections/community.docker/pull/163). +- docker_compose - fixed ``timeout`` defaulting behavior so that ``stop_grace_period``, if defined in the compose file, will be used if ``timeout`` is not specified (https://github.com/ansible-collections/community.docker/pull/163). Deprecated Features ------------------- @@ -541,7 +946,7 @@ New Plugins Connection ~~~~~~~~~~ -- nsenter - execute on host running controller container +- community.docker.nsenter - execute on host running controller container v1.8.0 ====== @@ -638,7 +1043,7 @@ Bugfixes New Modules ----------- -- docker_container_exec - Execute command in a docker container +- community.docker.docker_container_exec - Execute command in a docker container v1.4.0 ====== @@ -690,15 +1095,15 @@ 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 ----------- -- docker_image_load - Load docker image(s) from archives -- docker_plugin - Manage Docker plugins +- community.docker.docker_image_load - Load docker image(s) from archives +- community.docker.docker_plugin - Manage Docker plugins v1.2.2 ====== @@ -778,17 +1183,17 @@ New Plugins Connection ~~~~~~~~~~ -- docker_api - Run tasks in docker containers +- community.docker.docker_api - Run tasks in docker containers Inventory ~~~~~~~~~ -- docker_containers - Ansible dynamic inventory plugin for Docker containers. +- community.docker.docker_containers - Ansible dynamic inventory plugin for Docker containers. New Modules ----------- -- current_container_facts - Return facts about whether the module runs in a Docker container +- community.docker.current_container_facts - Return facts about whether the module runs in a Docker container v1.0.1 ====== @@ -811,7 +1216,6 @@ Release Summary This is the first production (non-prerelease) release of ``community.docker``. - Minor Changes ------------- @@ -829,7 +1233,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 ------------- @@ -847,7 +1250,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/openshift/release/ansible/ansible_collections/community/docker/FILES.json b/openshift/release/ansible/ansible_collections/community/docker/FILES.json index 1cfc92a5..c2f6a28c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/FILES.json +++ b/openshift/release/ansible/ansible_collections/community/docker/FILES.json @@ -109,7 +109,7 @@ "name": ".azure-pipelines/azure-pipelines.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e4bc647c7f900e4e9dad920d558ae2e64576279f4ca13d023b07c27c79c41c56", + "chksum_sha256": "eed726931f1b030bc5f6c4165c0251704a098760de49fe58cad4c56aa91522e0", "format": 1 }, { @@ -130,35 +130,42 @@ "name": ".github/workflows/ansible-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a76b98a2c61864452c4866b3e45bb88f84e5b2cdefed352c6ff2e6827b01f79d", + "chksum_sha256": "b36f9ccf4acf3c6d9358268de4c973d43406516c7f2b09f4303fa7c9672ae69a", "format": 1 }, { "name": ".github/workflows/docs-pr.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "76a220b6745fdf046f040a3450ec3e57cc3ee80e6b18dc1e885ad03c85f8e752", + "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": "b3c7dcf434e73aaeb8526ee30db2e97b0f80676b1f18d8780224a811f97fb213", + "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": "452ea1477bee51332dcb13c7367fb6d4a20aa75386ead97f9b60f718771b1eac", + "chksum_sha256": "e678850bfb28299b51297b445b2319e25d84b492364f236ee0154baefcb7d8ce", "format": 1 }, { @@ -249,7 +256,7 @@ "name": "changelogs/config.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e608bfe9368cd9a95e04b99ec78d74bd7c8e125cc715c059a1957bb32079c102", + "chksum_sha256": "21105a71a6783da90a5b108563acfeadf066ef571db64d0d36d55c5886ba1dcd", "format": 1 }, { @@ -277,7 +284,14 @@ "name": "docs/docsite/rst/scenario_guide.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "11df82606883ecfa82952f141ed9c30ac31e07746dcd50edc53ca8dd3a360a2e", + "chksum_sha256": "dcbef6d865e38902c5a8b88e7bddf940f62cf31067f29cd041a215cd6a0a6f19", + "format": 1 + }, + { + "name": "docs/docsite/config.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c2e717709f55bbeb87f08b2fe9722c91150c87f94a3245935becc186c5c8def4", "format": 1 }, { @@ -312,7 +326,7 @@ "name": "meta/ee-requirements.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "05d1b11fabc1836d30b2577353404ee8cedab413bf02874413538f77c882ce06", + "chksum_sha256": "d078015d25bf12defe85d0ca788cd997ce9fd8f71c08c96ab27c472346df378d", "format": 1 }, { @@ -326,7 +340,7 @@ "name": "meta/runtime.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "036384152d6b46d0edefb1a12d1dfef3c85205511e5db3319d49d17fa342f97f", + "chksum_sha256": "9c6256715af06a03c0a93beac94757d47be3b0125ccce5d874ffd9227890d09f", "format": 1 }, { @@ -347,7 +361,7 @@ "name": "plugins/action/docker_container_copy_into.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "03b4b0fdb7e426ceffc8ef2cdb8113b19cbaffb61ec5ed8014fbc3fbfe40a38a", + "chksum_sha256": "e79dbc67466ae588344ddd74a79d508c859252cf76b71a918cf066ac39fb7de1", "format": 1 }, { @@ -361,21 +375,21 @@ "name": "plugins/connection/docker.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7b33a9616e9189aed4014f1869666bec5b788dba44385ecf3cbeed4e30f4ffe8", + "chksum_sha256": "4d013442683d88f48c73695a8cf5d6acb11b4528db1d195c41209a641dd9ebda", "format": 1 }, { "name": "plugins/connection/docker_api.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "aee7c8be4996a947de9457fbad1df113b7626f2ccbc5c629a060057c2ec14b43", + "chksum_sha256": "f04f25bf107d119641444104cf76284c7bb42d6407de0b881eb5b554ae147edd", "format": 1 }, { "name": "plugins/connection/nsenter.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7f63cb2912a8d19a59ebf86ad9076de4cf99b635e775bd9c757f7d3063fbf9a0", + "chksum_sha256": "0b3e97b145df0862f75ea03ead386929d6e4faae67123e0421b19a2fa3575347", "format": 1 }, { @@ -392,11 +406,18 @@ "chksum_sha256": "3cb11d4fbb64f22b4c70fb7baf8f8777a21d99887383234e1af7945f45ca95a6", "format": 1 }, + { + "name": "plugins/doc_fragments/compose_v2.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b92c9446b36c3a2d8faa368a8036561d65cf5dae443d5f6a26f8d800a767a9a5", + "format": 1 + }, { "name": "plugins/doc_fragments/docker.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f164958068db65e0d813835b35ea9b057c1f45cabaaa5e5e34d7b6b22b2e3ade", + "chksum_sha256": "15bc8148d241ed95343e15632933a9d6d15b53d690c2f1b7b8a0d7cf56c2adc2", "format": 1 }, { @@ -410,21 +431,21 @@ "name": "plugins/inventory/docker_containers.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d5e48e19c7f841b06e67952cd5ae4897e9da72909bcf8e739453290a58ffac6e", + "chksum_sha256": "a4571bbd61633d474b092157351d19ce4ca99893402cb9bfeb316e03427eb357", "format": 1 }, { "name": "plugins/inventory/docker_machine.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "63788182b475bbb689919fa08b9753c3cba026937a6d7be2ee5238727d583e53", + "chksum_sha256": "3b3a1ef0f3d745a7b642777b7dd4126f153898a9c5f536091177442ed2d7c8ed", "format": 1 }, { "name": "plugins/inventory/docker_swarm.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1d17d6b8df09dcf99c45f2b077b6077b2cd0e319d99b7be0a46859e9855b4465", + "chksum_sha256": "73d1a797b773c037c755480b245ad7cfc11b6eb7310c1f015c52729c4e842dab", "format": 1 }, { @@ -452,14 +473,14 @@ "name": "plugins/module_utils/_api/api/client.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "19097eec271079bb27f252c03fc4df7578369fd7b43e981c9f259dadc26a51c9", + "chksum_sha256": "8554f7ce18d5be8e27c24585da9ca10eb9873fd3d190b1089908e11e64fcfdc1", "format": 1 }, { "name": "plugins/module_utils/_api/api/daemon.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c3ff41f499911eba707f23fe05062adf3d5c7464138111c37d1afc30f913a2f8", + "chksum_sha256": "9a0d17ad9e1fc3ca2fe1d502273ad12442cfe46d32bcb19372f6bed32b1e0815", "format": 1 }, { @@ -508,42 +529,42 @@ "name": "plugins/module_utils/_api/transport/basehttpadapter.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "73da87364c86548cdf16f52608349443f02f9926b52e736649a417f1238376ea", + "chksum_sha256": "2e88df15eeb6be839c78e777bc093d3f2c727b185395d2616d0cd6d92a4675f5", "format": 1 }, { "name": "plugins/module_utils/_api/transport/npipeconn.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "086da24a2e7ec6f6ae33cccc308cc8e4103d417950d3ee557454b58e21e54e5c", + "chksum_sha256": "ae561ff5c8dfa7ded1df93e052173bc23cb9a8aae7dc00e0f10352034f3e1b6c", "format": 1 }, { "name": "plugins/module_utils/_api/transport/npipesocket.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "058e69397607921c0c87b74ae381948b19ac2838c13066145712cf60dc52a2d9", + "chksum_sha256": "287a58080edc5b3044df0dd882abf0b081df54e535277cc3b3de5175ece7e114", "format": 1 }, { "name": "plugins/module_utils/_api/transport/sshconn.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8374d65854ab0bcc9df84abd03d4ad0fa434932818cbf5e4881d8439b5779f82", + "chksum_sha256": "c9540c61bd3048b4ee637790ba86c99a60e38e72d9acf7ad245fa97783e4dd99", "format": 1 }, { "name": "plugins/module_utils/_api/transport/ssladapter.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8aa846efba064a9c9ff16fe7abf0b6ee0211e96225fecf7b07be7a777ff20f83", + "chksum_sha256": "9280c24e44fb347c2f6075cc2ac6eb36d2ab68fda7aa95e00c987a9495343b9e", "format": 1 }, { "name": "plugins/module_utils/_api/transport/unixconn.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5010ffb01c3ae3ca789c31aba00eefb1d4874f6992abd37aa2855b6dccbb3162", + "chksum_sha256": "5356fb54e55692cb27393cc5a694a74c885302b837c16b4ca80c62cb58380ad3", "format": 1 }, { @@ -620,21 +641,21 @@ "name": "plugins/module_utils/_api/utils/socket.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4775d6926a42581791cca5ba175c99fbdd8e204a0091bb74e27b5971b7d158ec", + "chksum_sha256": "58f5909c0bdbf63fbb0c09c89aeb3f8a1f9e8b22c071fd2c0c25e6bfce166d18", "format": 1 }, { "name": "plugins/module_utils/_api/utils/utils.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f11f1f6efa555721dcad3244256e97daaddf282e81d9a9a16683aa9d11ff1973", + "chksum_sha256": "84d22ae2825223d88d2cc66386427828a3363cf549404a3be68880db91fc0bfa", "format": 1 }, { "name": "plugins/module_utils/_api/_import_helper.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f6a731af462be3fe7311ac3fffbcc0a75f26876886b1ee63f8f0af54c1c0b64d", + "chksum_sha256": "66566b53e53108e3773ac9261053af9eae3a8acfd70f26096ad2ff56c374b75f", "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": "3a1b4d8958005daf4724c037e7419ddbba384eda142a55c6088f5045617f2672", "format": 1 }, { "name": "plugins/module_utils/module_container/docker_api.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7a8417d32e65935dfdb0ac9f226689904b160da3e40ab4c0104e835d674b1a87", + "chksum_sha256": "c21b7f1c3d8e1d188ffec2b460589da857ec44d550874f0fb7016e083e7071c2", "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": "2317d32a9c6a541472cc0a6a0de6c5195fe9a8eb4180cb7d6588f00081233a26", + "chksum_sha256": "5de0831ed3a84d5a505424594ac264bd723f247a26a50bc32896b41083096fda", "format": 1 }, { "name": "plugins/module_utils/common_api.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "02c61d069a1dfbf1b698766801824b08b63190d81e7d509f16ecc625b377da4f", + "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": "010f71093f38f18e9fcd1b5cd78a5babe601d2dd79ceb16642b999d299719b6f", "format": 1 }, { @@ -725,21 +774,28 @@ "name": "plugins/module_utils/image_archive.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7c6784aecdfc14661d55b3ddef4e0c19e6a44bb0fecdbc514834c571716e8711", + "chksum_sha256": "26073983bafd86ccadb1f197f2a55188f208145db066bbc02ea9bf59aaf30085", + "format": 1 + }, + { + "name": "plugins/module_utils/selectors.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a48ff68d6dd79eb5d9509e3acae79a6179c9646c51654108ca6873d1eafdb817", "format": 1 }, { "name": "plugins/module_utils/socket_handler.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "151bf9f97d9ae19355689efbf31ebfb54e7be219469a79cbb78c30dc40f8bd45", + "chksum_sha256": "e5be0ee83392adabbe1831e7d6cb9c4516027dacaecc8a19e4bfb7a0d2725912", "format": 1 }, { "name": "plugins/module_utils/socket_helper.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2bdd8d9601b7e04e587904c9474c147d5cbade2e7175ad2e1ff31a2f77abec59", + "chksum_sha256": "577f40a52b8757e30e3d275c1072146b00597d261bc85ff09f2a4e6d67f1af0f", "format": 1 }, { @@ -753,14 +809,14 @@ "name": "plugins/module_utils/util.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2615c825ea34ee9db9c6e386f929e6f532d7eb00c8e01b88d0137b0a321d0283", + "chksum_sha256": "b300136bb10e2a9a51862b6b10eb5ce9032c551a13cebba97200ccb501e1a450", "format": 1 }, { "name": "plugins/module_utils/version.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f97531134306d317265df93be454092fb1ce2fce90c5af0e11556a7355a74948", + "chksum_sha256": "a9b898a25d61e52c8b31972c9b66f8990a264f17671b6d544e107b77c3dc42ed", "format": 1 }, { @@ -774,196 +830,252 @@ "name": "plugins/modules/current_container_facts.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6ed712513a03b75b2d783d1d2ea56be177690d4f36a648f3d56ee99d55c065c9", + "chksum_sha256": "6866839dd328f2c566de59dea1a826ec60cb9fa20c2639c520d16338d3a09839", "format": 1 }, { "name": "plugins/modules/docker_compose.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f31c6dff5af454a65ba02e37be0cfd9880d2a8952739fcb7551f472f5e8ebee1", + "chksum_sha256": "973b8aee68fcb76dd620c243904c64dee7f234ca1f69019b87c83ca72a8efc48", + "format": 1 + }, + { + "name": "plugins/modules/docker_compose_v2.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "299fc207fcda246f73bbb7213f0a3f1eca8c5ebf0a6344e571c867fff0eba258", + "format": 1 + }, + { + "name": "plugins/modules/docker_compose_v2_pull.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a3171c449b56019853aaa8da3c6d8b54f2bf6fe03ce8da1ade87afcd32a07756", "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": "2eddbeb4df22f880e115de2a30274366f8184f84456a60652a43bf7fbbbf443b", + "chksum_sha256": "24722b19a3ea8c32bdade25e9f5e061ede3fed5bb01c3db238a5cb45e28b2a1b", "format": 1 }, { "name": "plugins/modules/docker_container_copy_into.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ddf3378ecb5f5bfd85bb29c6eee0dac7bb6f69885a5cca6fcbd1af0d4d6f5896", + "chksum_sha256": "249d80799d026e601bf5040b554708c933a2376bda27c43d668cc9258f8b5110", "format": 1 }, { "name": "plugins/modules/docker_container_exec.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1fc9211a091892ccf57a5e939b86df39bf7b60e9a3c57baf8b05624f24677ac3", + "chksum_sha256": "9828790f19f268519de01fa41df37adf89f5a6af88438b4dab5fd225b7a68a88", "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": "6bfafc6e0fd9ae42abf9bae05c65200b8e94a9beca4108c6785c1a3843546c2a", + "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": "ced5bedc7d1ad287717dc2ea39357db5ca584973d04b4f2225180c8fd20ece22", + "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": "f0b7ab1dd6aac89762fd6ab9b30267eb48bb0906ade41805ff5df79d5e3685c0", "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": "9ea2030d275bf6ac19f7bf0fe7fc1b0dcff4d7cb0b15cea124921e99732d1abb", + "chksum_sha256": "0e51993a3f5ba1e1d0d8067e7d4dacaac4a4031c6fc7431a847c4f69a6a7f556", "format": 1 }, { "name": "plugins/modules/docker_prune.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ed7bfdf9aa2fbd99ac5a4b5db033e7f304d20bf863f0a750e33af4775cdd3afb", + "chksum_sha256": "57a0ca1bfd08ac4f16afcaf8a925697bd8cd53a4aa33d1c07b53992174e3eeab", "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": "dd309b6668d3bcd4561b3462e90780b99b6d76b3c7612f39f1ce45fbe98bb6b0", + "chksum_sha256": "326f01d8464ff007981b53b8b1836c3585390f7495ab0105509b4a78f676c479", "format": 1 }, { "name": "plugins/modules/docker_swarm_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a028695e7b97b4cd117287ffd3542773f098fa1c53e889c1801111a192869a29", + "chksum_sha256": "05bcd2c3e0b417f7ee328732c6c4afba2dba2400a83e5149a6af989eeda493fe", "format": 1 }, { "name": "plugins/modules/docker_swarm_service.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "05ecedb2d7f2f47dd49be051fa8da4723e63b06624282724bf9bdd5ca603e23c", + "chksum_sha256": "355ed4ec943f881394333a58cc442803c36c85c0e2232374bc9970be977444bd", "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": "2c8b7d867cf48f9c7a05afbb8086f46ac8d75d30d4d975531f1dbeef2e90db4c", + "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 }, { @@ -991,7 +1103,14 @@ "name": "plugins/plugin_utils/socket_handler.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "35cd4e8636a9d7bc209996b7a384c183f14f205485939744d2164d86a70c8e9b", + "chksum_sha256": "56157c15e13defbde6a392ba2804bdb2734316d559c2e61c08361d65deae3ae0", + "format": 1 + }, + { + "name": "plugins/plugin_utils/unsafe.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "93ccc2e18634405c7ff21a91a1df4f17261ac24b0f41bf3c46dbec2f254538c3", "format": 1 }, { @@ -1054,7 +1173,7 @@ "name": "tests/ee/roles/docker_plain/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0200260cc9f7904fd55ba0406bf6e8a2870ae72e814eeb6008054774cf76574c", + "chksum_sha256": "750d3eb7999b8dcbf618797e3414b70c523948434f646c424845ce36feb13d41", "format": 1 }, { @@ -1124,7 +1243,7 @@ "name": "tests/integration/targets/connection/test_connection.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "246cd87cd1247b0cfd9f724af6736489b61905a72d2d61ffd19d17f615fe27b4", + "chksum_sha256": "9b592195fed688108e3ab4748d9140bab2e28d150e0a4bb5a128f3c11caa7b02", "format": 1 }, { @@ -1208,7 +1327,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 +1348,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 +1397,7 @@ "name": "tests/integration/targets/connection_nsenter/runme.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7f6a528c5f20c98919cf8cb93d1487f05844c9f5eab75621cc7a294d67177a08", + "chksum_sha256": "6c7656f5c6e2ce7d59a76527b1dfe599dbf79325e32f23b1ef7fbd478c418c79", "format": 1 }, { @@ -1362,7 +1481,7 @@ "name": "tests/integration/targets/docker_compose/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "47bfd6330a8616b7324f5a956839b953d844ed07b327c78a67ac86d1b65c6102", + "chksum_sha256": "87e5d82e8ac83281e179792a74c7a27cb38a271327311e27ce44cd81c9e654af", "format": 1 }, { @@ -1390,27 +1509,167 @@ "name": "tests/integration/targets/docker_compose/tasks/tests/start-stop.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b4938ea0eeced9e50fb88c4e04c925d7cbcbb53e6bcf3c420160cd3b1e40210f", + "chksum_sha256": "088c5a24b830c92a6352529cc46f3e14f46d85e611960ae76c5a5934627a85ee", "format": 1 }, { "name": "tests/integration/targets/docker_compose/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1a353da5e06dfb4c1d139c9ab317db0ac14876a4fd4f209f1ee76fa9959ff6f6", + "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/definition.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "9a2483112e899562f769a66c3660d7d8fade379f6e2b7c09db7db578c59012a6", + "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": "c2a2b069e45658c6089293227752efeb565e01191414706424ce74de797120f2", + "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": "8e6319cebc310a53e60a30c57416f87baf55918cb8264ae0cf1a070821cb63ba", + "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 +1691,7 @@ "name": "tests/integration/targets/docker_config/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", + "chksum_sha256": "48e41681961146fc376abdd7ef550952d84678a300f6310fd18910e2b270ac29", "format": 1 }, { @@ -1453,7 +1712,7 @@ "name": "tests/integration/targets/docker_config/tasks/test_docker_config.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8bc1ae5d4922d2658cf1bf19522080748aabbb47844cd2ddcc8f11a7ec03b6e1", + "chksum_sha256": "08dd9ab43d652b6997690c262e39c873647d8427a683951ad540583b8a0d1f61", "format": 1 }, { @@ -1509,7 +1768,7 @@ "name": "tests/integration/targets/docker_container/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { @@ -1530,84 +1789,84 @@ "name": "tests/integration/targets/docker_container/tasks/tests/comparisons.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5073f8e106a5bc60f70479f22c3e79851964fb6136cc2a2afb30950fc6621863", + "chksum_sha256": "9975880766fb10219151c58592084c77a17f340af95fb146503bf8e4ed5b5001", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/compatibility.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "79a9ae5eb4ed00d2cecc7dc53313489c87252c2070040847f387ba389bea9133", + "chksum_sha256": "7a27f5ab737d3a39ff24c4521208432ecd553d77a265b07fb8499b1066a692d7", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/image-ids.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4b00b74e9b25a7768554b1ebca67c9fdad719944f36020507abb2ef4e00417de", + "chksum_sha256": "60cfc29a44563833ed84d2240f6de1f146f2a3e05590bf45004108b290e1c5d3", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bbd273eb5be341f3146b8e32873d0579719ddeea15dd53911a0ad4ba854d1c2c", + "chksum_sha256": "2102d3f8e2e8cb629265e182f81378e8dc1e2dc0ff87832eb09c89b1ccbe8c32", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/network.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f6f5dd7b714655d6f912806f0490574510654fc7fc0e5305c88cc0deab0462b4", + "chksum_sha256": "c0e1a9237a5d7091040c045e149d7584015985938b4b0ee7a5b7f01fe81ef46a", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/options.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "464a03ea88613b02b5705d776d0ef07e1461433f3968e6311742b43a8e7b15f5", + "chksum_sha256": "b6479e2ffd06f410f3eaafd8cd478325ef1291e9013fc79d36c5c3da42b7207e", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/ports.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b3460dce6bff87a209f49e0e644e998e02711dda91efbe15c967aff7794aa0a0", + "chksum_sha256": "138b2d31ec081219e3e436ad3b5e4dde3ffc5bc30aa4088c0e97c56f807cdb47", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6bf1eeb05b55e43a4b4d741fc34d14b2857598284b8d2809758e914771ad0691", + "chksum_sha256": "3007b6ac1ae353ab8240d0c98382d05e16fe7867279b6f702ebcc03d9bf448de", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/start-stop.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ab80f5034ba2abd2c4272c671f66d9e9af8d680ddf275e7ffe5f3a452db72e4c", + "chksum_sha256": "7639592140dc4e886a39ef96197d99ef88d726b4be48a6a7ed063f435214bf9f", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/tests/update.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cb277116264ff62d8d474b8eb1f6aaf9d9b48d7de0b409b3cff660d4268c61a3", + "chksum_sha256": "92297e5b4bff33636121f65b8b8ffb61212c5fd233cb7c50095e7668ed6613c7", "format": 1 }, { "name": "tests/integration/targets/docker_container/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "837f2c0e150c7bdc02be33d3ae1dababfef8ffe6156b23240551a0fc6ca728bb", + "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 +1894,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 }, { @@ -1656,28 +1915,28 @@ "name": "tests/integration/targets/docker_container_copy_into/tasks/tests/content.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "43b4bb8c4e9b1cc60436a58a63880aa51706f374181fd46d71916e23f0a0ddda", + "chksum_sha256": "ba9edfdb3876753bc2fd194a7076699d8da3b528667a6a65c39ba37c9b28a6c5", "format": 1 }, { "name": "tests/integration/targets/docker_container_copy_into/tasks/tests/file.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "20eb8c8f0020ed6d6f860783f3a8ad87391123b4a9ee7cb42bbdf35da78c28e2", + "chksum_sha256": "68ce2ed7af0be53ee05ff324533e82589622f263057bafb4f68a17f7dad723b0", "format": 1 }, { "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 +1964,7 @@ "name": "tests/integration/targets/docker_container_exec/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { @@ -1719,7 +1978,7 @@ "name": "tests/integration/targets/docker_container_exec/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bac198a24dec95e577c7c13aeb31f8319602c3d1797b2ada29f7f85b82b592ae", + "chksum_sha256": "13a3a3c36fa72bd27f6b81556239c5ac3380c8da9e427e087a649d8361e2719f", "format": 1 }, { @@ -1747,7 +2006,7 @@ "name": "tests/integration/targets/docker_container_info/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { @@ -1761,7 +2020,7 @@ "name": "tests/integration/targets/docker_container_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3848fcba407ce868e87e1305ca98e3511009a91b86adc140c3191a36132f42be", + "chksum_sha256": "dd87ea6325a300ea4015d3090672aac951752d3a2b024e385f726ce44202c013", "format": 1 }, { @@ -1789,7 +2048,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 +2069,7 @@ "name": "tests/integration/targets/docker_host_info/tasks/test_host_info.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e5bc643f6552306ba51c72ff68d13f5cfc30f937eef68cae49f0e9ee3255beea", + "chksum_sha256": "71b40536d593bc36f89a74db356d48dfd933c001d934f0728512eec3b1c99045", "format": 1 }, { @@ -1838,7 +2097,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 +2118,21 @@ "name": "tests/integration/targets/docker_image/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f66aa8bb12f8495b229b92991f164a55fb9eb81cb3e8c76db4c5e89f4e9362b4", + "chksum_sha256": "82c6cc949307b59b70c390d8c43067cb5fea9ae6de3c57e5d133fc9e9caa2d7a", "format": 1 }, { "name": "tests/integration/targets/docker_image/tasks/tests/docker_image.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5d6c78d0d835e63a0e03fe0b02356de6205a232e2e1ceb3cd5dd6f3c5ffbf951", + "chksum_sha256": "132b8e0517198529ec420ca730dabad59ba9fa99c5f307a8074d12a1e9a2b773", "format": 1 }, { "name": "tests/integration/targets/docker_image/tasks/tests/options.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f3e216d52c1b6aefb4611a0408eaa16a3da4ae80d5b5ef6b4ac1e6787ac05bb4", + "chksum_sha256": "01e5f20d85b5a760235bb1c1b56136c8097ad7dfd32a5211fcffa5416191bb97", "format": 1 }, { @@ -1887,14 +2146,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": "ae0f06550e120877871a9a8b684ed1707a39fe9ac49b01275a33484ee3c2b19f", + "chksum_sha256": "eaeceab2e31f7a9b28a4f2e68a19b356ea9619e12ef2b7f776ab20967fc8fd0b", "format": 1 }, { @@ -1947,2362 +2206,3258 @@ "format": 1 }, { - "name": "tests/integration/targets/docker_image_info", + "name": "tests/integration/targets/docker_image_build", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_image_info/meta", + "name": "tests/integration/targets/docker_image_build/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_image_info/meta/main.yml", + "name": "tests/integration/targets/docker_image_build/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "58f77094d90397f9219c42f973c386ad471d6a9e17c590260458ea0de4aa7ce0", "format": 1 }, { - "name": "tests/integration/targets/docker_image_info/tasks", + "name": "tests/integration/targets/docker_image_build/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_image_info/tasks/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "426eca8e288e79157781391f44256414ede3708b23c39f29c92dd7db3091cf42", + "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_info/aliases", + "name": "tests/integration/targets/docker_image_build/tasks/tests/options.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "chksum_sha256": "8fe987d38f4065b152a05d845709946504903321342d99184c10aa7cf86ae74b", "format": 1 }, { - "name": "tests/integration/targets/docker_image_load", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "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_load/meta", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "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_load/meta/main.yml", + "name": "tests/integration/targets/docker_image_build/tasks/test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", + "chksum_sha256": "4ee523d71f919551cb6c11ae760fe05d24990867ab5a08be86e554a3a8fed861", "format": 1 }, { - "name": "tests/integration/targets/docker_image_load/tasks", + "name": "tests/integration/targets/docker_image_build/templates", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_image_load/tasks/tests", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "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_load/tasks/tests/basic.yml", + "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": "86da5d9bdf5be5824548d45f489180bf3783a4a3e418f6632343ffa512860e04", + "chksum_sha256": "f9d474c11ff7766ee58b74e50ecd80fba99b9ca1bab0b661c8f39c91dee23aed", "format": 1 }, { - "name": "tests/integration/targets/docker_image_load/tasks/main.yml", + "name": "tests/integration/targets/docker_image_build/templates/MyDockerfile", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1", + "chksum_sha256": "7d9039d8165a7c7170c5f1466438e9c27d6380abb329609d7601d34325709858", "format": 1 }, { - "name": "tests/integration/targets/docker_image_load/tasks/run-test.yml", + "name": "tests/integration/targets/docker_image_build/templates/SecretsDockerfile", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876", + "chksum_sha256": "d65014cfb0da5082a68731d539360be8b0e522df6da3d8054dfa216910ba63a6", "format": 1 }, { - "name": "tests/integration/targets/docker_image_load/tasks/test.yml", + "name": "tests/integration/targets/docker_image_build/templates/StagedDockerfile", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "55687007d8818cf8c1de8cfcbf82eb7bf734333ca74becdbf0b12c4205f29e29", + "chksum_sha256": "d5882640f5183ed9b01fe7f06e144cd375bd402a1f2014392347c5e0bfce2222", "format": 1 }, { - "name": "tests/integration/targets/docker_image_load/aliases", + "name": "tests/integration/targets/docker_image_build/aliases", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_login", + "name": "tests/integration/targets/docker_image_export", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_login/meta", + "name": "tests/integration/targets/docker_image_export/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_login/meta/main.yml", + "name": "tests/integration/targets/docker_image_export/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c0879f5877b4d7a56bfd1fc54868e01542fd2c3a3c935fbaf51a6f8b1d78b98c", + "chksum_sha256": "f1c910549dd871495ae0ef7a0ddfa2c2b836d671346c8993ab0d91008b19e86c", "format": 1 }, { - "name": "tests/integration/targets/docker_login/tasks", + "name": "tests/integration/targets/docker_image_export/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_login/tasks/tests", + "name": "tests/integration/targets/docker_image_export/tasks/tests", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_login/tasks/tests/docker_login.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "004d9d4559daa1320d953415cf7fa661dc2b1378134cf27a62ad961bbe7ee63e", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_login/tasks/tests/multiple-servers.yml", + "name": "tests/integration/targets/docker_image_export/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "899043f20783bb683b488c8b225367a8c0a67ac1c3628591bddc8eff72a7f374", + "chksum_sha256": "5d45f01ccb2bdd3ca9e191085355417aff91eabbd9950714549ae559c43e409e", "format": 1 }, { - "name": "tests/integration/targets/docker_login/tasks/main.yml", + "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_login/tasks/run-test.yml", + "name": "tests/integration/targets/docker_image_export/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", + "name": "tests/integration/targets/docker_image_export/tasks/test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "17cb11d752619a8dec4d8cb853f761e8b57fdb5e5ce5a5da262f9084609727a2", + "chksum_sha256": "4f86478b3e92d32cd089ed3a4b4b6c9dfa7d2e0629f2180ba5a5159447de3c0e", "format": 1 }, { - "name": "tests/integration/targets/docker_login/aliases", + "name": "tests/integration/targets/docker_image_export/aliases", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_network", + "name": "tests/integration/targets/docker_image_info", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_network/meta", + "name": "tests/integration/targets/docker_image_info/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_network/meta/main.yml", + "name": "tests/integration/targets/docker_image_info/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_network/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { - "name": "tests/integration/targets/docker_network/tasks/tests", + "name": "tests/integration/targets/docker_image_info/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_network/tasks/tests/basic.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "e04006d06a10366f9592be59aae0dfb12ad3f301165d253b0a9896044c1eebd5", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_network/tasks/tests/ipam.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "e15c15e484fb428bd6b9bdc1c979a029497c6301817c36d6e3e801fd9ea40276", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_network/tasks/tests/options.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "f838bc3d9d21d0c31c1b0c4a743abce5fa0db9058ac490352608495b4371ceab", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_network/tasks/tests/overlay.yml", + "name": "tests/integration/targets/docker_image_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c1d3a3da198daaa6673597253907c70dc26099d6b1e74d49d17c2a3c49ae97d7", + "chksum_sha256": "dc3ce4462ff5b5f575a9e3734427fee06c61d8a0cbd93ead7926f95d0131a8a9", "format": 1 }, { - "name": "tests/integration/targets/docker_network/tasks/tests/substring.yml", + "name": "tests/integration/targets/docker_image_info/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f7dc51530e72162b7a3c6806be4be3963aef34251036c222a06b1eeffc916985", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_network/tasks/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "02540a9731f2c56b6f485a76084d3942bfdf55f5d9ecf1e1510032d27cef6974", + "name": "tests/integration/targets/docker_image_load", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_network/tasks/run-test.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876", + "name": "tests/integration/targets/docker_image_load/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_network/aliases", + "name": "tests/integration/targets/docker_image_load/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "chksum_sha256": "f1c910549dd871495ae0ef7a0ddfa2c2b836d671346c8993ab0d91008b19e86c", "format": 1 }, { - "name": "tests/integration/targets/docker_network_info", + "name": "tests/integration/targets/docker_image_load/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_network_info/meta", + "name": "tests/integration/targets/docker_image_load/tasks/tests", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_network_info/meta/main.yml", + "name": "tests/integration/targets/docker_image_load/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "d5de67d5dab3fcd7da5eaf5c3a6c94261bf62d1917bde74d9a950d96a17f1ed9", "format": 1 }, { - "name": "tests/integration/targets/docker_network_info/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/docker_image_load/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1", "format": 1 }, { - "name": "tests/integration/targets/docker_network_info/tasks/main.yml", + "name": "tests/integration/targets/docker_image_load/tasks/run-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e4ca163f0e9a1a361a11c44d8da0cfb5078d86243860901541d177c8e7b98eab", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", "format": 1 }, { - "name": "tests/integration/targets/docker_network_info/aliases", + "name": "tests/integration/targets/docker_image_load/tasks/test.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4f86478b3e92d32cd089ed3a4b4b6c9dfa7d2e0629f2180ba5a5159447de3c0e", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_image_load/aliases", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_node", + "name": "tests/integration/targets/docker_image_pull", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_node/meta", + "name": "tests/integration/targets/docker_image_pull/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_node/meta/main.yml", + "name": "tests/integration/targets/docker_image_pull/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "3fe2a9716c9e0d5f76289712ef7a56c65f1101ad33972a291e80c638560348de", "format": 1 }, { - "name": "tests/integration/targets/docker_node/tasks", + "name": "tests/integration/targets/docker_image_pull/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_node/tasks/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "c609f6cffc340032298593d089b1b03d92ed063a01e468bf9121dfc60aa12614", + "name": "tests/integration/targets/docker_image_pull/tasks/tests", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_node/tasks/test_node.yml", + "name": "tests/integration/targets/docker_image_pull/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7c07158973b5eff43fe0bd2ef210ec5910a0cab3fa63521c53b930d9905ac1ca", + "chksum_sha256": "a74261dfdb75932a93fef7f45fae601eea430ad9a7770b2ea60c5451fe8567c0", "format": 1 }, { - "name": "tests/integration/targets/docker_node/aliases", + "name": "tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a76f4a620dfae81104aa5ee3c8aedd5b41550acf46aa7485ccc0d0e6a8bbc5a5", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_node_info", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, - "format": 1 - }, - { - "name": "tests/integration/targets/docker_node_info/meta", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "chksum_sha256": "6046c00692b59a1087dc1a1be4fb0a51d2ead9b8eb13f5dec6bf9f5c281e3556", "format": 1 }, { - "name": "tests/integration/targets/docker_node_info/meta/main.yml", + "name": "tests/integration/targets/docker_image_pull/tasks/tests/registry.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "5640e423fa7377f6513b62f58b068e66143f2f15b74a0a4b00d9adfdcf286352", "format": 1 }, { - "name": "tests/integration/targets/docker_node_info/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "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_node_info/tasks/main.yml", + "name": "tests/integration/targets/docker_image_pull/tasks/run-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b07afb61b4d0234f26b27e0154db8933eb315f472e3dd4bfc053d32ba63bcc74", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", "format": 1 }, { - "name": "tests/integration/targets/docker_node_info/tasks/test_node_info.yml", + "name": "tests/integration/targets/docker_image_pull/tasks/test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f311cdeb02417b62b87daa054f0ccae20b69281132a0b2751d9be5c664829e0a", + "chksum_sha256": "4f86478b3e92d32cd089ed3a4b4b6c9dfa7d2e0629f2180ba5a5159447de3c0e", "format": 1 }, { - "name": "tests/integration/targets/docker_node_info/aliases", + "name": "tests/integration/targets/docker_image_pull/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_plugin", + "name": "tests/integration/targets/docker_image_push", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/meta", + "name": "tests/integration/targets/docker_image_push/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/meta/main.yml", + "name": "tests/integration/targets/docker_image_push/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "3fe2a9716c9e0d5f76289712ef7a56c65f1101ad33972a291e80c638560348de", "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/tasks", + "name": "tests/integration/targets/docker_image_push/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/tasks/tests", + "name": "tests/integration/targets/docker_image_push/tasks/tests", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/tasks/tests/basic.yml", + "name": "tests/integration/targets/docker_image_push/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "32dc8a4e25d13084a7e9c03f87b2b5f910ed8ce0aa90f78bded97d4afd1b17ad", + "chksum_sha256": "0e176bf605f73d6dc857c02c67aa1b8c400d8c51e30e00b2d076eddd7f10f8c1", "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/tasks/tests/basic_with_alias.yml", + "name": "tests/integration/targets/docker_image_push/tasks/tests/registry.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5a290c1014a5a347ce52f13a2f64ad3df22375badffd5a7d222a1399ff5ad8d1", + "chksum_sha256": "033ce4bb02091d123ce90d08d9618cb5b6dd9ab959d8a7c27944aeab3fe3a704", "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/tasks/main.yml", + "name": "tests/integration/targets/docker_image_push/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "52bb0aa03f299c3dc12da10e484e0461c14fdff09b45613a80e537aaea6d344b", + "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1", "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/tasks/run-test.yml", + "name": "tests/integration/targets/docker_image_push/tasks/run-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", "format": 1 }, { - "name": "tests/integration/targets/docker_plugin/aliases", + "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_prune", + "name": "tests/integration/targets/docker_image_remove", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_prune/meta", + "name": "tests/integration/targets/docker_image_remove/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_prune/meta/main.yml", + "name": "tests/integration/targets/docker_image_remove/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { - "name": "tests/integration/targets/docker_prune/tasks", + "name": "tests/integration/targets/docker_image_remove/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_prune/tasks/main.yml", + "name": "tests/integration/targets/docker_image_remove/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bbfb7c84621be2a8e983f42190a1bee37c118bfcec786b8a00bba67e70169235", + "chksum_sha256": "8909cd9fb5a4f056696fb0e2f6b5c595388c0209f9aacd3143a2cdfa95039acb", "format": 1 }, { - "name": "tests/integration/targets/docker_prune/aliases", + "name": "tests/integration/targets/docker_image_remove/aliases", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_secret", + "name": "tests/integration/targets/docker_image_tag", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_secret/meta", + "name": "tests/integration/targets/docker_image_tag/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_secret/meta/main.yml", + "name": "tests/integration/targets/docker_image_tag/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { - "name": "tests/integration/targets/docker_secret/tasks", + "name": "tests/integration/targets/docker_image_tag/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_secret/tasks/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "55b9bb68e043a78a28f8c23dfef0efca1ffd97c34f616f9a91bb9a94bf4287e8", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_secret/tasks/test_secrets.yml", + "name": "tests/integration/targets/docker_image_tag/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2a9d430a0a367baac3fea9cdafae80ee5a781d8b6472c804cf5cc36758a4d525", + "chksum_sha256": "a0189575a19c755c3ae0594b57deaf9ef24496566dafb73b9ca5edc64732c57a", "format": 1 }, { - "name": "tests/integration/targets/docker_secret/aliases", + "name": "tests/integration/targets/docker_image_tag/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "133d67cf2b2857f5a906a6e054498df8d5ddc556a3671cad8216d06d0dbd8e09", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_stack", + "name": "tests/integration/targets/docker_login", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack/meta", + "name": "tests/integration/targets/docker_login/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack/meta/main.yml", + "name": "tests/integration/targets/docker_login/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", + "chksum_sha256": "3fe2a9716c9e0d5f76289712ef7a56c65f1101ad33972a291e80c638560348de", "format": 1 }, { - "name": "tests/integration/targets/docker_stack/tasks", + "name": "tests/integration/targets/docker_login/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack/tasks/main.yml", + "name": "tests/integration/targets/docker_login/tasks/tests", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_login/tasks/tests/docker_login.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ba502e7508aed562c8c1e2a29ae54c3684ef7175e8c75483fd4d728d5136b054", + "chksum_sha256": "32bd7505493ca7016e201f730fda1d938ef0c0d1c40221405105c03785507e1b", "format": 1 }, { - "name": "tests/integration/targets/docker_stack/tasks/test_stack.yml", + "name": "tests/integration/targets/docker_login/tasks/tests/multiple-servers.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "17a33cc98c855bb482156438f233e0e6892321e200eaab25005d046d11112b24", + "chksum_sha256": "899043f20783bb683b488c8b225367a8c0a67ac1c3628591bddc8eff72a7f374", "format": 1 }, { - "name": "tests/integration/targets/docker_stack/templates", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/docker_login/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c1fe5f030f6ca6066ca6c9d8e41d697cc62bb457a55e76ef4dedff2e7fe896f1", "format": 1 }, { - "name": "tests/integration/targets/docker_stack/templates/stack_compose_base.yml", + "name": "tests/integration/targets/docker_login/tasks/run-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5558e4dad8831ef90d224785b65d7e8f2b1ad48f924cf80312b8005828c58e8c", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", "format": 1 }, { - "name": "tests/integration/targets/docker_stack/templates/stack_compose_overrides.yml", + "name": "tests/integration/targets/docker_login/tasks/test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1095458fd062b0208d910a56599ad4f748dc2997fad41168453c00499b224ae5", + "chksum_sha256": "461a8c0fd7d6c95ea0cb8da0bd992001aee333d6b1df85ad59287c50816d4fc7", "format": 1 }, { - "name": "tests/integration/targets/docker_stack/vars", + "name": "tests/integration/targets/docker_login/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_network", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack/vars/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "6d7c3098ce206b9a9edf4aabdf1016615bafe0f6e9f549a85693bb6212187f3c", + "name": "tests/integration/targets/docker_network/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack/aliases", + "name": "tests/integration/targets/docker_network/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", + "chksum_sha256": "ae0071cbdc1f10ad0a69b2bcec3ad0c9026329d5a4a885c48defd2286853051c", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info", + "name": "tests/integration/targets/docker_network/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/meta", + "name": "tests/integration/targets/docker_network/tasks/tests", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/meta/main.yml", + "name": "tests/integration/targets/docker_network/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", + "chksum_sha256": "55534ba4791b0036bb9c117e9a7f6ae0394f80d5d4308a3dcf65f4564d7762e3", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/docker_network/tasks/tests/ipam.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d125372c2a14262ec4da6484cff93e4f96936c00c32fc42502e587b8bf0b4de2", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/tasks/main.yml", + "name": "tests/integration/targets/docker_network/tasks/tests/options.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4e7499cd99e0bbca866c83f9e97438811296d80caac7b25406ca6ddf8124c3c0", + "chksum_sha256": "4ab72fb542993d2d73fb972ec5d401bc2939b56bad2ed6e4717c24e33d1b48ad", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml", + "name": "tests/integration/targets/docker_network/tasks/tests/overlay.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "51669022bb766ea5ad43d8292a67f2e4057cb20341b77b1c3c88365c9956e6e4", + "chksum_sha256": "9b9ced6725b33b3fcae41e7341eb88bacedfdfaf7727abfe7304f5ff4fa9b867", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/templates", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, - "format": 1 - }, - { - "name": "tests/integration/targets/docker_stack_info/templates/stack_compose_base.yml", + "name": "tests/integration/targets/docker_network/tasks/tests/substring.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5558e4dad8831ef90d224785b65d7e8f2b1ad48f924cf80312b8005828c58e8c", + "chksum_sha256": "f7dc51530e72162b7a3c6806be4be3963aef34251036c222a06b1eeffc916985", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/templates/stack_compose_overrides.yml", + "name": "tests/integration/targets/docker_network/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1095458fd062b0208d910a56599ad4f748dc2997fad41168453c00499b224ae5", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_stack_info/vars", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "chksum_sha256": "dc33f1ea882658d11b8b05f9d7ecb3b5fa83f93874634d4a64fcf5b0ce4ee135", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/vars/main.yml", + "name": "tests/integration/targets/docker_network/tasks/run-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6d7c3098ce206b9a9edf4aabdf1016615bafe0f6e9f549a85693bb6212187f3c", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_info/aliases", + "name": "tests/integration/targets/docker_network/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info", + "name": "tests/integration/targets/docker_network_info", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/meta", + "name": "tests/integration/targets/docker_network_info/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/meta/main.yml", + "name": "tests/integration/targets/docker_network_info/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/tasks", + "name": "tests/integration/targets/docker_network_info/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/tasks/main.yml", + "name": "tests/integration/targets/docker_network_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "582b6f94d67b7c7d674fe8a5ad9d5fa35f130fd3ba5775281116112c752023e6", + "chksum_sha256": "a6aae8f07ab0cd76c415bc74687e29a6055c1fc27ae519bc5079d003d9309e6b", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml", + "name": "tests/integration/targets/docker_network_info/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "dcfd63fef6c062d68b21cbbf4ecb44656d4be44f167cbb86f758edc4f8842b86", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/templates", + "name": "tests/integration/targets/docker_node", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/templates/stack_compose_base.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "5558e4dad8831ef90d224785b65d7e8f2b1ad48f924cf80312b8005828c58e8c", + "name": "tests/integration/targets/docker_node/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/templates/stack_compose_overrides.yml", + "name": "tests/integration/targets/docker_node/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1095458fd062b0208d910a56599ad4f748dc2997fad41168453c00499b224ae5", + "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/vars", + "name": "tests/integration/targets/docker_node/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/vars/main.yml", + "name": "tests/integration/targets/docker_node/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6d7c3098ce206b9a9edf4aabdf1016615bafe0f6e9f549a85693bb6212187f3c", + "chksum_sha256": "7227db085c3248209f3c6e2ca999811ed192a2ab188e378e18981d45e5be024f", "format": 1 }, { - "name": "tests/integration/targets/docker_stack_task_info/aliases", + "name": "tests/integration/targets/docker_node/tasks/test_node.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", + "chksum_sha256": "6286e7ba1e8bd45d6eab7be864c5732a387f3660d2ac2f294e70aad9b2ada3d8", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, - "format": 1 - }, - { - "name": "tests/integration/targets/docker_swarm/meta", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, - "format": 1 - }, - { - "name": "tests/integration/targets/docker_swarm/meta/main.yml", + "name": "tests/integration/targets/docker_node/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2e40a69bda050967e474e8787b51b7343a60d5c7ac88685d66b556d160b942ea", + "chksum_sha256": "a76f4a620dfae81104aa5ee3c8aedd5b41550acf46aa7485ccc0d0e6a8bbc5a5", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks", + "name": "tests/integration/targets/docker_node_info", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/tests", + "name": "tests/integration/targets/docker_node_info/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/tests/basic.yml", + "name": "tests/integration/targets/docker_node_info/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f42801bcb3a8b28da82298d93c72bce7b06aec2ac62b0134559373b436a17268", + "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/tests/options-ca.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "2e311704bfd0fb615c074cd1d88cc7d1f7aa0c044855ac2d20f9fbe7970b5cdd", + "name": "tests/integration/targets/docker_node_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/tests/options.yml", + "name": "tests/integration/targets/docker_node_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4f2a436cbd0949e8de561b49e524728dc2b21b54152f0f81887ebae32591501e", + "chksum_sha256": "b07afb61b4d0234f26b27e0154db8933eb315f472e3dd4bfc053d32ba63bcc74", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/tests/remote-addr-pool.yml", + "name": "tests/integration/targets/docker_node_info/tasks/test_node_info.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fa587b2ce683007eb9ddff2fab626ca79444d22331c7cb359dcff22e111330d3", + "chksum_sha256": "6a27a92f404cbb84de0e074ad065e4050da9116196d76cc4e79d1a310f37c6d8", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/cleanup.yml", + "name": "tests/integration/targets/docker_node_info/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3f8752da0d3549538d46151303a14395f18841052a33fbd1f3e9ef36f9e633be", + "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "243eaa04af0c56a5361d4ae5e09fc7d1ee61ac8df474638a0d00dfa5cbf08db9", + "name": "tests/integration/targets/docker_plugin", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/tasks/run-test.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", + "name": "tests/integration/targets/docker_plugin/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm/aliases", + "name": "tests/integration/targets/docker_plugin/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2939bfeaa28470c221965664ddf11c7ce25f6a9fcadc5f55269d0b8f3b9f833a", + "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_info", + "name": "tests/integration/targets/docker_plugin/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_info/meta", + "name": "tests/integration/targets/docker_plugin/tasks/tests", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_info/meta/main.yml", + "name": "tests/integration/targets/docker_plugin/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "32dc8a4e25d13084a7e9c03f87b2b5f910ed8ce0aa90f78bded97d4afd1b17ad", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_info/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/docker_plugin/tasks/tests/basic_with_alias.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5a290c1014a5a347ce52f13a2f64ad3df22375badffd5a7d222a1399ff5ad8d1", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_info/tasks/main.yml", + "name": "tests/integration/targets/docker_plugin/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "13a1222f2d7ac6d7e4b7e7211c87611b37311abbe530091b1f9e29aacefab6e3", + "chksum_sha256": "9d9fdb52da705c4dfb2359e5c2d49068f19609f91763fb3d8777fed5627add36", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml", + "name": "tests/integration/targets/docker_plugin/tasks/run-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d683a3994213e00d5d0c04fb359352587f67eb6eabbb41aeb2039b9248f74c24", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_info/aliases", + "name": "tests/integration/targets/docker_plugin/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c8c82d6dae109c4dbb806e41bea1373d7168c14b933637e328f613cefbee7617", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service", + "name": "tests/integration/targets/docker_prune", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/files", + "name": "tests/integration/targets/docker_prune/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/files/env-file-1", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "6d22d5c5709850e8af4d069878fa79d7d8e54b88518a1655c50826e4b50ad045", - "format": 1 - }, - { - "name": "tests/integration/targets/docker_swarm_service/files/env-file-2", + "name": "tests/integration/targets/docker_prune/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4de8bfd3c7ac6214b41503ee6f850d0fc2d3b39da724c7b89948f776f01ae6bf", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/meta", + "name": "tests/integration/targets/docker_prune/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/meta/main.yml", + "name": "tests/integration/targets/docker_prune/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "e1128cf980ee7ef055acc2d4e41f36e4b7d798f6e73a22ba34f3be0b261b2ca1", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks", + "name": "tests/integration/targets/docker_prune/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_secret", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests", + "name": "tests/integration/targets/docker_secret/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml", + "name": "tests/integration/targets/docker_secret/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6c27bf7619ef931db612272bc93f422102d7c9a6ae7421ba8eebf66899533801", + "chksum_sha256": "48e41681961146fc376abdd7ef550952d84678a300f6310fd18910e2b270ac29", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "63928c37f597c1c166d3ba64c98dc53cd10b0411625257b55cec3411694e1513", + "name": "tests/integration/targets/docker_secret/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml", + "name": "tests/integration/targets/docker_secret/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ccebc3744bbb6688ed6e4e5b2d006d00fa8a8bb24c74f2b5e82f2d7363fbcc42", + "chksum_sha256": "55b9bb68e043a78a28f8c23dfef0efca1ffd97c34f616f9a91bb9a94bf4287e8", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml", + "name": "tests/integration/targets/docker_secret/tasks/test_secrets.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "67a0af5b1790bfd81812e4c5d653496cdbd70ab2d1d822b973d75ace7dbcf872", + "chksum_sha256": "d49058d648987547abe31655563a7663f1f5d71925417dcf249d795c45abdd44", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml", + "name": "tests/integration/targets/docker_secret/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3dd45ec7ca689d89b21e1376c7aa204eb44a90faec516dd229701c1df6f20692", + "chksum_sha256": "133d67cf2b2857f5a906a6e054498df8d5ddc556a3671cad8216d06d0dbd8e09", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/options.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "4dce97cdd2c4c6885e9979c15d1e1114aad7f120cd9927314b477c2b81a5fca7", + "name": "tests/integration/targets/docker_stack", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "4691c63c2b999d43c76dce2e1216b49cd9db273fb7da1bab432e36b2e79a0517", + "name": "tests/integration/targets/docker_stack/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml", + "name": "tests/integration/targets/docker_stack/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "77adb7833eb36b7490a9cd04b0c9c34d0a9041fed2fb358b1ba5ee6dc92ae133", + "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "4e0336e8cd66eb8d02a226a8421415af0ca1f68200591e20047a4f00db40b7a4", + "name": "tests/integration/targets/docker_stack/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml", + "name": "tests/integration/targets/docker_stack/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "91caac1825c75a0f34e4fd9e15316b280f8f57e608b224bf27d9e6977b1aed0f", + "chksum_sha256": "ba502e7508aed562c8c1e2a29ae54c3684ef7175e8c75483fd4d728d5136b054", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml", + "name": "tests/integration/targets/docker_stack/tasks/test_stack.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0efda11b80ce7f11c76752ea9c75221df6bddaf2675d07084f5aff3f95f87141", + "chksum_sha256": "75abdee49bb9be0d447a2cd08a115fdfa0dcde8711ba10bc14d7ac42cc383cd5", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "1240ebe3d5fcfdb70d244c6f456903a28d137375c282342e8d56c12c2dc93f05", + "name": "tests/integration/targets/docker_stack/templates", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/main.yml", + "name": "tests/integration/targets/docker_stack/templates/stack_compose_base.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "50f1f3d06cdb35e6427b99a2a932381863b96b8fd2c151754b37dd524ad4999b", + "chksum_sha256": "5558e4dad8831ef90d224785b65d7e8f2b1ad48f924cf80312b8005828c58e8c", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/tasks/run-test.yml", + "name": "tests/integration/targets/docker_stack/templates/stack_compose_overrides.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876", + "chksum_sha256": "1095458fd062b0208d910a56599ad4f748dc2997fad41168453c00499b224ae5", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/vars", + "name": "tests/integration/targets/docker_stack/vars", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/vars/main.yml", + "name": "tests/integration/targets/docker_stack/vars/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fe5d12fec25ef974db885fd92993fc20baf102c5db843c58dd4263fc80c46ccf", + "chksum_sha256": "6d7c3098ce206b9a9edf4aabdf1016615bafe0f6e9f549a85693bb6212187f3c", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service/aliases", + "name": "tests/integration/targets/docker_stack/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "133d67cf2b2857f5a906a6e054498df8d5ddc556a3671cad8216d06d0dbd8e09", + "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service_info", + "name": "tests/integration/targets/docker_stack_info", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service_info/meta", + "name": "tests/integration/targets/docker_stack_info/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service_info/meta/main.yml", + "name": "tests/integration/targets/docker_stack_info/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service_info/tasks", + "name": "tests/integration/targets/docker_stack_info/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service_info/tasks/main.yml", + "name": "tests/integration/targets/docker_stack_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "49f01091077b498b757787c7f3903018b0f226193f4396e56e596129f5b0e67b", + "chksum_sha256": "4e7499cd99e0bbca866c83f9e97438811296d80caac7b25406ca6ddf8124c3c0", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml", + "name": "tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5e6d91985843b6fc163541521a186c98afb5ebddbe5f43283553e24850b45804", + "chksum_sha256": "29e78c0d01610a78842ca6301e597e5945169162814e9cf5415bd66406c8246a", "format": 1 }, { - "name": "tests/integration/targets/docker_swarm_service_info/aliases", + "name": "tests/integration/targets/docker_stack_info/templates", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_info/templates/stack_compose_base.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "133d67cf2b2857f5a906a6e054498df8d5ddc556a3671cad8216d06d0dbd8e09", + "chksum_sha256": "5558e4dad8831ef90d224785b65d7e8f2b1ad48f924cf80312b8005828c58e8c", "format": 1 }, { - "name": "tests/integration/targets/docker_volume", + "name": "tests/integration/targets/docker_stack_info/templates/stack_compose_overrides.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1095458fd062b0208d910a56599ad4f748dc2997fad41168453c00499b224ae5", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_info/vars", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_volume/meta", + "name": "tests/integration/targets/docker_stack_info/vars/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6d7c3098ce206b9a9edf4aabdf1016615bafe0f6e9f549a85693bb6212187f3c", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_info/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_task_info", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_volume/meta/main.yml", + "name": "tests/integration/targets/docker_stack_task_info/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_task_info/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "0f3d9ae2d6857600b4881f03e3b5cb30b9492a75bce28ba914c621af34f3b7fa", "format": 1 }, { - "name": "tests/integration/targets/docker_volume/tasks", + "name": "tests/integration/targets/docker_stack_task_info/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_volume/tasks/tests", + "name": "tests/integration/targets/docker_stack_task_info/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "582b6f94d67b7c7d674fe8a5ad9d5fa35f130fd3ba5775281116112c752023e6", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5095994eb5af632106c94860af28783dfac2551ea3e83ca89ea1cbb8d5743e3c", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_task_info/templates", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_volume/tasks/tests/basic.yml", + "name": "tests/integration/targets/docker_stack_task_info/templates/stack_compose_base.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "475e8c5fd3509e7f3e96eebbd26aa97e19fe2975feacd6830894062429392dd9", + "chksum_sha256": "5558e4dad8831ef90d224785b65d7e8f2b1ad48f924cf80312b8005828c58e8c", "format": 1 }, { - "name": "tests/integration/targets/docker_volume/tasks/main.yml", + "name": "tests/integration/targets/docker_stack_task_info/templates/stack_compose_overrides.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6543ef6a25f219df5e563d0c1f01ef07f5b0a3dab90f402e9829c1bc74877a9a", + "chksum_sha256": "1095458fd062b0208d910a56599ad4f748dc2997fad41168453c00499b224ae5", "format": 1 }, { - "name": "tests/integration/targets/docker_volume/tasks/run-test.yml", + "name": "tests/integration/targets/docker_stack_task_info/vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_stack_task_info/vars/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "da6c09c1ac08f548c321efdee418d3bf6a621f65725d3d6de095119600a3e876", + "chksum_sha256": "6d7c3098ce206b9a9edf4aabdf1016615bafe0f6e9f549a85693bb6212187f3c", "format": 1 }, { - "name": "tests/integration/targets/docker_volume/aliases", + "name": "tests/integration/targets/docker_stack_task_info/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "chksum_sha256": "2ca2add1203cb87d27f8a9d1b37ebe4b8ab2837000380b695c048f1844eaa33f", "format": 1 }, { - "name": "tests/integration/targets/docker_volume_info", + "name": "tests/integration/targets/docker_swarm", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_volume_info/meta", + "name": "tests/integration/targets/docker_swarm/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_volume_info/meta/main.yml", + "name": "tests/integration/targets/docker_swarm/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "afb9965617dda796ed1d87d1a9cb81c0d18c52b89cecc9bd081a60de56421576", "format": 1 }, { - "name": "tests/integration/targets/docker_volume_info/tasks", + "name": "tests/integration/targets/docker_swarm/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/docker_volume_info/tasks/main.yml", + "name": "tests/integration/targets/docker_swarm/tasks/tests", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm/tasks/tests/basic.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cb9c1ca89a15900ef01b67813800f6f016ba88fb2c19d6f13d8c0b80c24658c0", + "chksum_sha256": "387c884ec51f37bcc743d8fe78e9c13bbc53525d4a33f53ba005bdcb393c7b82", "format": 1 }, { - "name": "tests/integration/targets/docker_volume_info/aliases", + "name": "tests/integration/targets/docker_swarm/tasks/tests/options-ca.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "chksum_sha256": "2e311704bfd0fb615c074cd1d88cc7d1f7aa0c044855ac2d20f9fbe7970b5cdd", "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests", + "name": "tests/integration/targets/docker_swarm/tasks/tests/options.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "74407ee96908822f1669a5533152b377a3ed04acddbbbb9a8ecb0870ee830fa6", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm/tasks/tests/remote-addr-pool.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "fd8a708bda8339d4feedf71a2cc75d1f8290b12ecb46c3a5d8e8cb31bebbbfe2", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm/tasks/cleanup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "52911a90fe5216a651eb3f21c03b8c2efdcd3a2e6674037acb3389bfd21b45c0", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "83facb629ba05b88437476933f76de29c5b3d771c73016683130c160f467bdd7", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm/tasks/run-test.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "2939bfeaa28470c221965664ddf11c7ce25f6a9fcadc5f55269d0b8f3b9f833a", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_info", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/files", + "name": "tests/integration/targets/docker_swarm_info/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/files/nginx.conf", + "name": "tests/integration/targets/docker_swarm_info/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "381b6215898f79b477b52759f461ca424f6a9853edc0bc3d29790a2dfd8b8cd5", + "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf", "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/filter_plugins", + "name": "tests/integration/targets/docker_swarm_info/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/filter_plugins/filter_attr.py", + "name": "tests/integration/targets/docker_swarm_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1b0dd3b809d30ef9b8836388c0e36f336bb9e640cd633b41a90efdb1d7faad7b", + "chksum_sha256": "13a1222f2d7ac6d7e4b7e7211c87611b37311abbe530091b1f9e29aacefab6e3", "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/meta", + "name": "tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a66e2f1d82c3ab32d59c07635c4d20abf69b8d323b96ddf841357b6b0b58cdfa", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_info/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c8c82d6dae109c4dbb806e41bea1373d7168c14b933637e328f613cefbee7617", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/meta/main.yml", + "name": "tests/integration/targets/docker_swarm_service/files", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/files/env-file-1", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2e40a69bda050967e474e8787b51b7343a60d5c7ac88685d66b556d160b942ea", + "chksum_sha256": "6d22d5c5709850e8af4d069878fa79d7d8e54b88518a1655c50826e4b50ad045", "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/tasks", + "name": "tests/integration/targets/docker_swarm_service/files/env-file-2", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4de8bfd3c7ac6214b41503ee6f850d0fc2d3b39da724c7b89948f776f01ae6bf", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/tasks/main.yml", + "name": "tests/integration/targets/docker_swarm_service/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d1a4c0b993bb9bae997868b46fd203fd697565bbed7bda9dacbec412625ec6ae", + "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf", "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/vars", + "name": "tests/integration/targets/docker_swarm_service/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/vars/main.yml", + "name": "tests/integration/targets/docker_swarm_service/tasks/tests", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0e08bc6e9da871f3893df657e47555078a5e051446f74c7ae04d88d71cea3caa", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "64d83c648bb5a90d040d22209445a005cde9cd5421410e85a9b58ac8b8416730", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "fb520c37c45a16afd89c1db80ea47f87a29f1f6709fbac1c0129ed5336f2d092", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "feb2f64cf09a5c3c3671ddb63424106f859e56ee6458903fe1a88314d7913b5e", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ee6f4d57049dd41e941bf38e68aa000210a8f672424db0f8d691f437faa5922e", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/options.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5fa2417d8fb8b3cb832a4856894d8cdb1fad7f2151cc5115ccdd9a910b554440", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "76afa0a98842465343c95aee8c81af356c4fb7fd6787c1d6220606f2c0cac36f", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4752983e928afbb32ed4c6b0b4e56b063bfa9c7f8bb4946cdfe32c82b9173866", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "939859cca097d56b76018f72b0c332e5aad767b51c2b4dbac7289d480d2ec13d", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b16436cb7ffde9b0c6360bacc9c24e177e747e701c38e9b548ea4bcfb9ffad7d", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "dca8535022b87072bd2c56dfa28fc5191123d54bf85b77b84a06d50bb4e24947", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "88c0380d4311ed88be4d4a8bae09c883c23eb6dc6150bd8fc812bb6dda6142f4", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "11581ee9556a8936a8ab16d8d1efeb94d7c48255103a35b466eda5043985ea17", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/tasks/run-test.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/vars/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "380d6716f8abcfa414e9174dffc3bb2b86aafc97ec7594f473b2ac1a3ffa9974", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "133d67cf2b2857f5a906a6e054498df8d5ddc556a3671cad8216d06d0dbd8e09", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service_info/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service_info/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service_info/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "49f01091077b498b757787c7f3903018b0f226193f4396e56e596129f5b0e67b", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "de9df1f83213750697c77b492330e8272ab72e2e4b6132a90a67025fe03a72fe", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_swarm_service_info/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "133d67cf2b2857f5a906a6e054498df8d5ddc556a3671cad8216d06d0dbd8e09", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/tasks/tests", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/tasks/tests/basic.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "475e8c5fd3509e7f3e96eebbd26aa97e19fe2975feacd6830894062429392dd9", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "fd4eca112abb405d6608e364103379b1d106c0fd8f61b7b7ee464a5756d3e4ed", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/tasks/run-test.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "589896d784e4a7b77ed0c607c47d776ee00968bf212f82097e73498a3754b65b", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume_info/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume_info/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume_info/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3c191889c5d70676ec95292c46169b822c7bd262a8f52294820f482bea2d188d", + "format": 1 + }, + { + "name": "tests/integration/targets/docker_volume_info/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/files", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/files/nginx.conf", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "381b6215898f79b477b52759f461ca424f6a9853edc0bc3d29790a2dfd8b8cd5", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/filter_plugins", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/filter_plugins/filter_attr.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1b0dd3b809d30ef9b8836388c0e36f336bb9e640cd633b41a90efdb1d7faad7b", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b0d732afa83688b5150e3b820884f8342c9ee4c0d9a56858687e17584d6b4de1", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "da42f5ed16ff85517f2feb4316aa384d68c3a69f1ba3b3402b472ebc5b771f43", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/vars/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5f127d1b97bf228ef19a0c0c998f7a7611f43087865121d35beec0fb44a07a25", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_connection_tests/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_ssh_connection", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_ssh_connection/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_ssh_connection/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "515ee11c2347dabc82e8f82887d5b978fd93ef1f324c0dc208182baca2b638a0", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_ssh_connection/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/generic_ssh_connection/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "89d9d7da7291d856cc871282536f110a0b38c459b43ba2925444cc4c0595133c", + "format": 1 + }, + { + "name": "tests/integration/targets/generic_ssh_connection/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "bd4b5ae853d3f070a2fd4b1ccdb6460d73fe1ffaa6b95e64bc49302b8bcf82ab", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6fbc5e2468efd3c9de72d5eb1061a59b4c3ac7274c4857be455efcc35e8610d5", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/playbooks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "05c43d3ee07e3844fc8e887e51e7aac1724e5e02b762847a6bbe4a5141825c16", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c7baa4866eb0bf2867252beb9a89b1aa709d912818f4364deb2bf35267b59c6f", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5a161e8190369dce67ab9b59f2c4109fbfda3ce2cac66c80412b7aacc558c996", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e932ce6bae051ae264322180fced5ee38ce01ccd2c1b5c8ca4d4fa855e1bffd8", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4e6239eaffde9b964ae0ea057e9ae6baa4f6cffef7c2268f5cf62c51119ae403", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/inventory_1.docker.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "8f3a49b3d86cc4cf58ce41ca680ce530d5f1dbcdb4beec75cf4f9268c35fa158", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/inventory_2.docker.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f6beeec0f8619270e63d4170509329cb1ee10be468ad063be53eff92f1da9340", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_containers/runme.sh", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "959dd0ebdd942dd1ea2518dcafecf11004ffe7f3ab4f6eb3ddf418a6fd2a947e", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/playbooks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "87061ebde573e07bac6d43d7991eb716942a931ae0f4e4a51e53e6a6a2f81fb2", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/playbooks/setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c6c4acace943f19a423f728fb3b7a198e4c0d16de5fd5c39dcc4e1ea42833f05", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/playbooks/teardown.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5fb12ec2a705ea03541a5d495fdd74b57795355ccc8f119bf420d2fd6f712972", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d27d7401d8892de9d3af62c3480a002f0a7ea651a0a57790842c3f544447b0cb", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "7b5d49be8f1ede2b4c37f1bc615adc0a60a717430e92655f88bd85d0beaabc87", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/docker-machine", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "be46924912c9e2ad743df5123a599c11e883e4fcf37f6521b17855c8e8548b60", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/inventory_1.docker_machine.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a6a2559f4b458d19217644547f8652c9f4559ee0f173c22db9d5f4b32f5f5071", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/inventory_2.docker_machine.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "dc839d48eb9e045d698358e82410f7566fea3e83c5a74dca4b0a5b5c20604d63", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/inventory_3.docker_machine.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ff090e5f93098c3d15ee6f8cbf9bfc35d896a430fe96ba4eab5779335778e4d0", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/runme.sh", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "40d6b2c962e3c75f15ce208eeb6d47cf16b4049560ed69c977e74fb1a2f465c2", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_machine/teardown.docker_machine.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b921d0f0539ea489e8328930b125ec2450c68df24888fa04c6e6a5004688fdf5", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "cd202950e619805dd026c97d7f544448832e6e453bb905939e6e8f86b40700cf", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/playbooks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "08ae593373e067d4f51b95903ecf66e764ad9e690f1f287cfe436899e99b0a2f", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "7264337e3c80dbe3ba6d521850c653da85767df86814af18a03b90a7b64fb2ec", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_1.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "47032a015d42f2e145e31cc49e090d009d6e936a6513488d41c2b634fa8ae067", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_2.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6ce9bdef7ce1824461d19fbc4612ee107db92363f7be6471e8bbfae2761db9bc", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a76f4a620dfae81104aa5ee3c8aedd5b41550acf46aa7485ccc0d0e6a8bbc5a5", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/inventory_1.docker_swarm.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d53b438fa30657a4719b2163d3e1d9ec1b4a76b857cc1d0c1fb75719de6140a1", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/inventory_2.docker_swarm.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4885e38129798ed56b4c6478dcf4021f8394b13cb3ff8105b15087427bd7db46", + "format": 1 + }, + { + "name": "tests/integration/targets/inventory_docker_swarm/runme.sh", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "9165553f336b498778d029796fb63fce86d53d9a8a3ffc42190c20a9442a4e66", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/defaults", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/defaults/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "588fe56f36b397ee3f8e5f44732ccda89632bad1b148143d06cd21365c162542", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/handlers", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/handlers/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5fde8f14499aecccaad502ae36b1cdc7d40057275b62fc255cb8c791fefcd7ae", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "cb68a78cb264725dfaa8d3647048f08b136626454fb58e349c909e13b19d4be1", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/tasks/Alpine.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "13b468db50d2d5e6f76a989547a8ba2d9b6552a355d86173ea3f1fd7619309b9", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/tasks/Archlinux.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c16c3a0ff7c4a2e18e4c5bb19b399f5daca23c215824b24ebc0cc3bd7f186acc", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/tasks/Debian.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ac7c57ac9681637833b5df5081ce65b8046c6fed06e10fefbd9f0288f8523fe2", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/tasks/Fedora.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d863eb3a64a49cd5f9d1967f5c6e4322df7c5ae23da2b77fc5548acc36c330a5", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker/tasks/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "14638ce9bffa141ed24360a6b3829bc932cc92d32534849dff7e47c8dbd4d337", + "chksum_sha256": "61b1cb888fba1895e31ae5aea25ae1425fc87e045809ad384c4d436a15265509", "format": 1 }, { - "name": "tests/integration/targets/generic_connection_tests/aliases", + "name": "tests/integration/targets/setup_docker/tasks/RedHat-8.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c22c090ea76cdd2a6ccd1689e016e014e4b1970a498e6db3123d5c95fb7a352b", + "chksum_sha256": "e32a46e88ab1f621858d0dfb1d4d6928fd9b497c413c2daa153a127543516a94", "format": 1 }, { - "name": "tests/integration/targets/generic_ssh_connection", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/setup_docker/tasks/RedHat-9.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e32a46e88ab1f621858d0dfb1d4d6928fd9b497c413c2daa153a127543516a94", "format": 1 }, { - "name": "tests/integration/targets/generic_ssh_connection/meta", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/setup_docker/tasks/Suse.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a9a08463e216f4e3b18c53c3414e7f0142449f74271a3d1e8a9946e134f6be16", "format": 1 }, { - "name": "tests/integration/targets/generic_ssh_connection/meta/main.yml", + "name": "tests/integration/targets/setup_docker/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3f6945a1293b14cbefecf8301fcc7cabaa845fabc7e6e5d4df97a159a848bb2c", + "chksum_sha256": "55ce15cf1ed1c55a7819cccd60385f8368b79ee831c8c458fab6eaef4d4f7f28", "format": 1 }, { - "name": "tests/integration/targets/generic_ssh_connection/tasks", + "name": "tests/integration/targets/setup_docker/vars", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/generic_ssh_connection/tasks/main.yml", + "name": "tests/integration/targets/setup_docker/vars/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "14607372b8b35f3d63772def7438c148309e00910ff86483b4b97c79683178b1", + "chksum_sha256": "1f985a9ad67fa63a915ab2c0d7c6f16eaad6f73f3ed8e769b22dd4c46023a7f6", "format": 1 }, { - "name": "tests/integration/targets/generic_ssh_connection/aliases", + "name": "tests/integration/targets/setup_docker/vars/Fedora.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bd4b5ae853d3f070a2fd4b1ccdb6460d73fe1ffaa6b95e64bc49302b8bcf82ab", - "format": 1 - }, - { - "name": "tests/integration/targets/inventory_docker_containers", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, - "format": 1 - }, - { - "name": "tests/integration/targets/inventory_docker_containers/meta", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/meta/main.yml", + "name": "tests/integration/targets/setup_docker/vars/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", + "chksum_sha256": "d8fac5856f538ceb01bcfa39157cc49b2fd4b06f90f81b139931dfb51ba1d3fa", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/playbooks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/setup_docker/vars/RedHat-8.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a70c3f81eb70f10095a54ea59d8bd2d78fa5ed57f0c6baf7c2ea73473fad833b", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml", + "name": "tests/integration/targets/setup_docker/vars/RedHat-9.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5d0d6301e49a5fc4eceb3468d2b833815c057e150f3ea27256f225ee4a9a5197", + "chksum_sha256": "22e0ea71c4c03de665af5fbb1f6c25f6da56b4005791f7ee6ab9d6ee6a362175", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml", + "name": "tests/integration/targets/setup_docker/vars/Suse.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9bcbf0242cf31ea9c9e2b33906aa190f6c303265eae7bc4d861865a5dc9c85ea", + "chksum_sha256": "2b47800d1b37d41dc93ba12a5eab51ce8b4eef0560f93e1de80734b45cde9bfc", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml", + "name": "tests/integration/targets/setup_docker/vars/Ubuntu-14.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "af2c1f6951764bdb3304293f537340311b190332149a4841b77a4549f0dc76fe", + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml", + "name": "tests/integration/targets/setup_docker/vars/Ubuntu-22.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b81c39ab9b889d123c581bddf0b408b56925e735d1f0969c100f93ebc3525f93", + "chksum_sha256": "f3b92e7d0fc430c53df055f9a785d5c02a02a4722f2b503d1f09c721d29e8dcd", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/aliases", + "name": "tests/integration/targets/setup_docker/vars/default.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4e6239eaffde9b964ae0ea057e9ae6baa4f6cffef7c2268f5cf62c51119ae403", + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/inventory_1.docker.yml", + "name": "tests/integration/targets/setup_docker/vars/main.env", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8f3a49b3d86cc4cf58ce41ca680ce530d5f1dbcdb4beec75cf4f9268c35fa158", + "chksum_sha256": "341f81cf995a411aeee4799a14e238ee17d2552053de4376ceeb57363bd805b0", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/inventory_2.docker.yml", + "name": "tests/integration/targets/setup_docker/vars/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f6beeec0f8619270e63d4170509329cb1ee10be468ad063be53eff92f1da9340", + "chksum_sha256": "5f127d1b97bf228ef19a0c0c998f7a7611f43087865121d35beec0fb44a07a25", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_containers/runme.sh", + "name": "tests/integration/targets/setup_docker/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9e9f61933604532e33a6df228c8165615864926686a4f278bccf7574725a471f", + "chksum_sha256": "cb09ffab7e455855046b8e8ef753c031bcd11a625c879517fa98335d23b15af8", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine", + "name": "tests/integration/targets/setup_docker_cli_buildx", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/meta", + "name": "tests/integration/targets/setup_docker_cli_buildx/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/meta/main.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/meta/main.yml", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "0b6cbfff0581c89d9114e38c9c9d6a5f688dbaa924e60b29e8d774eb1203c2ed", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/playbooks", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5d1010cfea76fb1da2a38e7b0606fee27ea8fee1ab85f320f74f84f67e9aef2f", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/playbooks/setup.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c6c4acace943f19a423f728fb3b7a198e4c0d16de5fd5c39dcc4e1ea42833f05", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/playbooks/teardown.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5fb12ec2a705ea03541a5d495fdd74b57795355ccc8f119bf420d2fd6f712972", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "479137773b0cfabfe917e49d9df636b2a7c127697b1e1affe25c8afc2e372b8d", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/aliases", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7b5d49be8f1ede2b4c37f1bc615adc0a60a717430e92655f88bd85d0beaabc87", + "chksum_sha256": "00790dc5d03168159d5780e0cc7b3a3a73b9fed8aa7ab5c84f538b189ed7c2df", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/docker-machine", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "be46924912c9e2ad743df5123a599c11e883e4fcf37f6521b17855c8e8548b60", + "chksum_sha256": "1d99d87f0c899b2a5f9e72705de13726d9499905a88ee7d0518d1e0a5ecc5afa", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/inventory_1.docker_machine.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a6a2559f4b458d19217644547f8652c9f4559ee0f173c22db9d5f4b32f5f5071", + "chksum_sha256": "eb7b20e68f175f1be8cd72e7c62f1943db97b151d0b39c0573efaf92ea74f8c3", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/inventory_2.docker_machine.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "dc839d48eb9e045d698358e82410f7566fea3e83c5a74dca4b0a5b5c20604d63", + "chksum_sha256": "40fbe81fae1589d08d7026a9b648bd1b836c54e24d28c5311d778838926879bb", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/inventory_3.docker_machine.yml", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ff090e5f93098c3d15ee6f8cbf9bfc35d896a430fe96ba4eab5779335778e4d0", + "chksum_sha256": "721d802f4ff5041cb0d78ee17e9555375422ec46ead9d8c3eeec197661887b2f", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/runme.sh", + "name": "tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b7766b726c1bd9f7f88d041949de164708050e7cc2391db54e760bfdf0c0a18e", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_machine/teardown.docker_machine.yml", + "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": "b921d0f0539ea489e8328930b125ec2450c68df24888fa04c6e6a5004688fdf5", + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm", + "name": "tests/integration/targets/setup_docker_cli_compose", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/meta", + "name": "tests/integration/targets/setup_docker_cli_compose/meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/meta/main.yml", + "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/inventory_docker_swarm/playbooks", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4ed42dbc1535e9e1ed04ce48c1c29ccdf0d0557d3d7ec31b7184715fc7646b34", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a51b147e6b4279c06868ae43e1f0ca6aaf0796f431ac0d02e1791b7b85853f71", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_1.yml", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "50990446c3a0aca46ef553dc78deaa5f9c570d065773ae077205a22611332206", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_2.yml", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3091b4e9cd27f5cae56df438fdfd996ad4ed3ce5a02bb8c8c8005e0fce09d97b", + "chksum_sha256": "8c799c5451b3a64dd1fd3d8b578d17b92a074a78f5cb34104da51f04877109b1", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/aliases", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a76f4a620dfae81104aa5ee3c8aedd5b41550acf46aa7485ccc0d0e6a8bbc5a5", + "chksum_sha256": "6cbc07316095dcf5ff8cf95bd2e57095ae2187fab0c9edf224e0d6bf212f553b", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/inventory_1.docker_swarm.yml", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d53b438fa30657a4719b2163d3e1d9ec1b4a76b857cc1d0c1fb75719de6140a1", + "chksum_sha256": "0391df4795e8bbf89618a8ebb1c3ce3458cd06474f1a9e9d9f8cdf1139a8a384", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/inventory_2.docker_swarm.yml", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4885e38129798ed56b4c6478dcf4021f8394b13cb3ff8105b15087427bd7db46", + "chksum_sha256": "eb33f9ec7af9d4a5355e1aa3685fbbe9ced427ad030d1ce36f1f36c3eaa051c7", "format": 1 }, { - "name": "tests/integration/targets/inventory_docker_swarm/runme.sh", + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b4b637a7352ac0fd0648dbced168f58e41cbc8b283d3b142575cc02dd7e84820", + "chksum_sha256": "d1ea224b6e53e3f587af86e5f8d988e9569011d2e1d3f98a3f5836abaf3085b9", "format": 1 }, { - "name": "tests/integration/targets/setup_docker", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/setup_docker_cli_compose/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "574619bac82e7a65751db428c58b2c44a12e827c723289dc0dcaaef2a97867cf", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/defaults", + "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/defaults/main.yml", + "name": "tests/integration/targets/setup_docker_cli_compose/vars/default.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "816dab7edb5481fbc8dffd209ae9732cf7a1e0bda4fe7878cedc13cba59fd7aa", + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/handlers", + "name": "tests/integration/targets/setup_docker_compose_v1", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker/handlers/main.yml", + "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": "b3404a9480a664270525437804a3d4e92476437dcedea0c04500deb7e9447f25", + "chksum_sha256": "ce4bb65d99952f682f7153558914669854e3ce0113789d6d0c09b2d58d6423d6", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/meta", + "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/meta/main.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cb68a78cb264725dfaa8d3647048f08b136626454fb58e349c909e13b19d4be1", + "chksum_sha256": "73fc081e424b642eeab13b34ec6594726fa079ea946df22fdf7e0cc75fece2d3", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/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/tasks/Alpine.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Alpine.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a00dae9faebfe611f6ba4613ce7e2b94470f1e67569f681856d5f5a467880b31", + "chksum_sha256": "b71b69524c05e82aeea8ba71809e08218c45a108eb50e73bb81ddcfafbc0f48c", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/tasks/Archlinux.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Archlinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a842e87e49be318f933fa1d52ceacdcfe206b13c99636d97a687cbb29bb54b68", + "chksum_sha256": "b70baef7cc2b4cc553b7a6dde5aba91de029be5c08c2d0373ec57a0bccacb645", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/tasks/Debian.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ac7c57ac9681637833b5df5081ce65b8046c6fed06e10fefbd9f0288f8523fe2", + "chksum_sha256": "72be467f15cffa21fa7eefbb26646f78d49787b9d30b97d41bbc045242ecc792", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/tasks/Fedora.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Fedora.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "973ca3fe69d1a35233d492616b0c308b9d210917329736bcb3e2244ec7c1c92e", + "chksum_sha256": "f75f1446ccac863d07c5a0503bef419b8be29b5556a10b7200bdf7ac2f87d6b0", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/tasks/RedHat-7.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "61b1cb888fba1895e31ae5aea25ae1425fc87e045809ad384c4d436a15265509", + "chksum_sha256": "0eb71ce9c438e1425fe68baefcd0e4ef0fdcf189f7610be09a3987f136270efd", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/tasks/RedHat-8.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-8.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e32a46e88ab1f621858d0dfb1d4d6928fd9b497c413c2daa153a127543516a94", + "chksum_sha256": "bf017f59cbd79a3501fa97c8a25f789dd4344a58d5cbe3a53d68390b3930c642", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/tasks/RedHat-9.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-9.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e32a46e88ab1f621858d0dfb1d4d6928fd9b497c413c2daa153a127543516a94", + "chksum_sha256": "bf017f59cbd79a3501fa97c8a25f789dd4344a58d5cbe3a53d68390b3930c642", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/tasks/Suse.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f68eb447d468102984e5ab060403d29d7ecc30d88192cee202e7b998bca6ece1", + "chksum_sha256": "8eb0b2d6ae8ba75408d500d36c1bc26325d79d3277f29a35bf6e7a7dc73cbac8", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/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_v1/tasks/setup.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "639126b99b8ddc987b4340790ba783ddacf4ce3741b05bd1c05e33db6da1c939", + "chksum_sha256": "d0f71068688a01b29984ff13a35fbcb2ddc306d511c8f63ca66a57db807b44b6", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/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/vars/Debian.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1f985a9ad67fa63a915ab2c0d7c6f16eaad6f73f3ed8e769b22dd4c46023a7f6", + "chksum_sha256": "95ea3c984062c116932d4d4608d7f25d9e0f9a328c98b5be8ff135ccf3c9ffc7", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/Fedora.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", + "chksum_sha256": "10152adf3d38b6a56495180b4585ffea1ca37943561b97ce2fb504dcedcb6339", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/RedHat-7.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/CentOS-8.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "646aba9f18362f886a8d806cc2129a958ba226d851d54e55b805140a8b14ab7e", + "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/RedHat-8.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a70c3f81eb70f10095a54ea59d8bd2d78fa5ed57f0c6baf7c2ea73473fad833b", + "chksum_sha256": "57bb4c8bfe93488522b1b6e6fe14783266ebf1692fdcbf8743b76b248ae0484a", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/RedHat-9.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "22e0ea71c4c03de665af5fbb1f6c25f6da56b4005791f7ee6ab9d6ee6a362175", + "chksum_sha256": "57bb4c8bfe93488522b1b6e6fe14783266ebf1692fdcbf8743b76b248ae0484a", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/Suse.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2b47800d1b37d41dc93ba12a5eab51ce8b4eef0560f93e1de80734b45cde9bfc", + "chksum_sha256": "fd5145a46e8fb735a465794fb7daf159b2777397fa9e206df45052e2855f2946", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/Ubuntu-14.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/RedHat-8.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "718e986033765b8744119a049b8d6c6efc048cb3eacd85edcb42c6a69e08cdcc", + "chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/Ubuntu-22.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/RedHat-9.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f3b92e7d0fc430c53df055f9a785d5c02a02a4722f2b503d1f09c721d29e8dcd", + "chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/default.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Suse-py2.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", + "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/main.env", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Suse-py3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "341f81cf995a411aeee4799a14e238ee17d2552053de4376ceeb57363bd805b0", + "chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/vars/main.yml", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "14638ce9bffa141ed24360a6b3829bc932cc92d32534849dff7e47c8dbd4d337", + "chksum_sha256": "db950d02e92758a200434ecf25d81c90e7f076466be75332673c714b6be638a0", "format": 1 }, { - "name": "tests/integration/targets/setup_docker/aliases", + "name": "tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-16.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cb09ffab7e455855046b8e8ef753c031bcd11a625c879517fa98335d23b15af8", + "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", + "format": 1 + }, + { + "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_v1/vars/Ubuntu.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0061c7189c312bb9d118ae0390ed09046eb9de90e29df5da0db043f571de71b5", + "format": 1 + }, + { + "name": "tests/integration/targets/setup_docker_compose_v1/vars/default.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose", + "name": "tests/integration/targets/setup_docker_compose_v2", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/defaults", + "name": "tests/integration/targets/setup_docker_compose_v2/defaults", "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_compose_v2/defaults/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5a0dcbb1be4a30a25685755533954499a8849453b5758f093fbc74c9025d1ae5", + "chksum_sha256": "88ac959ec39f15f69e1541912e2a55c74ad2e6410b94b5c6f3d37e1c872af130", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/meta", + "name": "tests/integration/targets/setup_docker_compose_v2/meta", "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_compose_v2/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_v2/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_v2/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_v2/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_v2/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_v2/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_v2/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_v2/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_v2/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_v2/tasks/Suse.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "98482fccb6f0c23a063c8cda39f6fc783da5fad6d2c4e93319e4462c76a44dcb", + "chksum_sha256": "8eb0b2d6ae8ba75408d500d36c1bc26325d79d3277f29a35bf6e7a7dc73cbac8", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/tasks/main.yml", + "name": "tests/integration/targets/setup_docker_compose_v2/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "14c06a6d94f6eec3b1691433c009b560cccfe8edff15164ce7076ed03f73a603", + "chksum_sha256": "19c26334b4c5f43997149e30864ab9989a16a038f09b528e0d889610c58d7fc6", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/tasks/setup.yml", + "name": "tests/integration/targets/setup_docker_compose_v2/tasks/setup.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "347de1b4ae8ddb1c9c51606f248b23047ef5bd881d662eee6bf07d4b59ab7fc3", - "format": 1 - }, - { - "name": "tests/integration/targets/setup_docker_compose/vars", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "chksum_sha256": "31f09b7f032289ec891a08c4df8735e387e24e779b0b6c1a330361e19dc15fac", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/vars/CentOS-8.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", + "name": "tests/integration/targets/setup_docker_compose_v2/vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml", + "name": "tests/integration/targets/setup_docker_compose_v2/vars/Alpine.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_v2/vars/Archlinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25", + "chksum_sha256": "047f7e71a9d692af77f7b4450878eda6306af058e2ab8f83a8ff005cfa0f6db6", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/vars/RedHat-9.yml", + "name": "tests/integration/targets/setup_docker_compose_v2/vars/Fedora.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c892ab9caff1f3abc4d33665d2dbc8d400aa5c19a8da57aa68b9d361e19a7d25", + "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/vars/Suse-py2.yml", + "name": "tests/integration/targets/setup_docker_compose_v2/vars/default.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "0061c7189c312bb9d118ae0390ed09046eb9de90e29df5da0db043f571de71b5", + "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_compose/vars/Ubuntu-16.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", + "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_compose/vars/Ubuntu-18.yml", + "name": "tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", + "chksum_sha256": "41bf68c553802d515363d753ddcb1dd210353046bbce15372476067f260176c6", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose/vars/Ubuntu.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "0061c7189c312bb9d118ae0390ed09046eb9de90e29df5da0db043f571de71b5", + "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_compose/vars/default.yml", + "name": "tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", + "chksum_sha256": "fdc6377d741426c14f7cae91fe58584664a155b76ff1725cd005f05f98efc577", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2", + "name": "tests/integration/targets/setup_docker_python_deps", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/defaults", + "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_compose_v2/defaults/main.yml", + "name": "tests/integration/targets/setup_docker_python_deps/defaults/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "88ac959ec39f15f69e1541912e2a55c74ad2e6410b94b5c6f3d37e1c872af130", + "chksum_sha256": "721c28099649141d17cacdcdb886f4de0188ddadac86852f2abb6a334830de34", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/meta", + "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_compose_v2/meta/main.yml", + "name": "tests/integration/targets/setup_docker_python_deps/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "73fc081e424b642eeab13b34ec6594726fa079ea946df22fdf7e0cc75fece2d3", + "chksum_sha256": "cb68a78cb264725dfaa8d3647048f08b136626454fb58e349c909e13b19d4be1", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks", + "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_compose_v2/tasks/Alpine.yml", + "name": "tests/integration/targets/setup_docker_python_deps/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b71b69524c05e82aeea8ba71809e08218c45a108eb50e73bb81ddcfafbc0f48c", + "chksum_sha256": "decb7c8ff488a40f3ff28d848a09158ae3a0b33675b4ee27320bd90cd0879f3c", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/Archlinux.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "b70baef7cc2b4cc553b7a6dde5aba91de029be5c08c2d0373ec57a0bccacb645", + "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_compose_v2/tasks/Debian.yml", + "name": "tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "72be467f15cffa21fa7eefbb26646f78d49787b9d30b97d41bbc045242ecc792", + "chksum_sha256": "849f8ca19544ea366e1209448768a68238e0ec4a55d09daa9bb9817e4d51df98", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/Fedora.yml", + "name": "tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f75f1446ccac863d07c5a0503bef419b8be29b5556a10b7200bdf7ac2f87d6b0", + "chksum_sha256": "5cb84acc4451ea34b384dbd22bf68b593398d4fe490d313dfbd0ea043dbde0fa", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/RedHat-7.yml", + "name": "tests/integration/targets/setup_docker_python_deps/vars/default.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0eb71ce9c438e1425fe68baefcd0e4ef0fdcf189f7610be09a3987f136270efd", + "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/RedHat-8.yml", + "name": "tests/integration/targets/setup_docker_python_deps/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bf017f59cbd79a3501fa97c8a25f789dd4344a58d5cbe3a53d68390b3930c642", + "chksum_sha256": "cb09ffab7e455855046b8e8ef753c031bcd11a625c879517fa98335d23b15af8", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/RedHat-9.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "bf017f59cbd79a3501fa97c8a25f789dd4344a58d5cbe3a53d68390b3930c642", + "name": "tests/integration/targets/setup_docker_registry", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/Suse.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "98482fccb6f0c23a063c8cda39f6fc783da5fad6d2c4e93319e4462c76a44dcb", + "name": "tests/integration/targets/setup_docker_registry/files", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/main.yml", + "name": "tests/integration/targets/setup_docker_registry/files/nginx.conf", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "19c26334b4c5f43997149e30864ab9989a16a038f09b528e0d889610c58d7fc6", + "chksum_sha256": "235e9368742b2df29f384151996978b3dc53b656b446ce7bae814b46515af48b", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/tasks/setup.yml", + "name": "tests/integration/targets/setup_docker_registry/files/nginx.htpasswd", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "31f09b7f032289ec891a08c4df8735e387e24e779b0b6c1a330361e19dc15fac", + "chksum_sha256": "78a467484164809e507e71864bf48871ea79946ab426ce11334c1ab138ca07df", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/vars", + "name": "tests/integration/targets/setup_docker_registry/handlers", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/vars/Alpine.yml", + "name": "tests/integration/targets/setup_docker_registry/handlers/cleanup.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", + "chksum_sha256": "120d0201a317b41b424e1e8fd4f96f6d039a133f07e34dc04b1d785b56009c60", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/vars/Archlinux.yml", + "name": "tests/integration/targets/setup_docker_registry/handlers/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "047f7e71a9d692af77f7b4450878eda6306af058e2ab8f83a8ff005cfa0f6db6", + "chksum_sha256": "0164b1d9b906a26e940039887c4e537d33393676ce190cf09ad2096362e773de", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/vars/Fedora.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "f20697da978c8ed625b345961999507bdc44548fc6f322804cce12c8106148a0", + "name": "tests/integration/targets/setup_docker_registry/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_compose_v2/vars/default.yml", + "name": "tests/integration/targets/setup_docker_registry/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "63a1b79555c097c3c1d8b0bdb2b84b86b91873c6d3d55b7534067c8fea6d41fb", + "chksum_sha256": "2817df3a1acffc7941cbe75ff9125d401a566c95e787d2deaa091e54c335bff3", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry", + "name": "tests/integration/targets/setup_docker_registry/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/files", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/integration/targets/setup_docker_registry/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "69567cec31856b0adcb7f98ece5daf2828a15932550322e4ad84048138296cb1", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/files/nginx.conf", + "name": "tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "235e9368742b2df29f384151996978b3dc53b656b446ce7bae814b46515af48b", + "chksum_sha256": "366fffda5da5f3ef62aa30de4b1ddf2bab5059b2c88bb8241af00d73dab06208", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/files/nginx.htpasswd", + "name": "tests/integration/targets/setup_docker_registry/tasks/setup.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "78a467484164809e507e71864bf48871ea79946ab426ce11334c1ab138ca07df", + "chksum_sha256": "41e6a5d9cfc661c70c418c31e3ff1d02310fd05f5e5317f8d011857352cceaae", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/handlers", + "name": "tests/integration/targets/setup_docker_registry/vars", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/handlers/cleanup.yml", + "name": "tests/integration/targets/setup_docker_registry/vars/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0a4c5ec9c44097e90048ee8996b23bc1e3494b56159fd97bea6ced2fefa7c36f", + "chksum_sha256": "5f127d1b97bf228ef19a0c0c998f7a7611f43087865121d35beec0fb44a07a25", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/handlers/main.yml", + "name": "tests/integration/targets/setup_docker_registry/aliases", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0164b1d9b906a26e940039887c4e537d33393676ce190cf09ad2096362e773de", + "chksum_sha256": "9261aed0af24389371a0ac5c0b56cd61997059af5220a337b12a98abe1943cb4", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/meta", + "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_registry/meta/main.yml", + "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": "df14f8571467afbfe26d30dca0d552af60569eef593778ceed169823636b6df0", + "chksum_sha256": "73546253591c2bccf84f689e9199ee47090ac74ee12cbf2d15af209064e74910", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/tasks", + "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_registry/tasks/main.yml", + "name": "tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "69567cec31856b0adcb7f98ece5daf2828a15932550322e4ad84048138296cb1", + "chksum_sha256": "cb68a78cb264725dfaa8d3647048f08b136626454fb58e349c909e13b19d4be1", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "d85860ecb0b4f067950277150a0b9b5f67a1c3ba63c1e2c35ae16dffe3e64b21", + "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_registry/tasks/setup.yml", + "name": "tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "35b7f4aab9306e42354462b5a1fb9795fd00321596a26483d971e907ed1718ec", + "chksum_sha256": "9c624239e18818059907db67e112f49bfd6eb478836ff51c5e94326e80f01805", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/vars", + "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_registry/vars/main.yml", + "name": "tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "14638ce9bffa141ed24360a6b3829bc932cc92d32534849dff7e47c8dbd4d337", + "chksum_sha256": "82c26f13d94c77a379869f352eb627928a151649bc4035af2063eee6b177316e", "format": 1 }, { - "name": "tests/integration/targets/setup_docker_registry/aliases", + "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": "d1b7da6a77f85a946d3fb9c0413c8ef74fce16c441a9327fa51ffab1098589a3", + "chksum_sha256": "cb09ffab7e455855046b8e8ef753c031bcd11a625c879517fa98335d23b15af8", "format": 1 }, { @@ -4463,7 +5618,7 @@ "name": "tests/integration/targets/setup_pkg_mgr/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "60b166deb8aae61553e0e5f02cd94f4e82364821f927d1572134504b2677b998", + "chksum_sha256": "b47d6aa6d6dbeb402deddde2a4f15ec990d6ef9901f5c610f18c352e13e0e5e6", "format": 1 }, { @@ -4540,7 +5695,7 @@ "name": "tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ca8b1573df66a0d2fe70d4b5c7c3cf26d6e27897c4ac4ff7908a627e5026761b", + "chksum_sha256": "54730c80c5fa787eea72dac59c88627036aeae96c48e27cbec02f9c1bd49a2d2", "format": 1 }, { @@ -4557,6 +5712,13 @@ "chksum_sha256": "665db3263e44a68e5bd728127a0b1a6dcf93a93eb529e80900a4c4c3fa06d68e", "format": 1 }, + { + "name": "tests/integration/requirements.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d17176cccf067bce53bc57f15ed98cc91ce74d1f79f6e122558117fe75565687", + "format": 1 + }, { "name": "tests/sanity", "ftype": "dir", @@ -4571,11 +5733,32 @@ "chksum_sha256": null, "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", - "chksum_sha256": "63af024dcda47dda7e3cead05953d33c858853d2adc046efb47af28a6a0dc96b", + "chksum_sha256": "6c7fbc8a07fa803ce062387232eb0d0198a311f5347493f06c19a07aa45a9bf6", "format": 1 }, { @@ -4589,7 +5772,7 @@ "name": "tests/sanity/extra/extra-docs.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "00ae2a5eeec7f3a621074473ee4d0d16f763c67e1c6c1b2f4b7dcd3ca171262c", + "chksum_sha256": "c52e316daf1292bbb063be19429fd1f06e02bce3c9d4622a8dfc61fa3af06688", "format": 1 }, { @@ -4642,98 +5825,112 @@ "format": 1 }, { - "name": "tests/sanity/ignore-2.10.txt", + "name": "tests/sanity/ignore-2.11.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f29b7fd15a448c7e4db863939b521ba515ca347a04feec3904926f36d1df667b", + "chksum_sha256": "9e75ee9b11ed3f5847b55c01cf200d637634bb9a81a8dcfa491bf100ac21d1e2", "format": 1 }, { - "name": "tests/sanity/ignore-2.10.txt.license", + "name": "tests/sanity/ignore-2.11.txt.license", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", "format": 1 }, { - "name": "tests/sanity/ignore-2.11.txt", + "name": "tests/sanity/ignore-2.12.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f29b7fd15a448c7e4db863939b521ba515ca347a04feec3904926f36d1df667b", + "chksum_sha256": "8c94911e1d8e017201a95be684853df3667c9c2dcbd5a8b975925abbccb411f2", "format": 1 }, { - "name": "tests/sanity/ignore-2.11.txt.license", + "name": "tests/sanity/ignore-2.12.txt.license", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", "format": 1 }, { - "name": "tests/sanity/ignore-2.12.txt", + "name": "tests/sanity/ignore-2.13.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b6df9bd553d2e95b00295bd64ea2ad10e6925108616c3ee435091d9936035937", + "chksum_sha256": "6d447377ca8ae39bbcce6dd990637444a59444529537371720003f13da4f5fd4", "format": 1 }, { - "name": "tests/sanity/ignore-2.12.txt.license", + "name": "tests/sanity/ignore-2.13.txt.license", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", "format": 1 }, { - "name": "tests/sanity/ignore-2.13.txt", + "name": "tests/sanity/ignore-2.14.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ccc7d836b365401a29253c3db1fef85f976a8977eb57332de1136187ac45f39a", + "chksum_sha256": "66b5d2222c0ea982efa4ccbc5fffad980cfbc17001a6cf39b072297715cc22b8", "format": 1 }, { - "name": "tests/sanity/ignore-2.13.txt.license", + "name": "tests/sanity/ignore-2.14.txt.license", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", "format": 1 }, { - "name": "tests/sanity/ignore-2.14.txt", + "name": "tests/sanity/ignore-2.15.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ccc7d836b365401a29253c3db1fef85f976a8977eb57332de1136187ac45f39a", + "chksum_sha256": "66b5d2222c0ea982efa4ccbc5fffad980cfbc17001a6cf39b072297715cc22b8", "format": 1 }, { - "name": "tests/sanity/ignore-2.14.txt.license", + "name": "tests/sanity/ignore-2.15.txt.license", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", "format": 1 }, { - "name": "tests/sanity/ignore-2.15.txt", + "name": "tests/sanity/ignore-2.16.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ccc7d836b365401a29253c3db1fef85f976a8977eb57332de1136187ac45f39a", + "chksum_sha256": "6a8d217bd175553fa6b355e3a2ce4d891d6593ffcacc639d44f6c84a45feaaa1", "format": 1 }, { - "name": "tests/sanity/ignore-2.15.txt.license", + "name": "tests/sanity/ignore-2.16.txt.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { + "name": "tests/sanity/ignore-2.17.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f52743569e64513bef9795bab6cf6ccfde9b70a8cd5b81a3fe28994379468877", + "format": 1 + }, + { + "name": "tests/sanity/ignore-2.17.txt.license", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", "format": 1 }, { - "name": "tests/sanity/ignore-2.9.txt", + "name": "tests/sanity/ignore-2.18.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d49ed4d275b233af4655cbd623246de96dd7e5aff9356a409f4a8ea7c3cdb215", + "chksum_sha256": "f52743569e64513bef9795bab6cf6ccfde9b70a8cd5b81a3fe28994379468877", "format": 1 }, { - "name": "tests/sanity/ignore-2.9.txt.license", + "name": "tests/sanity/ignore-2.18.txt.license", "ftype": "file", "chksum_type": "sha256", "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", @@ -4764,14 +5961,14 @@ "name": "tests/unit/compat/builtins.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cda4cad197a7f9994232e9107e9e05971048e9f59d7a6dd869d45369f7f24b9c", + "chksum_sha256": "1a66bf5868ec79d871566ca33e62612c7467681405a2c8aef8a93a768c3deebb", "format": 1 }, { "name": "tests/unit/compat/mock.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a00a1840182868fa3d0b0ef55c88765ef6be118c26d43196a81cbbd68e663e3d", + "chksum_sha256": "75bef6f2ce5456591fd26298e8181709215fa31da43c2d25ce70ae73fd6a2936", "format": 1 }, { @@ -4799,7 +5996,7 @@ "name": "tests/unit/plugins/connection/test_docker.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c6690f65a0ca151816943681c9a5fae53c2a0249447921578f39825c6d3e0f1a", + "chksum_sha256": "fca32d195d2be88e7728ce148fb170721db4ba7745ca162f1ed86e3b2145b93e", "format": 1 }, { @@ -4813,7 +6010,7 @@ "name": "tests/unit/plugins/inventory/test_docker_containers.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1b5c8ecc942ef3d03e87780f293fd48bf8a3262705a63fe1e937120bf91a8c50", + "chksum_sha256": "87571060e81b9ed77b5332a56e5c6b5fbeba60201a07e20882b57944e5a13aaf", "format": 1 }, { @@ -4841,7 +6038,7 @@ "name": "tests/unit/plugins/module_utils/_api/api/test_client.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cca7fe225e44648e6ecc14ee76480d0e9b07850b0df54f5ea797f0d8df0112ed", + "chksum_sha256": "9c9b531983d18111c1ae36320dead46e6a98637a258c5335e29e85915447a768", "format": 1 }, { @@ -4862,7 +6059,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 }, { @@ -4981,21 +6178,42 @@ "name": "tests/unit/plugins/module_utils/_api/test_errors.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a001b4760b0df7709721ae2812cce13add2a625929b99349a0abe1341832bf1a", + "chksum_sha256": "9f5cbcd9c32d7182cf03773dff7a84840fa6f6431d936cadd9faaac9e52076de", + "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", - "chksum_sha256": "23bea00e775d7466390bbfbe4221b590705fd8f08682d07f0606b64038c63a6c", + "chksum_sha256": "fe5598086a3826081072f676b57abaab9e302b056bda8b7bee6596134c5fa556", + "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", - "chksum_sha256": "4e8a35283855bc7621cf788f27b8280f805daacce1aca4ebacefb00cae0ef202", + "chksum_sha256": "a56c05a45e5074482e451141bebb5e307b614686ba89731970742c4d9c9eddb1", "format": 1 }, { @@ -5030,7 +6248,7 @@ "name": "tests/unit/plugins/modules/test_docker_image.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "85434e25471bbc7bd3975f2cc6c1b770af3dcbc53d5351cb0c442a3d891ec91b", + "chksum_sha256": "88971516134166aba528faf1470a1538e2283e5bd90436a0493ced56264aac0e", "format": 1 }, { @@ -5047,6 +6265,20 @@ "chksum_sha256": "5326d0c5adf3f14fbb623ac5efdb75b6f9dd7cd7e6fb5d8c8d099bc6ab58049c", "format": 1 }, + { + "name": "tests/unit/plugins/plugin_utils", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/unit/plugins/plugin_utils/test_unsafe.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1568c3ce2e4607a182d8fcafd8d70a78000eec9bd4577ac943af0ab09ef30243", + "format": 1 + }, { "name": "tests/unit/plugins/test_support", "ftype": "dir", @@ -5068,6 +6300,13 @@ "chksum_sha256": "90372c8f9d83af7a3af63dcf3b9027930f6cb96a8aba721f016c48ab10aa585c", "format": 1 }, + { + "name": "tests/unit/requirements.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "12b0e4bf7113bf7fbdab69a78078c507a37a366cf4539d8f6ceab7ee2c3d46f3", + "format": 1 + }, { "name": "tests/utils", "ftype": "dir", @@ -5142,7 +6381,7 @@ "name": "tests/utils/shippable/shippable.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "59171fc13d0e2c92443c4e9d807a0c5b4143f59120c4e2bb1415a35474233cec", + "chksum_sha256": "db01bed83cdeff8d87b90c222cb84a5661680c9dd733f4ed5929dc7d44fc8636", "format": 1 }, { @@ -5156,7 +6395,7 @@ "name": "tests/utils/constraints.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7ae026d7150c621e8b297adce39b06152efbbcdc27d89610104dc5b04ac0baf6", + "chksum_sha256": "c37e28740fda4f82ad9df0f481e977c11dd9b2c950b7faf74eb7d96429b8e70c", "format": 1 }, { @@ -5167,17 +6406,31 @@ "format": 1 }, { - "name": "tests/requirements.yml", + "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": "42e61d2b2354fbf9c5f2da9873c0477a1c16afede7b23e7fa222f25a158f7590", + "format": 1 + }, + { + "name": "CHANGELOG.md.license", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ecdfa05f94a15039de65c5096a251d7c24e3cafbea97a9b213d825844aa90a44", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", "format": 1 }, { "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6695a755f26931f64ba22e12e65fc8fe318667bb37d9abbc3a98d65211e970cb", + "chksum_sha256": "5f823c49d14587f6dfa983c8f2359a9a5ff36e0e34c73615f01eb6504d9d0f9b", "format": 1 }, { @@ -5198,7 +6451,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d2110bcce37881a4a9a62c36821e188e5173be767b8b3ea483b82257b05006db", + "chksum_sha256": "12a411f378daee55c2ac25a7a41f2ee0884183830ff2df254a54ebe58f188c62", "format": 1 } ], diff --git a/openshift/release/ansible/ansible_collections/community/docker/LICENSES/Apache-2.0.txt b/openshift/release/ansible/ansible_collections/community/docker/LICENSES/Apache-2.0.txt index 75191a4d..6276c238 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/LICENSES/Apache-2.0.txt +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/MANIFEST.json b/openshift/release/ansible/ansible_collections/community/docker/MANIFEST.json index 68d4ede2..69ffc1b6 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/MANIFEST.json +++ b/openshift/release/ansible/ansible_collections/community/docker/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "docker", - "version": "3.4.0", + "version": "3.10.3", "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": "1488759bb4c16b02fd47556c5820a7728a808982d314bde672defcdbfea2a3f8", + "chksum_sha256": "c5b11456e6a1ea1ee5144451aa5a1c46f7f835b3102db5ad06d16a005b4af551", "format": 1 }, "format": 1 diff --git a/openshift/release/ansible/ansible_collections/community/docker/README.md b/openshift/release/ansible/ansible_collections/community/docker/README.md index e82e0a8e..2a2a9cc3 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/README.md +++ b/openshift/release/ansible/ansible_collections/community/docker/README.md @@ -9,6 +9,7 @@ SPDX-License-Identifier: GPL-3.0-or-later [![Doc](https://img.shields.io/badge/docs-brightgreen.svg)](https://docs.ansible.com/ansible/latest/collections/community/docker/) [![Build Status](https://dev.azure.com/ansible/community.docker/_apis/build/status/CI?branchName=main)](https://dev.azure.com/ansible/community.docker/_build?definitionId=25) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.docker)](https://codecov.io/gh/ansible-collections/community.docker) +[![REUSE status](https://api.reuse.software/badge/github.com/ansible-collections/community.docker)](https://api.reuse.software/info/github.com/ansible-collections/community.docker) This repo contains the `community.docker` Ansible Collection. The collection includes many modules and plugins to work with Docker. @@ -16,7 +17,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, ansible-core 2.16, and ansible-core 2.17 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 +63,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 +79,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; the module is deprecated and will be removed from community.docker 4.0.0) + - 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 +121,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/openshift/release/ansible/ansible_collections/community/docker/changelogs/changelog.yaml b/openshift/release/ansible/ansible_collections/community/docker/changelogs/changelog.yaml index ee4dff32..ba40629e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/changelogs/changelog.yaml +++ b/openshift/release/ansible/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 @@ -436,7 +436,7 @@ releases: changes: breaking_changes: - docker_compose - fixed ``timeout`` defaulting behavior so that ``stop_grace_period``, - if defined in the compose file, will be used if `timeout`` is not specified + if defined in the compose file, will be used if ``timeout`` is not specified (https://github.com/ansible-collections/community.docker/pull/163). deprecated_features: - docker_container - using the special value ``all`` in ``published_ports`` @@ -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 @@ -1002,6 +1002,102 @@ releases: - 466-add-data-path-port.yml - licenses.yml release_date: '2022-09-08' + 3.10.0: + changes: + deprecated_features: + - docker_compose - the Docker Compose v1 module is deprecated and will be removed + from community.docker 4.0.0. Please migrate to the ``community.docker.docker_compose_v2`` + module, which works with Docker Compose v2 (https://github.com/ansible-collections/community.docker/issues/823, + https://github.com/ansible-collections/community.docker/pull/833). + - various modules and plugins - the ``ssl_version`` option has been deprecated + and will be removed from community.docker 4.0.0. It has already been removed + from Docker SDK for Python 7.0.0, and was only necessary in the past to work + around SSL/TLS issues (https://github.com/ansible-collections/community.docker/pull/853). + minor_changes: + - docker_container - adds ``healthcheck.start_interval`` to support healthcheck + start interval setting on containers (https://github.com/ansible-collections/community.docker/pull/848). + - docker_container - adds ``healthcheck.test_cli_compatible`` to allow omit + test option on containers without remove existing image test (https://github.com/ansible-collections/community.docker/pull/847). + - docker_image_build - add ``outputs`` option to allow configuring outputs for + the build (https://github.com/ansible-collections/community.docker/pull/852). + - docker_image_build - add ``secrets`` option to allow passing secrets to the + build (https://github.com/ansible-collections/community.docker/pull/852). + - docker_image_build - allow ``platform`` to be a list of platforms instead + of only a single platform for multi-platform builds (https://github.com/ansible-collections/community.docker/pull/852). + - docker_network - adds ``config_only`` and ``config_from`` to support creating + and using config only networks (https://github.com/ansible-collections/community.docker/issues/395). + - docker_prune - add new options ``builder_cache_all``, ``builder_cache_filters``, + and ``builder_cache_keep_storage``, and a new return value ``builder_cache_caches_deleted`` + for pruning build caches (https://github.com/ansible-collections/community.docker/issues/844, + https://github.com/ansible-collections/community.docker/issues/845). + - docker_swarm_service - adds ``sysctls`` to support sysctl settings on swarm + services (https://github.com/ansible-collections/community.docker/issues/190). + release_summary: Feature release. + fragments: + - 3.10.0.yml + - 836-docker_swarm_service-sysctls.yml + - 843-docker_network-config-from-config-only.yml + - 845-docker_prune.yml + - 847-docker_container-heackcheck-test_cli_compatible.yml + - 848-docker_api-healthcheck-start-interval.yml + - 852-docker_image_build.yml + - 853-ssl_version.yml + - deprecate-compose-v1.yml + release_date: '2024-05-19' + 3.10.1: + changes: + bugfixes: + - vendored Docker SDK for Python - include a hotfix for requests 2.32.0 compatibility + (https://github.com/ansible-collections/community.docker/issues/860, https://github.com/docker/docker-py/issues/3256, + https://github.com/ansible-collections/community.docker/pull/861). + known_issues: + - 'Please note that the fix for requests 2.32.0 included in community.docker + 3.10.1 only + + fixes problems with the *vendored* Docker SDK for Python code. Modules and + plugins that + + use Docker SDK for Python can still fail due to the SDK currently being incompatible + + with requests 2.32.0. + + + If you still experience problems with requests 2.32.0, such as error messages + like + + ``Not supported URL scheme http+docker``, please restrict requests to ``<2.32.0``. + + ' + release_summary: 'Hotfix release for requests 2.32.0 compatibility. + + ' + fragments: + - 3.10.1.yml + - 862-requests.yml + release_date: '2024-05-20' + 3.10.2: + changes: + bugfixes: + - vendored Docker SDK for Python - include a fix requests 2.32.2+ compatibility + (https://github.com/ansible-collections/community.docker/issues/860, https://github.com/psf/requests/issues/6707, + https://github.com/ansible-collections/community.docker/pull/864). + release_summary: Bugfix release. + fragments: + - 3.10.2.yml + - 864-requests.yml + release_date: '2024-05-21' + 3.10.3: + changes: + bugfixes: + - docker and nsenter connection plugins, docker_container_exec module - avoid + using the deprecated ``ansible.module_utils.compat.selectors`` module util + with Python 3 (https://github.com/ansible-collections/community.docker/issues/870, + https://github.com/ansible-collections/community.docker/pull/871). + release_summary: Bugfix release. + fragments: + - 3.10.3.yml + - 871-selectors.yml + release_date: '2024-05-26' 3.2.0: changes: deprecated_features: @@ -1115,3 +1211,549 @@ releases: name: docker_container_copy_into namespace: '' release_date: '2023-01-14' + 3.4.1: + changes: + 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). + - docker_container - fix ``tmfs_size`` and ``tmpfs_mode`` not being set (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). + release_summary: Regular bugfix release. + fragments: + - 3.4.1.yml + - 582-stream-close.yml + - 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: + - docker_prune - return correct value for ``changed``. So far the module always + claimed that nothing changed (https://github.com/ansible-collections/community.docker/pull/593). + release_summary: Bugfix release. + fragments: + - 3.4.2.yml + - 593-docker_prune-changed.yml + release_date: '2023-02-25' + 3.4.3: + changes: + release_summary: Maintenance release with improved documentation. + fragments: + - 3.4.3.yml + release_date: '2023-03-24' + 3.4.4: + changes: + 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/pull/612). + 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/pull/612). + release_summary: Maintenance release with updated EE requirements and updated + documentation. + fragments: + - 3.4.4.yml + - 612-requests-2.29.0.yml + release_date: '2023-05-01' + 3.4.5: + changes: + 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). + release_summary: Maintenance release which adds compatibility with requests + 2.29.0 and 2.30.0 and urllib3 2.0. + fragments: + - 3.4.5.yml + - 613-requests.yml + release_date: '2023-05-05' + 3.4.6: + changes: + 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). + - vendored Docker SDK for Python code - fix for errors on pipe close in Windows + (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). + - vendored Docker SDK for Python code - use ``poll()`` instead of ``select()`` + except on Windows (https://github.com/ansible-collections/community.docker/pull/619). + known_issues: + - docker_api connection plugin - does **not work with TCP TLS sockets**! This + is caused by the inability to send an ``close_notify`` TLS alert without closing + the connection with Python's ``SSLSocket`` (https://github.com/ansible-collections/community.docker/issues/605, + https://github.com/ansible-collections/community.docker/pull/621). + - docker_container_exec - does **not work with TCP TLS sockets** when the ``stdin`` + option is used! This is caused by the inability to send an ``close_notify`` + TLS alert without closing the connection with Python's ``SSLSocket`` (https://github.com/ansible-collections/community.docker/issues/605, + https://github.com/ansible-collections/community.docker/pull/621). + release_summary: Bugfix release with documentation warnings about using certain + functionality when connecting to the Docker daemon with TCP TLS. + fragments: + - 3.4.6.yml + - 620-bugfixes.yml + - docker-py.yml + - tls-tcp-warn.yml + release_date: '2023-05-20' + 3.4.7: + changes: + bugfixes: + - docker_swarm_info - if ``service=true`` 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/pull/637). + release_summary: Bugfix release. + fragments: + - 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 + + `__ + + 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 `__ + + 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' + 3.9.0: + changes: + bugfixes: + - docker_compose_v2* - allow ``project_src`` to be a relative path, by converting + it to an absolute path before using it (https://github.com/ansible-collections/community.docker/issues/827, + https://github.com/ansible-collections/community.docker/pull/828). + - docker_compose_v2* modules - abort with a nice error message instead of crash + when the Docker Compose CLI plugin version is ``dev`` (https://github.com/ansible-collections/community.docker/issues/825, + https://github.com/ansible-collections/community.docker/pull/826). + - inventory plugins - add unsafe wrapper to avoid marking strings that do not + contain ``{`` or ``}`` as unsafe, to work around a bug in AWX (https://github.com/ansible-collections/community.docker/pull/835). + minor_changes: + - The EE requirements now include PyYAML, since the ``docker_compose_v2*`` modules + depend on it when the ``definition`` option is used. This should not have + a noticable effect on generated EEs since ansible-core itself depends on PyYAML + as well, and ansible-builder explicitly ignores this dependency (https://github.com/ansible-collections/community.docker/pull/832). + - docker_compose_v2* - the new option ``check_files_existing`` allows to disable + the check for one of the files ``compose.yaml``, ``compose.yml``, ``docker-compose.yaml``, + and ``docker-compose.yml`` in ``project_src`` if ``files`` is not specified. + This is necessary if a non-standard compose filename is specified through + other means, like the ``COMPOSE_FILE`` environment variable (https://github.com/ansible-collections/community.docker/issues/838, + https://github.com/ansible-collections/community.docker/pull/839). + - docker_compose_v2* modules - allow to provide an inline definition of the + compose content instead of having to provide a ``project_src`` directory with + the compose file written into it (https://github.com/ansible-collections/community.docker/issues/829, + https://github.com/ansible-collections/community.docker/pull/832). + - vendored Docker SDK for Python - remove unused code that relies on functionality + deprecated in Python 3.12 (https://github.com/ansible-collections/community.docker/pull/834). + release_summary: Bugfix and feature release. + fragments: + - 3.9.0.yml + - 826-docker-compose-v2-version.yml + - 828-compose-project_src.yml + - 832-docker_compose_v2-definition.yml + - 834-datetime-depr.yml + - 835-unsafe.yml + - 839-compose_v2-check-file.yml + release_date: '2024-04-21' diff --git a/openshift/release/ansible/ansible_collections/community/docker/changelogs/config.yaml b/openshift/release/ansible/ansible_collections/community/docker/changelogs/config.yaml index 1c0c2d20..2959c161 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/changelogs/config.yaml +++ b/openshift/release/ansible/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: @@ -32,3 +35,5 @@ sections: - Known Issues title: Docker Community Collection trivial_section_name: trivial +use_fqcn: true +add_plugin_period: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/docs/docsite/config.yml b/openshift/release/ansible/ansible_collections/community/docker/docs/docsite/config.yml new file mode 100644 index 00000000..48eedc26 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/docs/docsite/config.yml @@ -0,0 +1,18 @@ +--- +# 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 + +changelog: + write_changelog: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst b/openshift/release/ansible/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst index e4b84431..395b7100 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst +++ b/openshift/release/ansible/ansible_collections/community/docker/docs/docsite/rst/scenario_guide.rst @@ -8,7 +8,7 @@ Docker Guide ============ -The `community.docker collection `_ offers several modules and plugins for orchestrating Docker containers and Docker Swarm. +The `community.docker collection `_ offers several modules and plugins for orchestrating Docker containers and Docker Swarm. .. contents:: :local: @@ -18,7 +18,7 @@ The `community.docker collection `_ Requirements ------------ -Most of the modules and plugins in community.docker require the `Docker SDK for Python `_. 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 ` 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 `_. 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 ` 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 `, 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,119 @@ 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 ` 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 `. + The :ansplugin:`community.docker.docker connection plugin ` 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 `. docker_api connection plugin - The :ref:`community.docker.docker_api connection plugin ` talks directly to the Docker daemon to connect to Docker containers and execute modules in them. + The :ansplugin:`community.docker.docker_api connection plugin ` 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 ` 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 ` 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 `_ 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` provides full control over images, including: build, pull, push, tag and remove. + The :ansplugin:`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 ` allows you to build a Docker image using Docker buildx. + + docker_image_export module + The :ansplugin:`community.docker.docker_image_export module ` allows you to export (archive) images. docker_image_info module - The :ref:`community.docker.docker_image_info module ` allows you to list and inspect images. + The :ansplugin:`community.docker.docker_image_info module ` allows you to list and inspect images. + + docker_image_load + The :ansplugin:`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 ` allows you to pull a Docker image from a registry. + + docker_image_push + The :ansplugin:`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 ` 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 ` allows you to tag a Docker image with additional names and/or tags. docker_network module - The :ref:`community.docker.docker_network module ` provides full control over Docker networks. + The :ansplugin:`community.docker.docker_network module ` provides full control over Docker networks. docker_network_info module - The :ref:`community.docker.docker_network_info module ` allows you to inspect Docker networks. + The :ansplugin:`community.docker.docker_network_info module ` allows you to inspect Docker networks. docker_volume_info module - The :ref:`community.docker.docker_volume_info module ` provides full control over Docker volumes. + The :ansplugin:`community.docker.docker_volume_info module ` provides full control over Docker volumes. docker_volume module - The :ref:`community.docker.docker_volume module ` allows you to inspect Docker volumes. + The :ansplugin:`community.docker.docker_volume module ` allows you to inspect Docker volumes. docker_container module - The :ref:`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 ` 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 ` allows you to copy files from the control node into a container. + + docker_container_exec + The :ansplugin:`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 ` allows you to inspect a Docker container. + The :ansplugin:`community.docker.docker_container_info module ` allows you to inspect a Docker container. + + docker_plugin + The :ansplugin:`community.docker.docker_plugin module ` allows you to manage Docker plugins. Docker Compose -------------- -The :ref:`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 ` 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 ` 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 deprecated :ansplugin:`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. **The module is deprecated and will be removed from community.docker 4.0.0.** +Please use the Docker Compose v2 modules instead. -Next to Docker SDK for Python, you need to install `docker-compose `_ on the remote machines to use the module. +You need to install the `old Python docker-compose `_ on the remote machines to use the Docker Compose v1 module. Docker Machine -------------- -The :ref:`community.docker.docker_machine inventory plugin ` allows you to dynamically add Docker Machine hosts to your Ansible inventory. +The :ansplugin:`community.docker.docker_machine inventory plugin ` allows you to dynamically add Docker Machine hosts to your Ansible inventory. -Docker stack ------------- +Docker Swarm stack +------------------ -The :ref:`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 `, and information on stack tasks can be retrieved by the :ref:`community.docker.docker_stack_task_info module `. +The :ansplugin:`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 `, and information on Swarm stack tasks can be retrieved by the :ansplugin:`community.docker.docker_stack_task_info module `. Docker Swarm @@ -192,19 +304,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 ` allows you to dynamically add all Docker Swarm nodes to your Ansible inventory. + The :ansplugin:`community.docker.docker_swarm inventory plugin ` allows you to dynamically add all Docker Swarm nodes to your Ansible inventory. docker_swarm module - The :ref:`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 ` 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 ` allows you to retrieve information on Docker Swarm. + The :ansplugin:`community.docker.docker_swarm_info module ` allows you to retrieve information on Docker Swarm. docker_node module - The :ref:`community.docker.docker_node module ` allows you to manage Docker Swarm nodes. + The :ansplugin:`community.docker.docker_node module ` allows you to manage Docker Swarm nodes. docker_node_info module - The :ref:`community.docker.docker_node_info module ` allows you to retrieve information on Docker Swarm nodes. + The :ansplugin:`community.docker.docker_node_info module ` allows you to retrieve information on Docker Swarm nodes. Configuration management ........................ @@ -212,21 +324,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 ` allows you to create and modify Docker Swarm configs. + The :ansplugin:`community.docker.docker_config module ` allows you to create and modify Docker Swarm configs. docker_secret module - The :ref:`community.docker.docker_secret module ` allows you to create and modify Docker Swarm secrets. - + The :ansplugin:`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 `, and information on them can be queried by the :ref:`community.docker.docker_swarm_service_info module `. - - -Helpful links -------------- - -Still using Dockerfile to build images? Check out `ansible-bender `_, and start building images from your Ansible playbooks. - -Use `Ansible Operator `_ to launch your docker-compose file on `OpenShift `_. 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 `, and information on them can be queried by the :ansplugin:`community.docker.docker_swarm_service_info module `. diff --git a/openshift/release/ansible/ansible_collections/community/docker/meta/ee-requirements.txt b/openshift/release/ansible/ansible_collections/community/docker/meta/ee-requirements.txt index 101b74b5..099dcf9a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/meta/ee-requirements.txt +++ b/openshift/release/ansible/ansible_collections/community/docker/meta/ee-requirements.txt @@ -3,8 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later docker +urllib3 requests paramiko +pyyaml # We assume that EEs are not based on Windows, and have Python >= 3.5. # (ansible-builder does not support conditionals, it will simply add diff --git a/openshift/release/ansible/ansible_collections/community/docker/meta/runtime.yml b/openshift/release/ansible/ansible_collections/community/docker/meta/runtime.yml index 7616e6fe..e29f84be 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/meta/runtime.yml +++ b/openshift/release/ansible/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,9 +32,19 @@ 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 - docker_swarm_service_info - docker_volume - docker_volume_info + +plugin_routing: + modules: + docker_compose: + deprecation: + removal_version: 4.0.0 + warning_text: This module uses docker-compose v1, which is End of Life since July 2022. Please migrate to community.docker.docker_compose_v2. diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py index b6f255b7..fed0af00 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/action/docker_container_copy_into.py @@ -8,7 +8,6 @@ import base64 from ansible import constants as C -from ansible.errors import AnsibleError from ansible.plugins.action import ActionBase from ansible.utils.vars import merge_hash @@ -16,7 +15,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker.py index ba224929..133fe6a7 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker.py @@ -20,8 +20,7 @@ - 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: @@ -84,7 +83,6 @@ import subprocess import re -from ansible.compat import selectors from ansible.errors import AnsibleError, AnsibleFileNotFound from ansible.module_utils.six.moves import shlex_quote from ansible.module_utils.common.process import get_bin_path @@ -92,6 +90,7 @@ from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils.display import Display +from ansible_collections.community.docker.plugins.module_utils.selectors import selectors from ansible_collections.community.docker.plugins.module_utils.version import LooseVersion display = Display() diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker_api.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker_api.py index bbc13989..a6dec85a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker_api.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/docker_api.py @@ -15,10 +15,13 @@ - 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. extends_documentation_fragment: - community.docker.docker.api_documentation + - community.docker.docker.ssl_version_deprecation - community.docker.docker.var_names options: remote_user: diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/nsenter.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/nsenter.py index cf4da824..ccc660b9 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/nsenter.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/connection/nsenter.py @@ -45,19 +45,20 @@ import os import pty -import shutil import subprocess import fcntl import ansible.constants as C -from ansible.errors import AnsibleError, AnsibleFileNotFound -from ansible.module_utils.compat import selectors +from ansible.errors import AnsibleError from ansible.module_utils.six import binary_type, text_type from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text from ansible.plugins.connection import ConnectionBase from ansible.utils.display import Display from ansible.utils.path import unfrackpath +from ansible_collections.community.docker.plugins.module_utils.selectors import selectors + + display = Display() @@ -129,7 +130,7 @@ def exec_command(self, cmd, in_data=None, sudoable=True): # 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/openshift/release/ansible/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py new file mode 100644 index 00000000..234a94fe --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2023, 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 + +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. + - Mutually exclusive with O(definition). + type: path + project_name: + description: + - 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 + 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. + - Mutually exclusive with O(definition). + type: list + elements: path + version_added: 3.7.0 + definition: + description: + - Compose file describing one or more services, networks and volumes. + - Mutually exclusive with O(project_src) and O(files). + - If provided, PyYAML must be available to this module, and O(project_name) must be specified. + - Note that a temporary directory will be created and deleted afterwards when using this option. + type: dict + version_added: 3.9.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 + check_files_existing: + description: + - If set to V(false), the module will not check whether one of the files + C(compose.yaml), C(compose.yml), C(docker-compose.yaml), or C(docker-compose.yml) + exists in O(project_src) if O(files) is not provided. + - This can be useful if environment files with C(COMPOSE_FILE) are used to configure a different + filename. The module currently does not check for C(COMPOSE_FILE) in environment files or the + current environment. + type: bool + default: true + version_added: 3.9.0 +requirements: + - "PyYAML if O(definition) is used" +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/openshift/release/ansible/ansible_collections/community/docker/plugins/doc_fragments/docker.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/doc_fragments/docker.py index 4c537850..2c78c5fa 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/doc_fragments/docker.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/doc_fragments/docker.py @@ -16,25 +16,27 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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 @@ class ModuleDocFragment(object): 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,105 @@ class ModuleDocFragment(object): 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. +''' + + # DEPRECATED: this will be removed from community.docker 4.0.0! Use with care! + SSL_VERSION_DEPRECATION = ''' +options: + ssl_version: + deprecated: + why: This was necessary a long time ago to handle problems with older TLS/SSL versions. It is no longer necessary nowadays. + version: 4.0.0 +''' diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_containers.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_containers.py index c94b0e12..f353b03b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_containers.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_containers.py @@ -21,13 +21,15 @@ extends_documentation_fragment: - ansible.builtin.constructed - community.docker.docker.api_documentation + - community.docker.docker.ssl_version_deprecation + - 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,14 +38,14 @@ 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). + - 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: @@ -54,7 +56,7 @@ 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 @@ -64,8 +66,8 @@ - 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 @@ -73,14 +75,14 @@ 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 @@ -93,20 +95,23 @@ - "C(image_): contains the containers that have the image C()." - "C(stack_): contains the containers that belong to the stack C()." - "C(service_): contains the containers that belong to the service C()" - - "C(): contains the containers which belong to the Docker daemon I(docker_host). + - "C(): 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 @@ -121,7 +126,7 @@ 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 @@ -144,6 +149,18 @@ 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 @@ -163,6 +180,8 @@ ) from ansible_collections.community.docker.plugins.module_utils._api.errors import APIError, DockerException +from ansible_collections.community.docker.plugins.plugin_utils.unsafe import make_unsafe +from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import parse_filters, filter_host MIN_DOCKER_API = None @@ -209,6 +228,7 @@ def _populate(self, client): 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] @@ -220,10 +240,9 @@ def _populate(self, client): 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() @@ -238,26 +257,26 @@ def _populate(self, client): 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: @@ -280,23 +299,38 @@ def _populate(self, client): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_machine.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_machine.py index 69d94610..984c9932 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_machine.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_machine.py @@ -13,12 +13,13 @@ 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 @@ 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 @@ 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 = ''' @@ -94,6 +97,9 @@ from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable from ansible.utils.display import Display +from ansible_collections.community.docker.plugins.plugin_utils.unsafe import make_unsafe +from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import parse_filters, filter_host + import json import re import subprocess @@ -173,7 +179,7 @@ def _get_machine_names(self): 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 @@ def _inspect_docker_machine_host(self, node): 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 @@ def _should_skip_host(self, machine_name, env_var_tuples, daemon_env): 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 @@ def _populate(self): # 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/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_swarm.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_swarm.py index 9ae2fb9a..6d1556ff 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_swarm.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/inventory/docker_swarm.py @@ -17,16 +17,17 @@ - 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 @@ 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 @@ 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,8 +74,13 @@ 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 + deprecated: + why: This was necessary a long time ago to handle problems with SSL versions. It is no longer necessary nowadays. + version: 4.0.0 api_version: description: - The version of the Docker API running on the Docker Host. @@ -82,7 +90,7 @@ 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 +104,22 @@ 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,14 +134,14 @@ 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 # Example using constructed features to create groups and set ansible_host plugin: community.docker.docker_swarm docker_host: tcp://my-docker-host:2375 -strict: False +strict: false keyed_groups: # add for example x86_64 hosts to an arch_x86_64 group - prefix: arch @@ -153,6 +163,9 @@ from ansible.plugins.inventory import BaseInventoryPlugin, Constructable from ansible.parsing.utils.addresses import parse_address +from ansible_collections.community.docker.plugins.plugin_utils.unsafe import make_unsafe +from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import parse_filters, filter_host + try: import docker HAS_DOCKER = True @@ -174,7 +187,7 @@ def _populate(self): 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 +205,8 @@ def _populate(self): 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 +217,51 @@ def _populate(self): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/_import_helper.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/_import_helper.py index 9ff1cad5..0afe0b47 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/_import_helper.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/_import_helper.py @@ -21,9 +21,9 @@ try: - from requests import Session - from requests.adapters import HTTPAdapter - from requests.exceptions import HTTPError, InvalidSchema + from requests import Session # noqa: F401, pylint: disable=unused-import + from requests.adapters import HTTPAdapter # noqa: F401, pylint: disable=unused-import + from requests.exceptions import HTTPError, InvalidSchema # noqa: F401, pylint: disable=unused-import except ImportError: REQUESTS_IMPORT_ERROR = traceback.format_exc() @@ -42,15 +42,20 @@ class InvalidSchema(Exception): try: from requests.packages import urllib3 + from requests.packages.urllib3 import connection as urllib3_connection # pylint: disable=unused-import except ImportError: try: import urllib3 + from urllib3 import connection as urllib3_connection # pylint: disable=unused-import except ImportError: URLLIB3_IMPORT_ERROR = traceback.format_exc() class _HTTPConnectionPool(object): pass + class _HTTPConnection(object): + pass + class FakeURLLIB3(object): def __init__(self): self._collections = self @@ -63,7 +68,12 @@ def __init__(self): self.match_hostname = object() self.HTTPConnectionPool = _HTTPConnectionPool + class FakeURLLIB3Connection(object): + def __init__(self): + self.HTTPConnection = _HTTPConnection + urllib3 = FakeURLLIB3() + urllib3_connection = FakeURLLIB3Connection() # Monkey-patching match_hostname with a version that supports diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py index fa99e069..44f17924 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/client.py @@ -394,6 +394,10 @@ def _stream_raw_result(self, response, chunk_size=1, decode=True): yield out def _read_from_socket(self, response, stream, tty=True, demux=False): + """Consume all data from the socket, close the response and return the + data. If stream=True, then a generator is returned instead and the + caller is responsible for closing the response. + """ socket = self._get_raw_response_socket(response) gen = frames_iter(socket, tty) @@ -408,8 +412,11 @@ def _read_from_socket(self, response, stream, tty=True, demux=False): if stream: return gen else: - # Wait for all the frames, concatenate them, and return the result - return consume_socket_output(gen, demux=demux) + try: + # Wait for all the frames, concatenate them, and return the result + return consume_socket_output(gen, demux=demux) + finally: + response.close() def _disable_socket_timeout(self, socket): """ Depending on the combination of python version and whether we're @@ -448,7 +455,7 @@ def _get_result(self, container, stream, res): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/daemon.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/daemon.py index 9e7adbf3..16d1d124 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/daemon.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/api/daemon.py @@ -11,12 +11,9 @@ __metaclass__ = type import os -from datetime import datetime from .. import auth -from ..utils.utils import datetime_to_timestamp, convert_filters from ..utils.decorators import minimum_version -from ..types.daemon import CancellableStream class DaemonApiMixin(object): @@ -36,65 +33,6 @@ def df(self): url = self._url('/system/df') return self._result(self._get(url), True) - def events(self, since=None, until=None, filters=None, decode=None): - """ - Get real-time events from the server. Similar to the ``docker events`` - command. - - Args: - since (UTC datetime or int): Get events from this point - until (UTC datetime or int): Get events until this point - filters (dict): Filter the events by event time, container or image - decode (bool): If set to true, stream will be decoded into dicts on - the fly. False by default. - - Returns: - A :py:class:`docker.types.daemon.CancellableStream` generator - - Raises: - :py:class:`docker.errors.APIError` - If the server returns an error. - - Example: - - >>> for event in client.events(decode=True) - ... print(event) - {u'from': u'image/with:tag', - u'id': u'container-id', - u'status': u'start', - u'time': 1423339459} - ... - - or - - >>> events = client.events() - >>> for event in events: - ... print(event) - >>> # and cancel from another thread - >>> events.close() - """ - - if isinstance(since, datetime): - since = datetime_to_timestamp(since) - - if isinstance(until, datetime): - until = datetime_to_timestamp(until) - - if filters: - filters = convert_filters(filters) - - params = { - 'since': since, - 'until': until, - 'filters': filters - } - url = self._url('/events') - - response = self._get(url, params=params, stream=True, timeout=None) - stream = self._stream_helper(response, decode=decode) - - return CancellableStream(stream, response) - def info(self): """ Display system-wide information. Identical to the ``docker info`` diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/errors.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/errors.py index 90dd5aad..47c284d3 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/errors.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/errors.py @@ -12,6 +12,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/tls.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/tls.py index ed5416d8..b1e284a5 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/tls.py +++ b/openshift/release/ansible/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 @@ def __init__(self, client_cert=None, ca_cert=None, verify=None, # 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 @@ def configure_client(self, client): client.mount('https://', SSLHTTPAdapter( ssl_version=self.ssl_version, assert_hostname=self.assert_hostname, - assert_fingerprint=self.assert_fingerprint, )) diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/basehttpadapter.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/basehttpadapter.py index 2afa60ae..14062a0b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/basehttpadapter.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/basehttpadapter.py @@ -18,3 +18,15 @@ def close(self): super(BaseHTTPAdapter, self).close() if hasattr(self, 'pools'): self.pools.clear() + + # Hotfix for requests 2.32.0 and 2.32.1: its commit + # https://github.com/psf/requests/commit/c0813a2d910ea6b4f8438b91d315b8d181302356 + # changes requests.adapters.HTTPAdapter to no longer call get_connection() from + # send(), but instead call _get_connection(). + def _get_connection(self, request, *args, **kwargs): + return self.get_connection(request.url, kwargs.get('proxies')) + + # Fix for requests 2.32.2+: + # https://github.com/psf/requests/commit/c98e4d133ef29c46a9b68cd783087218a8075e05 + def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None): + return self.get_connection(request.url, proxies) diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipeconn.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipeconn.py index 72a5c589..912e465f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipeconn.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipeconn.py @@ -10,24 +10,18 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.module_utils.six import PY3 from ansible.module_utils.six.moves.queue import Empty from .. import constants -from .._import_helper import HTTPAdapter, urllib3 +from .._import_helper import HTTPAdapter, urllib3, urllib3_connection from .basehttpadapter import BaseHTTPAdapter from .npipesocket import NpipeSocket -if PY3: - import http.client as httplib -else: - import httplib - RecentlyUsedContainer = urllib3._collections.RecentlyUsedContainer -class NpipeHTTPConnection(httplib.HTTPConnection, object): +class NpipeHTTPConnection(urllib3_connection.HTTPConnection, object): def __init__(self, npipe_path, timeout=60): super(NpipeHTTPConnection, self).__init__( 'localhost', timeout=timeout diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipesocket.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipesocket.py index f9d3ed66..5e5a90da 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipesocket.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/npipesocket.py @@ -21,6 +21,9 @@ try: import win32file import win32pipe + import pywintypes + import win32event + import win32api except ImportError: PYWIN32_IMPORT_ERROR = traceback.format_exc() @@ -74,7 +77,9 @@ def connect(self, address, retry_count=0): 0, None, win32file.OPEN_EXISTING, - cSECURITY_ANONYMOUS | cSECURITY_SQOS_PRESENT, + (cSECURITY_ANONYMOUS + | cSECURITY_SQOS_PRESENT + | win32file.FILE_FLAG_OVERLAPPED), 0 ) except win32pipe.error as e: @@ -154,11 +159,22 @@ def recv_into(self, buf, nbytes=0): if not isinstance(buf, memoryview): readbuf = memoryview(buf) - err, data = win32file.ReadFile( - self._handle, - readbuf[:nbytes] if nbytes else readbuf - ) - return len(data) + event = win32event.CreateEvent(None, True, True, None) + try: + overlapped = pywintypes.OVERLAPPED() + overlapped.hEvent = event + err, data = win32file.ReadFile( + self._handle, + readbuf[:nbytes] if nbytes else readbuf, + overlapped + ) + wait_result = win32event.WaitForSingleObject(event, self._timeout) + if wait_result == win32event.WAIT_TIMEOUT: + win32file.CancelIo(self._handle) + raise TimeoutError + return win32file.GetOverlappedResult(self._handle, overlapped, 0) + finally: + win32api.CloseHandle(event) def _recv_into_py2(self, buf, nbytes): err, data = win32file.ReadFile(self._handle, nbytes or len(buf)) @@ -168,8 +184,18 @@ def _recv_into_py2(self, buf, nbytes): @check_closed def send(self, string, flags=0): - err, nbytes = win32file.WriteFile(self._handle, string) - return nbytes + event = win32event.CreateEvent(None, True, True, None) + try: + overlapped = pywintypes.OVERLAPPED() + overlapped.hEvent = event + win32file.WriteFile(self._handle, string, overlapped) + wait_result = win32event.WaitForSingleObject(event, self._timeout) + if wait_result == win32event.WAIT_TIMEOUT: + win32file.CancelIo(self._handle) + raise TimeoutError + return win32file.GetOverlappedResult(self._handle, overlapped, 0) + finally: + win32api.CloseHandle(event) @check_closed def sendall(self, string, flags=0): @@ -188,15 +214,12 @@ def setblocking(self, flag): def settimeout(self, value): if value is None: # Blocking mode - self._timeout = win32pipe.NMPWAIT_WAIT_FOREVER + self._timeout = win32event.INFINITE elif not isinstance(value, (float, int)) or value < 0: raise ValueError('Timeout value out of range') - elif value == 0: - # Non-blocking mode - self._timeout = win32pipe.NMPWAIT_NO_WAIT else: # Timeout mode - Value converted to milliseconds - self._timeout = value * 1000 + self._timeout = int(value * 1000) def gettimeout(self): return self._timeout diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/sshconn.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/sshconn.py index 063c2882..a621d755 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/sshconn.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/sshconn.py @@ -24,12 +24,7 @@ from .basehttpadapter import BaseHTTPAdapter from .. import constants -if PY3: - import http.client as httplib -else: - import httplib - -from .._import_helper import HTTPAdapter, urllib3 +from .._import_helper import HTTPAdapter, urllib3, urllib3_connection PARAMIKO_IMPORT_ERROR = None try: @@ -120,7 +115,7 @@ def close(self): self.proc.terminate() -class SSHConnection(httplib.HTTPConnection, object): +class SSHConnection(urllib3_connection.HTTPConnection, object): def __init__(self, ssh_transport=None, timeout=60, host=None): super(SSHConnection, self).__init__( 'localhost', timeout=timeout diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py index a3182bcd..ed9250d6 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/ssladapter.py @@ -14,7 +14,6 @@ https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/ https://github.com/kennethreitz/requests/pull/799 """ -import sys from ansible_collections.community.docker.plugins.module_utils.version import StrictVersion @@ -28,15 +27,11 @@ 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): @@ -44,9 +39,9 @@ def init_poolmanager(self, connections, maxsize, block=False): '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 @@ -61,7 +56,7 @@ def get_connection(self, *args, **kwargs): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/unixconn.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/unixconn.py index f46372f9..3b24fe46 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/unixconn.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/transport/unixconn.py @@ -13,29 +13,17 @@ import socket from ansible.module_utils.six import PY2 -from ansible.module_utils.six.moves import http_client as httplib from .basehttpadapter import BaseHTTPAdapter from .. import constants -from .._import_helper import HTTPAdapter, urllib3 +from .._import_helper import HTTPAdapter, urllib3, urllib3_connection RecentlyUsedContainer = urllib3._collections.RecentlyUsedContainer -class UnixHTTPResponse(httplib.HTTPResponse, object): - def __init__(self, sock, *args, **kwargs): - disable_buffering = kwargs.pop('disable_buffering', False) - if PY2: - # FIXME: We may need to disable buffering on Py3 as well, - # but there's no clear way to do it at the moment. See: - # https://github.com/docker/docker-py/issues/1799 - kwargs['buffering'] = not disable_buffering - super(UnixHTTPResponse, self).__init__(sock, *args, **kwargs) - - -class UnixHTTPConnection(httplib.HTTPConnection, object): +class UnixHTTPConnection(urllib3_connection.HTTPConnection, object): def __init__(self, base_url, unix_socket, timeout=60): super(UnixHTTPConnection, self).__init__( @@ -58,10 +46,13 @@ def putheader(self, header, *values): self.disable_buffering = True def response_class(self, sock, *args, **kwargs): - if self.disable_buffering: - kwargs['disable_buffering'] = True + if PY2: + # FIXME: We may need to disable buffering on Py3 as well, + # but there's no clear way to do it at the moment. See: + # https://github.com/docker/docker-py/issues/1799 + kwargs['buffering'] = not self.disable_buffering - return UnixHTTPResponse(sock, *args, **kwargs) + return super(UnixHTTPConnection, self).response_class(sock, *args, **kwargs) class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool): diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py index 81c0c4f8..792aa0cb 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/socket.py @@ -42,7 +42,13 @@ def read(socket, n=4096): recoverable_errors = (errno.EINTR, errno.EDEADLK, errno.EWOULDBLOCK) if PY3 and not isinstance(socket, NpipeSocket): - select.select([socket], [], []) + if not hasattr(select, "poll"): + # Limited to 1024 + select.select([socket], [], []) + else: + poll = select.poll() + poll.register(socket, select.POLLIN | select.POLLPRI) + poll.poll() try: if hasattr(socket, 'recv'): @@ -60,7 +66,7 @@ def read(socket, n=4096): if is_pipe_ended: # npipes don't support duplex sockets, so we interpret # a PIPE_ENDED error as a close operation (0-length read). - return 0 + return '' raise diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py index 910b0dc3..cdf3eedd 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_api/utils/utils.py @@ -17,7 +17,6 @@ import os.path import shlex import string -from datetime import datetime from ansible_collections.community.docker.plugins.module_utils.version import StrictVersion from ansible.module_utils.six import PY2, PY3, binary_type, integer_types, iteritems, string_types, text_type @@ -160,6 +159,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) ) @@ -405,12 +420,6 @@ def convert_filters(filters): return json.dumps(result) -def datetime_to_timestamp(dt): - """Convert a UTC datetime to a Unix timestamp""" - delta = dt - datetime.utcfromtimestamp(0) - return delta.seconds + delta.days * 24 * 3600 - - def parse_bytes(s): if isinstance(s, integer_types + (float,)): return s diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_logfmt.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_logfmt.py new file mode 100644 index 00000000..fa45b575 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_logfmt.py @@ -0,0 +1,208 @@ +# Copyright (c) 2024, 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 + +""" +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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_platform.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/_platform.py new file mode 100644 index 00000000..4b6216f7 --- /dev/null +++ b/openshift/release/ansible/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 +# 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common.py index 35b4b472..d1dcf3e6 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common.py @@ -12,13 +12,10 @@ import re import sys import traceback -from datetime import timedelta -from ansible.module_utils.basic import AnsibleModule, env_fallback, missing_required_lib -from ansible.module_utils.common.collections import is_sequence +from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common._collections_compat import Mapping, Sequence from ansible.module_utils.six import string_types -from ansible.module_utils.six.moves.urllib.parse import urlparse from ansible.module_utils.parsing.convert_bool import BOOLEANS_TRUE, BOOLEANS_FALSE from ansible_collections.community.docker.plugins.module_utils.version import LooseVersion @@ -56,21 +53,21 @@ # installed, as they utilize the same namespace are are incompatible try: # docker (Docker SDK for Python >= 2.0.0) - import docker.models # noqa: F401 + import docker.models # noqa: F401, pylint: disable=unused-import HAS_DOCKER_MODELS = True except ImportError: HAS_DOCKER_MODELS = False try: # docker-py (Docker SDK for Python < 2.0.0) - import docker.ssladapter # noqa: F401 + import docker.ssladapter # noqa: F401, pylint: disable=unused-import HAS_DOCKER_SSLADAPTER = True except ImportError: HAS_DOCKER_SSLADAPTER = False try: - from requests.exceptions import RequestException + from requests.exceptions import RequestException # noqa: F401, pylint: disable=unused-import except ImportError: # Either Docker SDK for Python is no longer using requests, or Docker SDK for Python isn't around either, # or Docker SDK for Python's dependency requests is missing. In any case, define an exception @@ -78,30 +75,30 @@ class RequestException(Exception): pass -from ansible_collections.community.docker.plugins.module_utils.util import ( +from ansible_collections.community.docker.plugins.module_utils.util import ( # noqa: F401, pylint: disable=unused-import DEFAULT_DOCKER_HOST, DEFAULT_TLS, DEFAULT_TLS_VERIFY, - DEFAULT_TLS_HOSTNAME, + DEFAULT_TLS_HOSTNAME, # TODO: remove DEFAULT_TIMEOUT_SECONDS, DOCKER_COMMON_ARGS, - DOCKER_COMMON_ARGS_VARS, + DOCKER_COMMON_ARGS_VARS, # TODO: remove DOCKER_MUTUALLY_EXCLUSIVE, DOCKER_REQUIRED_TOGETHER, - DEFAULT_DOCKER_REGISTRY, - BYTE_SUFFIXES, - is_image_name_id, - is_valid_tag, + DEFAULT_DOCKER_REGISTRY, # TODO: remove + BYTE_SUFFIXES, # TODO: remove + is_image_name_id, # TODO: remove + is_valid_tag, # TODO: remove sanitize_result, - DockerBaseClass, + DockerBaseClass, # TODO: remove update_tls_hostname, - compare_dict_allow_more_present, - compare_generic, - DifferenceTracker, - clean_dict_booleans_for_docker_api, - convert_duration_to_nanosecond, - parse_healthcheck, - omit_none_from_dict, + compare_dict_allow_more_present, # TODO: remove + compare_generic, # TODO: remove + DifferenceTracker, # TODO: remove + clean_dict_booleans_for_docker_api, # TODO: remove + convert_duration_to_nanosecond, # TODO: remove + parse_healthcheck, # TODO: remove + omit_none_from_dict, # TODO: remove ) @@ -125,6 +122,32 @@ class NotFound(Exception): # noqa: F811 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 @@ -237,12 +260,8 @@ def __init__(self, min_docker_version=None, min_docker_api_version=None): 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): @@ -312,7 +331,7 @@ def auth_params(self): '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'), @@ -459,7 +478,7 @@ def find_image(self, name, tag): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common_api.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common_api.py index bafdaafe..b5ea42fa 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common_api.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common_api.py @@ -11,16 +11,15 @@ import os import re -from ansible.module_utils.basic import AnsibleModule, env_fallback, missing_required_lib +from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common._collections_compat import Mapping, Sequence from ansible.module_utils.six import string_types -from ansible.module_utils.six.moves.urllib.parse import urlparse from ansible.module_utils.parsing.convert_bool import BOOLEANS_TRUE, BOOLEANS_FALSE from ansible_collections.community.docker.plugins.module_utils.version import LooseVersion try: - from requests.exceptions import RequestException, SSLError + from requests.exceptions import RequestException, SSLError # noqa: F401, pylint: disable=unused-import except ImportError: # Define an exception class RequestException so that our code doesn't break. class RequestException(Exception): @@ -40,18 +39,18 @@ class RequestException(Exception): parse_repository_tag, ) -from ansible_collections.community.docker.plugins.module_utils.util import ( +from ansible_collections.community.docker.plugins.module_utils.util import ( # noqa: F401, pylint: disable=unused-import DEFAULT_DOCKER_HOST, DEFAULT_TLS, DEFAULT_TLS_VERIFY, - DEFAULT_TLS_HOSTNAME, + DEFAULT_TLS_HOSTNAME, # TODO: remove DEFAULT_TIMEOUT_SECONDS, DOCKER_COMMON_ARGS, DOCKER_MUTUALLY_EXCLUSIVE, DOCKER_REQUIRED_TOGETHER, - DEFAULT_DOCKER_REGISTRY, - is_image_name_id, - is_valid_tag, + DEFAULT_DOCKER_REGISTRY, # TODO: remove + is_image_name_id, # TODO: remove + is_valid_tag, # TODO: remove sanitize_result, update_tls_hostname, ) @@ -132,12 +131,8 @@ def __init__(self, min_docker_api_version=None): 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): @@ -207,7 +202,7 @@ def auth_params(self): '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'), @@ -397,7 +392,7 @@ def find_image(self, name, tag): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common_cli.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common_cli.py new file mode 100644 index 00000000..60d53987 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/common_cli.py @@ -0,0 +1,339 @@ +# Copyright (c) 2023, 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 + +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/' 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/compose_v2.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/compose_v2.py new file mode 100644 index 00000000..85fbd5d8 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/compose_v2.py @@ -0,0 +1,688 @@ +# Copyright (c) 2023, Felix Fontein +# 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 +import shutil +import tempfile +import traceback +from collections import namedtuple + +from ansible.module_utils.basic import missing_required_lib +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, +) + +try: + import yaml + try: + # use C version if possible for speedup + from yaml import CSafeDumper as _SafeDumper + except ImportError: + from yaml import SafeDumper as _SafeDumper + HAS_PYYAML = True + PYYAML_IMPORT_ERROR = None +except ImportError: + HAS_PYYAML = False + PYYAML_IMPORT_ERROR = traceback.format_exc() + + +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'(?PNetwork|Image|Volume|Container)' + r'\s+' + r'(?P\S+)' + r'\s+' + r'(?P\S(?:|.*\S))' + r'\s*' + r'$' +) + +_RE_PULL_EVENT = re.compile( + r'^' + r'\s*' + r'(?P\S+)' + r'\s+' + r'(?P%s)' + r'\s*' + r'$' + % '|'.join(re.escape(status) for status in DOCKER_STATUS_PULL) +) + +_RE_PULL_PROGRESS = re.compile( + r'^' + r'\s*' + r'(?P\S+)' + r'\s+' + r'(?P%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\S+)' + r'\s+' + r'(?P%s)' + r'\s*' + r'(?P\S.*\S)?' + r'$' + % '|'.join(re.escape(status) for status in DOCKER_STATUS_ERROR) +) + +_RE_WARNING_EVENT = re.compile( + r'^' + r'\s*' + r'(?P\S+)' + r'\s+' + r'(?P%s)' + r'\s*' + r'(?P\S.*\S)?' + r'$' + % '|'.join(re.escape(status) for status in DOCKER_STATUS_WARNING) +) + +_RE_CONTINUE_EVENT = re.compile( + r'^' + r'\s*' + r'(?P\S+)' + r'\s+' + r'-' + r'\s*' + r'(?P\S(?:|.*\S))' + r'$' +) + +_RE_SKIPPED_EVENT = re.compile( + r'^' + r'\s*' + r'(?P\S+)' + r'\s+' + r'Skipped -' + r'\s*' + r'(?P\S(?:|.*\S))' + r'$' +) + +_RE_BUILD_START_EVENT = re.compile( + r'^' + r'\s*' + r'build service' + r'\s+' + r'(?P\S+)' + r'$' +) + +_RE_BUILD_PROGRESS_EVENT = re.compile( + r'^' + r'\s*' + r'==>' + r'\s+' + r'(?P.*)' + 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'), + project_name=dict(type='str'), + files=dict(type='list', elements='path'), + definition=dict(type='dict'), + env_files=dict(type='list', elements='path'), + profiles=dict(type='list', elements='str'), + check_files_existing=dict(type='bool', default=True), + ) + + +def common_compose_argspec_ex(): + return dict( + argspec=common_compose_argspec(), + mutually_exclusive=[ + ('definition', 'project_src'), + ('definition', 'files') + ], + required_by={ + 'definition': ('project_name', ), + }, + ) + + +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 + self.cleanup_dirs = set() + parameters = self.client.module.params + + if parameters['definition'] is not None and not HAS_PYYAML: + self.fail( + missing_required_lib('PyYAML'), + exception=PYYAML_IMPORT_ERROR + ) + + self.project_name = parameters['project_name'] + if parameters['definition'] is not None: + self.project_src = tempfile.mkdtemp(prefix='ansible') + self.cleanup_dirs.add(self.project_src) + compose_file = os.path.join(self.project_src, 'compose.yaml') + self.client.module.add_cleanup_file(compose_file) + try: + with open(compose_file, 'wb') as f: + yaml.dump(parameters['definition'], f, encoding="utf-8", Dumper=_SafeDumper) + except Exception as exc: + self.fail("Error writing to %s - %s" % (compose_file, to_native(exc))) + else: + self.project_src = os.path.abspath(parameters['project_src']) + + 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.fail('Docker CLI {0} does not have the compose plugin installed'.format(self.client.get_cli())) + if compose['Version'] == 'dev': + self.fail( + 'Docker CLI {0} has a compose plugin installed, but it reports version "dev".' + ' Please use a version of the plugin that returns a proper version.' + .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.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.fail('"{0}" is not a directory'.format(self.project_src)) + + self.check_files_existing = parameters['check_files_existing'] + if self.files: + for file in self.files: + path = os.path.join(self.project_src, file) + if not os.path.exists(path): + self.fail('Cannot find Compose file "{0}" relative to project directory "{1}"'.format(file, self.project_src)) + elif self.check_files_existing and 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.fail('"{0}" does not contain {1}, or {2}'.format(self.project_src, filenames, DOCKER_COMPOSE_FILES[-1])) + + def fail(self, msg, **kwargs): + self.cleanup() + self.client.fail(msg, **kwargs) + + 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) + + def cleanup(self): + for dir in self.cleanup_dirs: + try: + shutil.rmtree(dir, True) + except Exception: + # shouldn't happen, but simply ignore to be on the safe side + pass diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/image_archive.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/image_archive.py index e174631e..46b5abc1 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/image_archive.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/image_archive.py @@ -23,7 +23,7 @@ def __init__(self, image_id, repo_tags): :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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/base.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/base.py index 21c29226..410ffb15 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/base.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/base.py @@ -19,10 +19,15 @@ 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 @@ def __init__( 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 @@ def __init__( 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 @@ def add_engine(self, engine_name, engine): 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 @@ def can_set_value(self, api_version): 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 @@ -208,6 +231,10 @@ def setup(self, argument_spec, mutually_exclusive=None, required_together=None, # Return (module, active_options, client) 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') @@ -897,9 +935,11 @@ def _preprocess_ports(module, values): OptionGroup(preprocess=_preprocess_healthcheck) .add_option('healthcheck', type='dict', ansible_suboptions=dict( test=dict(type='raw'), + test_cli_compatible=dict(type='bool', default=False), interval=dict(type='str'), timeout=dict(type='str'), start_period=dict(type='str'), + start_interval=dict(type='str'), retries=dict(type='int'), )) ) @@ -910,7 +950,7 @@ def _preprocess_ports(module, values): ) OPTION_IMAGE = ( - OptionGroup(preprocess=_preprocess_networks) + OptionGroup() .add_option('image', type='str') ) @@ -984,6 +1024,7 @@ def _preprocess_ports(module, values): ipv6_address=dict(type='str'), aliases=dict(type='list', elements='str'), links=dict(type='list', elements='str'), + mac_address=dict(type='str'), )) ) @@ -1009,7 +1050,7 @@ def _preprocess_ports(module, values): OPTION_PLATFORM = ( OptionGroup() - .add_option('platform', type='str') + .add_option('platform', type='str', compare=_compare_platform) ) OPTION_PRIVILEGED = ( diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py index d2cc553e..d3da84fe 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/docker_api.py @@ -17,6 +17,11 @@ 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, @@ -108,7 +113,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import ( convert_port_bindings, normalize_links, - parse_repository_tag, ) @@ -166,6 +170,8 @@ def setup(self, argument_spec, mutually_exclusive=None, required_together=None, 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) @@ -182,6 +188,9 @@ def setup(self, argument_spec, mutually_exclusive=None, required_together=None, 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 @@ -217,7 +226,7 @@ def inspect_container_by_id(self, client, container_id): 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) @@ -237,7 +246,13 @@ def disconnect_container_from_network(self, client, container_id, network_id): 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': @@ -388,18 +403,27 @@ def __init__( 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( @@ -412,6 +436,7 @@ def config_value( min_api_version=None, preprocess_value=None, update_parameter=None, + extra_option_minimal_versions=None, ): def preprocess_value_(module, client, api_version, options, values): if len(options) != 1: @@ -424,7 +449,7 @@ def preprocess_value_(module, client, api_version, options, values): 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) @@ -436,7 +461,7 @@ def get_value(module, container, api_version, options): 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) @@ -475,6 +500,7 @@ def update_value(module, data, api_version, options, values): set_value=set_value, min_api_version=min_api_version, update_value=update_value, + extra_option_minimal_versions=extra_option_minimal_versions, ) @classmethod @@ -488,6 +514,7 @@ def host_config_value( min_api_version=None, preprocess_value=None, update_parameter=None, + extra_option_minimal_versions=None, ): def preprocess_value_(module, client, api_version, options, values): if len(options) != 1: @@ -500,7 +527,7 @@ def preprocess_value_(module, client, api_version, options, values): 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) @@ -512,7 +539,7 @@ def get_value(module, container, api_version, options): 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) @@ -553,6 +580,7 @@ def update_value(module, data, api_version, options, values): set_value=set_value, min_api_version=min_api_version, update_value=update_value, + extra_option_minimal_versions=extra_option_minimal_versions, ) @@ -586,7 +614,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') @@ -718,7 +746,7 @@ def _preprocess_etc_hosts(module, client, api_version, value): def _preprocess_healthcheck(module, client, api_version, value): if value is None: return value - if not value or not value.get('test'): + if not value or not (value.get('test') or (value.get('test_cli_compatible') and value.get('test') is None)): value = {'test': ['NONE']} elif 'test' in value: value['test'] = normalize_healthcheck_test(value['test']) @@ -727,6 +755,7 @@ def _preprocess_healthcheck(module, client, api_version, value): 'Interval': value.get('interval'), 'Timeout': value.get('timeout'), 'StartPeriod': value.get('start_period'), + 'StartInterval': value.get('start_interval'), 'Retries': value.get('retries'), }) @@ -837,7 +866,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 {} @@ -853,7 +882,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 @@ -917,7 +946,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 @@ -995,8 +1024,8 @@ def _set_values_mounts(module, data, api_version, options, values): tmpfs_opts['Mode'] = mount.get('tmpfs_mode') if mount.get('tmpfs_size'): tmpfs_opts['SizeBytes'] = mount.get('tmpfs_size') - if mount.get('tmpfs_opts'): - mount_res['TmpfsOptions'] = mount.get('tmpfs_opts') + if tmpfs_opts: + mount_res['TmpfsOptions'] = tmpfs_opts mounts.append(mount_res) data['HostConfig']['Mounts'] = mounts if 'volumes' in values: @@ -1018,7 +1047,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'), @@ -1038,18 +1067,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'), @@ -1078,7 +1139,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'] @@ -1095,7 +1156,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: @@ -1244,7 +1305,16 @@ def _preprocess_container_names(module, client, api_version, value): OPTION_GROUPS.add_engine('docker_api', DockerAPIEngine.host_config_value('GroupAdd')) OPTION_HEALTHCHECK.add_engine('docker_api', DockerAPIEngine.config_value( - 'Healthcheck', preprocess_value=_preprocess_healthcheck, postprocess_for_get=_postprocess_healthcheck_get_value)) + 'Healthcheck', + preprocess_value=_preprocess_healthcheck, + postprocess_for_get=_postprocess_healthcheck_get_value, + extra_option_minimal_versions={ + 'healthcheck.start_interval': { + 'docker_api_version': '1.44', + 'detect_usage': lambda c: c.module.params['healthcheck'] and c.module.params['healthcheck']['start_interval'] is not None, + }, + }, +)) OPTION_HOSTNAME.add_engine('docker_api', DockerAPIEngine.config_value('Hostname')) @@ -1284,6 +1354,12 @@ def _preprocess_container_names(module, client, api_version, value): 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')) @@ -1297,6 +1373,9 @@ def _preprocess_container_names(module, client, api_version, value): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/module.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/module.py index 230dbfb4..5d819efa 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/module.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/module_container/module.py @@ -78,6 +78,11 @@ def __init__(self, module, engine_driver, client, active_options): 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 @@ def _parse_comparisons(self): 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 @@ def _collect_params(self, active_options): 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 @@ def present(self, state): # 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 @@ def present(self, state): 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 @@ def present(self, state): 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 @@ def _get_container_image(self, container, fallback=None): 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 @@ def _compose_create_parameters(self, image): 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 @@ def sort_key_fn(x): 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 @@ def _compose_update_parameters(self): 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 @@ def has_network_differences(self, container): 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 @@ def has_network_differences(self, container): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/selectors.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/selectors.py new file mode 100644 index 00000000..ca52cc87 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/selectors.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2024, 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 + +"""Provide selectors import.""" + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +# Once we drop support for ansible-core 2.16, we can remove the try/except. + +from sys import version_info as _python_version_info + + +if _python_version_info < (3, 4): + from ansible.module_utils.compat import selectors # noqa: F401, pylint: disable=unused-import +else: + import selectors # noqa: F401, pylint: disable=unused-import diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_handler.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_handler.py index c582d6d8..878dc7c5 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_handler.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_handler.py @@ -9,16 +9,11 @@ import os import os.path import socket as pysocket +import struct -from ansible.module_utils.basic import missing_required_lib from ansible.module_utils.six import PY2 -try: - from docker.utils import socket as docker_socket - import struct -except Exception: - # missing Docker SDK for Python handled in ansible_collections.community.docker.plugins.module_utils.common - pass +from ansible_collections.community.docker.plugins.module_utils._api.utils import socket as docker_socket from ansible_collections.community.docker.plugins.module_utils.socket_helper import ( make_unblocking, diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_helper.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_helper.py index a0885f72..2148fe97 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_helper.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/socket_helper.py @@ -36,6 +36,10 @@ def _empty_writer(msg): def shutdown_writing(sock, log=_empty_writer): + # FIXME: This does **not work with SSLSocket**! Apparently SSLSocket does not allow to send + # a close_notify TLS alert without completely shutting down the connection. + # Calling sock.shutdown(pysocket.SHUT_WR) simply turns of TLS encryption and from that + # point on the raw encrypted data is returned when sock.recv() is called. :-( if hasattr(sock, 'shutdown_write'): sock.shutdown_write() elif hasattr(sock, 'shutdown'): diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/util.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/util.py index 37917133..9235e34d 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/util.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/util.py @@ -6,21 +6,16 @@ __metaclass__ = type -import abc -import os -import platform +import json import re -import sys -import traceback from datetime import timedelta from ansible.module_utils.basic import env_fallback from ansible.module_utils.common.collections import is_sequence -from ansible.module_utils.common._collections_compat import 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 @@ -31,10 +26,15 @@ 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'])), + ssl_version=dict( + type='str', + fallback=(env_fallback, ['DOCKER_SSL_VERSION']), + removed_in_version='4.0.0', + removed_from_collection='community.docker', + ), tls=dict(type='bool', default=DEFAULT_TLS, fallback=(env_fallback, ['DOCKER_TLS'])), use_ssh_client=dict(type='bool', default=False), validate_certs=dict(type='bool', default=DEFAULT_TLS_VERIFY, fallback=(env_fallback, ['DOCKER_TLS_VERIFY']), aliases=['tls_verify']), @@ -91,6 +91,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 @@ -98,12 +111,7 @@ def __init__(self): 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): @@ -345,9 +353,9 @@ def normalize_healthcheck(healthcheck, normalize_test=False): result = dict() # All supported healthcheck parameters - options = ('test', 'interval', 'timeout', 'start_period', 'retries') + options = ('test', 'test_cli_compatible', 'interval', 'timeout', 'start_period', 'start_interval', 'retries') - duration_options = ('interval', 'timeout', 'start_period') + duration_options = ('interval', 'timeout', 'start_period', 'start_interval') for key in options: if key in healthcheck: @@ -358,7 +366,7 @@ def normalize_healthcheck(healthcheck, normalize_test=False): continue if key in duration_options: value = convert_duration_to_nanosecond(value) - if not value: + if not value and not (healthcheck.get('test_cli_compatible') and key == 'test'): continue if key == 'retries': try: @@ -368,7 +376,7 @@ def normalize_healthcheck(healthcheck, normalize_test=False): 'Cannot parse number of retries for healthcheck. ' 'Expected an integer, got "{0}".'.format(value) ) - if key == 'test' and normalize_test: + if key == 'test' and value and normalize_test: value = normalize_healthcheck_test(value) result[key] = value diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/version.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/version.py index 746e6ba8..5184d70e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/version.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/module_utils/version.py @@ -15,10 +15,10 @@ from ansible.module_utils.six import raise_from try: - from ansible.module_utils.compat.version import LooseVersion, StrictVersion + from ansible.module_utils.compat.version import LooseVersion, StrictVersion # noqa: F401, pylint: disable=unused-import except ImportError: try: - from distutils.version import LooseVersion, StrictVersion + from distutils.version import LooseVersion, StrictVersion # noqa: F401, pylint: disable=unused-import except ImportError as exc: msg = 'To use this plugin or module with ansible-core 2.11, you need to use Python < 3.12 with distutils.version present' raise_from(ImportError(msg), exc) diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/current_container_facts.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/current_container_facts.py index 99f9b8ec..2daf60bb 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/current_container_facts.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/current_container_facts.py @@ -12,10 +12,10 @@ DOCUMENTATION = r''' --- module: current_container_facts -short_description: Return facts about whether the module runs in a Docker container +short_description: Return facts about whether the module runs in a container version_added: 1.1.0 description: - - Return facts about whether the module runs in a Docker container. + - Return facts about whether the module runs in a Docker or podman container. - This module attempts a best-effort detection. There might be special cases where it does not work; if you encounter one, L(please file an issue, https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&template=bug_report.md). @@ -58,8 +58,10 @@ description: - The detected container environment. - Contains an empty string if no container was detected, or a non-empty string identifying the container environment. - - C(github_actions) is supported since community.docker 2.4.0. - - C(podman) 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose.py index 96e997df..3af3bebb 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose.py @@ -12,13 +12,19 @@ module: docker_compose -short_description: Manage multi-container Docker applications with Docker Compose. +short_description: Manage multi-container Docker applications with Docker Compose V1 + +deprecated: + removed_in: 4.0.0 + why: This module uses docker-compose v1, which is End of Life since July 2022. + alternative: Migrate to M(community.docker.docker_compose_v2) 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 +45,27 @@ 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 +80,9 @@ 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 +90,25 @@ - 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 +118,8 @@ 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 +128,49 @@ - 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 +181,8 @@ 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 +190,13 @@ - 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 = ''' @@ -208,7 +217,8 @@ project_src: flask register: output - - ansible.builtin.debug: + - name: Show results + ansible.builtin.debug: var: output - name: Run `docker-compose up` again @@ -217,7 +227,8 @@ build: false register: output - - ansible.builtin.debug: + - name: Show results + ansible.builtin.debug: var: output - ansible.builtin.assert: @@ -230,13 +241,15 @@ stopped: true register: output - - ansible.builtin.debug: + - name: Show results + ansible.builtin.debug: var: output - - ansible.builtin.assert: + - name: Verify that web and db services are not running + ansible.builtin.assert: that: - - "not web.flask_web_1.state.running" - - "not db.flask_db_1.state.running" + - "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: @@ -245,25 +258,29 @@ restarted: true register: output - - ansible.builtin.debug: + - name: Show results + ansible.builtin.debug: var: output - - ansible.builtin.assert: + - name: Verify that web and db services are running + ansible.builtin.assert: that: - - "web.flask_web_1.state.running" - - "db.flask_db_1.state.running" + - "output.services.web.flask_web_1.state.running" + - "output.services.db.flask_db_1.state.running" - name: Scale the web service to 2 hosts: localhost gather_facts: false tasks: - - community.docker.docker_compose: + - name: Scale the web service to two instances + community.docker.docker_compose: project_src: flask scale: web: 2 register: output - - ansible.builtin.debug: + - name: Show results + ansible.builtin.debug: var: output - name: Run with inline Compose file version 2 @@ -271,11 +288,13 @@ hosts: localhost gather_facts: false tasks: - - community.docker.docker_compose: + - name: Remove flask project + community.docker.docker_compose: project_src: flask state: absent - - community.docker.docker_compose: + - name: Start flask project with inline definition + community.docker.docker_compose: project_name: flask definition: version: '2' @@ -293,24 +312,28 @@ - db register: output - - ansible.builtin.debug: + - name: Show results + ansible.builtin.debug: var: output - - ansible.builtin.assert: + - name: Verify that the db and web services are running + ansible.builtin.assert: that: - - "web.flask_web_1.state.running" - - "db.flask_db_1.state.running" + - "output.services.web.flask_web_1.state.running" + - "output.services.db.flask_db_1.state.running" - name: Run with inline Compose file version 1 # https://docs.docker.com/compose/compose-file/compose-file-v1/ hosts: localhost gather_facts: false tasks: - - community.docker.docker_compose: + - name: Remove flask project + community.docker.docker_compose: project_src: flask state: absent - - community.docker.docker_compose: + - name: Start flask project with inline definition + community.docker.docker_compose: project_name: flask definition: db: @@ -326,13 +349,15 @@ - db register: output - - ansible.builtin.debug: + - name: Show results + ansible.builtin.debug: var: output - - ansible.builtin.assert: + - name: Verify that web and db services are running + ansible.builtin.assert: that: - - "web.flask_web_1.state.running" - - "db.flask_db_1.state.running" + - "output.services.web.flask_web_1.state.running" + - "output.services.db.flask_db_1.state.running" ''' RETURN = ''' @@ -424,7 +449,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py new file mode 100644 index 00000000..9972d45f --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py @@ -0,0 +1,642 @@ +#!/usr/bin/python +# +# Copyright (c) 2023, Felix Fontein +# 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_ex, + 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.fail('The key %s for `scale` is not a string' % repr(key)) + try: + value = check_type_int(value) + except TypeError as exc: + self.fail('The value %s for `scale[%s]` is not an integer' % (repr(value), repr(key))) + if value < 0: + self.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'), + ) + argspec_ex = common_compose_argspec_ex() + argument_spec.update(argspec_ex.pop('argspec')) + + client = AnsibleModuleDockerClient( + argument_spec=argument_spec, + supports_check_mode=True, + **argspec_ex + ) + + try: + manager = ServicesManager(client) + result = manager.run() + manager.cleanup() + 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose_v2_pull.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose_v2_pull.py new file mode 100644 index 00000000..6b091f9a --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_compose_v2_pull.py @@ -0,0 +1,167 @@ +#!/usr/bin/python +# +# Copyright (c) 2023, 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 + +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_ex, +) + +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.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'), + ) + argspec_ex = common_compose_argspec_ex() + argument_spec.update(argspec_ex.pop('argspec')) + + client = AnsibleModuleDockerClient( + argument_spec=argument_spec, + supports_check_mode=True, + **argspec_ex + ) + + try: + manager = PullManager(client) + result = manager.run() + manager.cleanup() + 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_config.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_config.py index 9f55e0f0..86654e78 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_config.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_config.py @@ -18,7 +18,7 @@ - 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 @@ 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 @@ 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 @@ - 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 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container.py index 5d62455f..60768637 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container.py @@ -20,11 +20,11 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ rate: description: - "Device read limit in format C([])." - - "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 @@ rate: description: - "Device read limit in format C([])." - - "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 @@ 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 @@ 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,65 +369,82 @@ - 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), O(healthcheck.start_period), and O(healthcheck.start_interval) 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 + test_cli_compatible: + description: + - If set to V(true), omitting O(healthcheck.test) while providing O(healthcheck) does not disable healthchecks, + but simply overwrites the image's values by the ones specified in O(healthcheck). This is + the behavior used by the Docker CLI. + - If set to V(false), omitting O(healthcheck.test) will disable the container's health check. + This is the classical behavior of the module and currently the default behavior. + default: false + type: bool + version_added: 3.10.0 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 + start_interval: + description: + - Time between health checks during the start period. This option requires Docker Engine version 25.0 or later. + - The default used by the Docker daemon is V(5s). type: str + version_added: 3.10.0 hostname: description: - The container's hostname. 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 +454,13 @@ 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 +471,31 @@ 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:) to reuse another container's IPC namespace or C(host) to use + - Can be one of V(container:) 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 +510,8 @@ kernel_memory: description: - "Kernel memory limit in format C([]). 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 +526,45 @@ 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 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 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([]), 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 +577,7 @@ 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 +588,12 @@ 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 +616,7 @@ - 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 +627,16 @@ - 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 +647,8 @@ tmpfs_size: description: - "The size for the tmpfs mount in bytes in format []." - - "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 +663,24 @@ required: true network_mode: description: - - Connect the container to a network. Choices are C(bridge), C(host), C(none), C(container:), C() 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:), C() 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 +708,23 @@ 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 +739,13 @@ 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 +754,34 @@ 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 +789,66 @@ 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 +873,7 @@ restart_policy: description: - Container restart policy. - - Place quotes around C(no) option. + - Place quotes around V(no) option. type: str choices: - 'no' @@ -834,9 +891,9 @@ shm_size: description: - "Size of C(/dev/shm) in format C([]). 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 +902,22 @@ 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 +953,11 @@ 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 +977,12 @@ 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: @@ -1155,6 +1212,7 @@ timeout: 10s retries: 3 start_period: 30s + start_interval: 10s - name: Remove healthcheck from container community.docker.docker_container: @@ -1165,6 +1223,17 @@ # The "NONE" check needs to be specified test: ["NONE"] +- name: Create a tmpfs with a size and mode + community.docker.docker_container: + name: tmpfs test + image: ubuntu:22.04 + state: started + mounts: + - type: tmpfs + target: /cache + tmpfs_mode: "1700" # only readable to the owner + tmpfs_size: "16G" + - name: Start container with block device read limit community.docker.docker_container: name: test @@ -1214,9 +1283,9 @@ 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": "", @@ -1254,7 +1323,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py index 71b0ea59..2af99152 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_copy_into.py @@ -19,7 +19,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 ''' @@ -146,7 +146,6 @@ import base64 import io import os -import random import stat import traceback diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_exec.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_exec.py index d9126126..251af5bc 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_exec.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_exec.py @@ -42,21 +42,21 @@ description: - The command to execute. - Since this is a list of arguments, no quoting is needed. - - Exactly one of I(argv) and 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) and 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 @@ 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,14 +87,17 @@ 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 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)" @@ -111,7 +114,7 @@ register: result - name: Print stdout - debug: + ansible.builtin.debug: var: result.stdout - name: Run a simple command (argv) @@ -125,30 +128,30 @@ register: result - name: Print stderr lines - debug: + ansible.builtin.debug: var: result.stderr_lines ''' 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. @@ -159,7 +162,6 @@ import traceback from ansible.module_utils.common.text.converters import to_text, to_bytes, to_native -from ansible.module_utils.compat import selectors from ansible.module_utils.six import string_types from ansible_collections.community.docker.plugins.module_utils.common_api import ( @@ -167,10 +169,7 @@ RequestException, ) -from ansible_collections.community.docker.plugins.module_utils.socket_helper import ( - shutdown_writing, - write_to_socket, -) +from ansible_collections.community.docker.plugins.module_utils.selectors import selectors from ansible_collections.community.docker.plugins.module_utils.socket_handler import ( DockerSocketHandlerModule, diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_info.py index bfc28156..ff24b1bc 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_container_info.py @@ -66,7 +66,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_host_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_host_info.py index 63d235e8..696cdfd0 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_host_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_host_info.py @@ -108,10 +108,10 @@ 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 @@ -160,7 +160,8 @@ - key2=value2 register: result -- ansible.builtin.debug: +- name: Show host information + ansible.builtin.debug: var: result.host_info ''' @@ -168,7 +169,7 @@ 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 @@ -180,40 +181,40 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image.py index 735de786..b229ad38 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image.py @@ -20,6 +20,7 @@ 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 @@ 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 @@ 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 @@ suboptions: memory: description: - - Set memory limit for build. - type: int + - "Memory limit for build in format C([]). 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([]), 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 @@ 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 @@ - 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 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 @@ 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 @@ 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 @@ - 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 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 @@ ) +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 @@ def __init__(self, client, results): 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 @@ def __init__(self, client, results): 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 @@ def build_image(self): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_build.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_build.py new file mode 100644 index 00000000..48478b55 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_build.py @@ -0,0 +1,549 @@ +#!/usr/bin/python +# +# Copyright (c) 2023, 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 + +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). + - Note that the module is B(not idempotent) in the sense of classical Ansible modules. + The only idempotence check is whether the built image already exists. This check can + be disabled with the O(rebuild) option. + +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: + - Platforms in the format C(os[/arch[/variant]]). + - Since community.docker 3.10.0 this can be a list of platforms, instead of just a single platform. + type: list + elements: str + shm_size: + description: + - "Size of C(/dev/shm) in format C([]). 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 + secrets: + description: + - Secrets to expose to the build. + type: list + elements: dict + version_added: 3.10.0 + suboptions: + id: + description: + - The secret identifier. + - The secret will be made available as a file in the container under C(/run/secrets/). + type: str + required: true + type: + description: + - Type of the secret. + type: str + choices: + file: + - Reads the secret from a file on the target. + - The file must be specified in O(secrets[].src). + env: + - Reads the secret from an environment variable on the target. + - The environment variable must be named in O(secrets[].env). + - Note that this requires the Buildkit plugin to have version 0.6.0 or newer. + value: + - Provides the secret from a given value O(secrets[].value). + - B(Note) that the secret will be passed as an environment variable to C(docker compose). + Use another mean of transport if you consider this not safe enough. + - Note that this requires the Buildkit plugin to have version 0.6.0 or newer. + required: true + src: + description: + - Source path of the secret. + - Only supported and required for O(secrets[].type=file). + type: path + env: + description: + - Environment value of the secret. + - Only supported and required for O(secrets[].type=env). + type: str + value: + description: + - Value of the secret. + - B(Note) that the secret will be passed as an environment variable to C(docker compose). + Use another mean of transport if you consider this not safe enough. + - Only supported and required for O(secrets[].type=value). + type: str + outputs: + description: + - Output destinations. + - You can provide a list of exporters to export the built image in various places. + Note that not all exporters might be supported by the build driver used. + - Note that depending on how this option is used, no image with name O(name) and tag O(tag) might + be created, which can cause the basic idempotency this module offers to not work. + - Providing an empty list to this option is equivalent to not specifying it at all. + The default behavior is a single entry with O(outputs[].type=image). + type: list + elements: dict + version_added: 3.10.0 + suboptions: + type: + description: + - The type of exporter to use. + type: str + choices: + local: + - This export type writes all result files to a directory on the client. + The new files will be owned by the current user. + On multi-platform builds, all results will be put in subdirectories by their platform. + - The destination has to be provided in O(outputs[].dest). + tar: + - This export type export type writes all result files as a single tarball on the client. + On multi-platform builds, all results will be put in subdirectories by their platform. + - The destination has to be provided in O(outputs[].dest). + oci: + - This export type writes the result image or manifest list as an + L(OCI image layout, https://github.com/opencontainers/image-spec/blob/v1.0.1/image-layout.md) + tarball on the client. + - The destination has to be provided in O(outputs[].dest). + docker: + - This export type writes the single-platform result image as a Docker image specification tarball on the client. + Tarballs created by this exporter are also OCI compatible. + - The destination can be provided in O(outputs[].dest). + If not specified, the tar will be loaded automatically to the local image store. + - The Docker context where to import the result can be provided in O(outputs[].context). + image: + - This exporter writes the build result as an image or a manifest list. + When using this driver, the image will appear in C(docker images). + - The image name can be provided in O(outputs[].name). If it is not provided, the + - Optionally, image can be automatically pushed to a registry by setting O(outputs[].push=true). + required: true + dest: + description: + - The destination path. + - Required for O(outputs[].type=local), O(outputs[].type=tar), O(outputs[].type=oci). + - Optional for O(outputs[].type=docker). + type: path + context: + description: + - Name for the Docker context where to import the result. + - Optional for O(outputs[].type=docker). + type: str + name: + description: + - Name under which the image is stored under. + - If not provided, O(name) and O(tag) will be used. + - Optional for O(outputs[].type=image). + type: str + push: + description: + - Whether to push the built image to a registry. + - Only used for O(outputs[].type=image). + type: bool + default: false +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 + +- name: Build multi-platform image + community.docker.docker_image_build: + name: multi-platform-image + tag: "1.5.2" + path: /home/user/images/multi-platform + platform: + - linux/amd64 + - linux/arm64/v8 +''' + +RETURN = ''' +image: + description: Image inspection results for the affected image. + returned: success + type: dict + sample: {} +''' + +import base64 +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.version import LooseVersion + +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'] + self.secrets = parameters['secrets'] + self.outputs = parameters['outputs'] + + 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())) + buildx_version = buildx['Version'].lstrip('v') + + if self.secrets: + for secret in self.secrets: + if secret['type'] in ('env', 'value'): + if LooseVersion(buildx_version) < LooseVersion('0.6.0'): + self.fail('The Docker buildx plugin has version {version}, but 0.6.0 is needed for secrets of type=env and type=value'.format( + version=buildx_version, + )) + if self.outputs and len(self.outputs) > 1: + if LooseVersion(buildx_version) < LooseVersion('0.13.0'): + self.fail('The Docker buildx plugin has version {version}, but 0.13.0 is needed to specify more than one output'.format( + version=buildx_version, + )) + + 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): + environ_update = {} + 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: + for platform in self.platform: + args.extend(['--platform', 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)) + if self.secrets: + random_prefix = None + for index, secret in enumerate(self.secrets): + if secret['type'] == 'file': + args.extend(['--secret', 'id={id},type=file,src={src}'.format(id=secret['id'], src=secret['src'])]) + if secret['type'] == 'env': + args.extend(['--secret', 'id={id},type=env,env={env}'.format(id=secret['id'], env=secret['src'])]) + if secret['type'] == 'value': + # We pass values on using environment variables. The user has been warned in the documentation + # that they should only use this mechanism when being comfortable with it. + if random_prefix is None: + # Use /dev/urandom to generate some entropy to make the environment variable's name unguessable + random_prefix = base64.b64encode(os.urandom(16)).decode('utf-8').replace('=', '') + env_name = 'ANSIBLE_DOCKER_COMPOSE_ENV_SECRET_{random}_{id}'.format( + random=random_prefix, + id=index, + ) + environ_update[env_name] = secret['value'] + args.extend(['--secret', 'id={id},type=env,env={env}'.format(id=secret['id'], env=env_name)]) + if self.outputs: + for output in self.outputs: + if output['type'] == 'local': + args.extend(['--output', 'type=local,dest={dest}'.format(dest=output['dest'])]) + if output['type'] == 'tar': + args.extend(['--output', 'type=tar,dest={dest}'.format(dest=output['dest'])]) + if output['type'] == 'oci': + args.extend(['--output', 'type=oci,dest={dest}'.format(dest=output['dest'])]) + if output['type'] == 'docker': + more = [] + if output['dest'] is not None: + more.append('dest={dest}'.format(dest=output['dest'])) + if output['dest'] is not None: + more.append('context={context}'.format(context=output['context'])) + args.extend(['--output', 'type=docker,{more}'.format(more=','.join(more))]) + if output['type'] == 'image': + more = [] + if output['name'] is not None: + more.append('name={name}'.format(name=output['name'])) + if output['push']: + more.append('push=true') + args.extend(['--output', 'type=image,{more}'.format(more=','.join(more))]) + return environ_update + + 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'] + environ_update = self.add_args(args) + args.extend(['--', self.path]) + rc, stdout, stderr = self.client.call_cli(*args, environ_update=environ_update) + 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='list', elements='str'), + shm_size=dict(type='str'), + labels=dict(type='dict'), + rebuild=dict(type='str', choices=['never', 'always'], default='never'), + secrets=dict( + type='list', + elements='dict', + options=dict( + id=dict(type='str', required=True), + type=dict(type='str', choices=['file', 'env', 'value'], required=True), + src=dict(type='path'), + env=dict(type='str'), + value=dict(type='str', no_log=True), + ), + required_if=[ + ('type', 'file', ['src']), + ('type', 'env', ['env']), + ('type', 'value', ['value']), + ], + mutually_exclusive=[ + ('src', 'env', 'value'), + ], + no_log=False, + ), + outputs=dict( + type='list', + elements='dict', + options=dict( + type=dict(type='str', choices=['local', 'tar', 'oci', 'docker', 'image'], required=True), + dest=dict(type='path'), + context=dict(type='str'), + name=dict(type='str'), + push=dict(type='bool', default=False), + ), + required_if=[ + ('type', 'local', ['dest']), + ('type', 'tar', ['dest']), + ('type', 'oci', ['dest']), + ], + mutually_exclusive=[ + ('dest', 'name'), + ('dest', 'push'), + ('context', 'name'), + ('context', 'push'), + ], + ), + ) + + 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_export.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_export.py new file mode 100644 index 00000000..9e03875a --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_export.py @@ -0,0 +1,283 @@ +#!/usr/bin/python +# +# Copyright (c) 2023, 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 + +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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_info.py index e4f480b1..2f441672 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_info.py @@ -19,8 +19,8 @@ - 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 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_load.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_load.py index 880ae4e4..ec628d1b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_load.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_load.py @@ -39,14 +39,17 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_pull.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_pull.py new file mode 100644 index 00000000..a70942b3 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_pull.py @@ -0,0 +1,223 @@ +#!/usr/bin/python +# +# Copyright (c) 2023, 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 + +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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_push.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_push.py new file mode 100644 index 00000000..f1474d83 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_push.py @@ -0,0 +1,197 @@ +#!/usr/bin/python +# +# Copyright (c) 2023, 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 + +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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_remove.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_remove.py new file mode 100644 index 00000000..c8ea326b --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_tag.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_tag.py new file mode 100644 index 00000000..c395a7fc --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_image_tag.py @@ -0,0 +1,273 @@ +#!/usr/bin/python +# +# Copyright (c) 2023, 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 + +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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_login.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_login.py index 360dd578..bb4e00b8 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_login.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_login.py @@ -46,12 +46,12 @@ 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 @@ - 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 @@ 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 @@ def __init__(self, client, results): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network.py index db932363..c5dd3b22 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network.py @@ -35,6 +35,18 @@ aliases: - network_name + config_from: + description: + - Specifies the config only network to use the config from. + type: str + version_added: 3.10.0 + + config_only: + description: + - Sets that this is a config only network. + type: bool + version_added: 3.10.0 + connected: description: - List of container names or container IDs to connect to a network. @@ -61,8 +73,8 @@ 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 +85,7 @@ 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 +110,7 @@ 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 +133,14 @@ 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 +175,7 @@ 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 @@ -283,6 +295,8 @@ def __init__(self, client): self.name = None self.connected = None + self.config_from = None + self.config_only = None self.driver = None self.driver_options = None self.ipam_driver = None @@ -300,6 +314,11 @@ def __init__(self, client): for key, value in client.module.params.items(): setattr(self, key, value) + # config_only sets driver to 'null' (and scope to 'local') so force that here. Otherwise we get + # diffs of 'null' --> 'bridge' given that the driver option defaults to 'bridge'. + if self.config_only: + self.driver = 'null' + def container_names_in_network(network): return [c['Name'] for c in network['Containers'].values()] if network['Containers'] else [] @@ -401,6 +420,14 @@ def has_different_config(self, net): :return: (bool, list) ''' differences = DifferenceTracker() + if self.parameters.config_only is not None and self.parameters.config_only != net.get('ConfigOnly', False): + differences.add('config_only', + parameter=self.parameters.config_only, + active=net.get('ConfigOnly', False)) + if self.parameters.config_from is not None and self.parameters.config_from != net.get('ConfigFrom', {}).get('Network', ''): + differences.add('config_from', + parameter=self.parameters.config_from, + active=net.get('ConfigFrom', {}).get('Network', '')) if self.parameters.driver and self.parameters.driver != net['Driver']: differences.add('driver', parameter=self.parameters.driver, @@ -503,6 +530,10 @@ def create_network(self): 'CheckDuplicate': None, } + if self.parameters.config_only is not None: + data['ConfigOnly'] = self.parameters.config_only + if self.parameters.config_from: + data['ConfigFrom'] = {'Network': self.parameters.config_from} if self.parameters.enable_ipv6: data['EnableIPv6'] = True if self.parameters.internal: @@ -630,6 +661,8 @@ def absent(self): def main(): argument_spec = dict( name=dict(type='str', required=True, aliases=['network_name']), + config_from=dict(type='str'), + config_only=dict(type='bool'), connected=dict(type='list', default=[], elements='str', aliases=['containers']), state=dict(type='str', default='present', choices=['present', 'absent']), driver=dict(type='str', default='bridge'), @@ -653,6 +686,8 @@ def main(): ) option_minimal_versions = dict( + config_from=dict(docker_api_version='1.30'), + config_only=dict(docker_api_version='1.30'), scope=dict(docker_api_version='1.30'), attachable=dict(docker_api_version='1.26'), ) diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network_info.py index 9818baad..c2c445bd 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_network_info.py @@ -66,7 +66,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node.py index d097b07f..bfa369e9 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node.py @@ -39,19 +39,19 @@ 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 @@ - 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node_info.py index d943db31..c64de0f8 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_node_info.py @@ -33,14 +33,14 @@ - 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 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_plugin.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_plugin.py index 1d46e3a8..e7242e8e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_plugin.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_plugin.py @@ -17,6 +17,8 @@ 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 @@ 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 @@ -65,7 +67,7 @@ force_remove: description: - Remove even if the plugin is enabled. - default: False + default: false type: bool enable_timeout: @@ -121,7 +123,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_prune.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_prune.py index 2d7b82ec..a333c52f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_prune.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_prune.py @@ -81,10 +81,35 @@ - Whether to prune the builder cache. type: bool default: false + builder_cache_all: + description: + - Whether to remove all types of build cache. + type: bool + default: false + version_added: 3.10.0 + builder_cache_filters: + description: + - A dictionary of filter values used for selecting images to delete. + - "For example, C(until: 10m)." + - See L(the API documentation,https://docs.docker.com/engine/api/v1.44/#tag/Image/operation/BuildPrune) + for more information on possible filters. + type: dict + version_added: 3.10.0 + builder_cache_keep_storage: + description: + - Amount of disk space to keep for cache in format C([])." + - "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 + version_added: 3.10.0 author: - "Felix Fontein (@felixfontein)" +notes: + - The module always returned C(changed=false) before community.docker 3.5.1. + requirements: - "Docker API >= 1.25" ''' @@ -121,14 +146,14 @@ 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 @@ -136,14 +161,14 @@ 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 @@ -151,7 +176,7 @@ networks: description: - List of IDs of deleted networks. - returned: I(networks) is C(true) + returned: O(networks=true) type: list elements: str sample: [] @@ -160,14 +185,14 @@ 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 @@ -175,14 +200,23 @@ 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 +builder_cache_caches_deleted: + description: + - The build caches that were deleted. + returned: O(builder_cache=true) and API version is 1.39 or later + type: list + elements: str + sample: [] + version_added: 3.10.0 ''' 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, @@ -206,15 +240,32 @@ def main(): volumes=dict(type='bool', default=False), volumes_filters=dict(type='dict'), builder_cache=dict(type='bool', default=False), + builder_cache_all=dict(type='bool', default=False), + builder_cache_filters=dict(type='dict'), + builder_cache_keep_storage=dict(type='str'), # convert to bytes ) client = AnsibleDockerClient( argument_spec=argument_spec, + option_minimal_versions=dict( + builder_cache=dict(docker_py_version='1.31'), + builder_cache_all=dict(docker_py_version='1.39'), + builder_cache_filters=dict(docker_py_version='1.31'), + builder_cache_keep_storage=dict(docker_py_version='1.39'), + ), # supports_check_mode=True, ) + builder_cache_keep_storage = None + if client.module.params.get('builder_cache_keep_storage') is not None: + try: + builder_cache_keep_storage = human_to_bytes(client.module.params.get('builder_cache_keep_storage')) + except ValueError as exc: + client.module.fail_json(msg='Error while parsing value of builder_cache_keep_storage: {0}'.format(exc)) + try: result = dict() + changed = False if client.module.params['containers']: filters = clean_dict_booleans_for_docker_api(client.module.params.get('containers_filters')) @@ -222,6 +273,8 @@ def main(): res = client.post_to_json('/containers/prune', params=params) result['containers'] = res.get('ContainersDeleted') or [] result['containers_space_reclaimed'] = res['SpaceReclaimed'] + if result['containers'] or result['containers_space_reclaimed']: + changed = True if client.module.params['images']: filters = clean_dict_booleans_for_docker_api(client.module.params.get('images_filters')) @@ -229,12 +282,16 @@ def main(): res = client.post_to_json('/images/prune', params=params) result['images'] = res.get('ImagesDeleted') or [] result['images_space_reclaimed'] = res['SpaceReclaimed'] + if result['images'] or result['images_space_reclaimed']: + changed = True if client.module.params['networks']: filters = clean_dict_booleans_for_docker_api(client.module.params.get('networks_filters')) params = {'filters': convert_filters(filters)} res = client.post_to_json('/networks/prune', params=params) result['networks'] = res.get('NetworksDeleted') or [] + if result['networks']: + changed = True if client.module.params['volumes']: filters = clean_dict_booleans_for_docker_api(client.module.params.get('volumes_filters')) @@ -242,11 +299,27 @@ def main(): res = client.post_to_json('/volumes/prune', params=params) result['volumes'] = res.get('VolumesDeleted') or [] result['volumes_space_reclaimed'] = res['SpaceReclaimed'] + if result['volumes'] or result['volumes_space_reclaimed']: + changed = True if client.module.params['builder_cache']: - res = client.post_to_json('/build/prune') + filters = clean_dict_booleans_for_docker_api(client.module.params.get('builder_cache_filters')) + params = {'filters': convert_filters(filters)} + if client.module.params.get('builder_cache_all'): + params['all'] = 'true' + if builder_cache_keep_storage is not None: + params['keep-storage'] = builder_cache_keep_storage + res = client.post_to_json('/build/prune', params=params) result['builder_cache_space_reclaimed'] = res['SpaceReclaimed'] - + if result['builder_cache_space_reclaimed']: + changed = True + if 'CachesDeleted' in res: + # API version 1.39+: return value CachesDeleted (list of str) + result['builder_cache_caches_deleted'] = res['CachesDeleted'] + if result['builder_cache_caches_deleted']: + changed = True + + result['changed'] = changed 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()) diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_secret.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_secret.py index 546756a4..cf432454 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_secret.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_secret.py @@ -18,7 +18,7 @@ - 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 @@ 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 @@ 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 @@ 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 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack.py index 98f4c3ad..728bc5cf 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack.py @@ -18,12 +18,16 @@ - 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 @@ 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 @@ 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 @@ 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 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_info.py index bf3bfbdb..21ce20dd 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_info.py @@ -13,20 +13,52 @@ --- 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 @@ ''' 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py index e3693bc5..72076310 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_stack_task_info.py @@ -18,23 +18,50 @@ - 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 @@ ''' 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm.py index 31306ecf..dc04c0a4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm.py @@ -32,11 +32,11 @@ 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 @@ 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,17 +70,18 @@ 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 default: present choices: @@ -91,35 +92,35 @@ 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: @@ -128,22 +129,24 @@ heartbeat_tick: description: - Amount of ticks (in seconds) between each heartbeat. - - Docker default value is C(1s). + - 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(10s). + - Docker default value is V(10) seconds. type: int dispatcher_heartbeat_period: description: - - The delay for an agent to send a heartbeat to the dispatcher. - - Docker default value is C(5s). + - 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 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. - - Docker default value is C(3months). + - Automatic expiry for nodes certificates, given in nanoseconds. + - 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: description: @@ -172,13 +175,13 @@ 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: @@ -192,18 +195,20 @@ 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 @@ -261,7 +266,7 @@ RETURN = ''' swarm_facts: - description: Informations about swarm. + description: Information about swarm. returned: success type: dict contains: @@ -273,8 +278,8 @@ 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 @@ -282,16 +287,16 @@ 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 @@ -531,7 +536,6 @@ def init_swarm(self): 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, } @@ -539,6 +543,8 @@ def init_swarm(self): 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: @@ -592,11 +598,16 @@ def join(self): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py index 97025a65..6c6008dc 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_info.py @@ -77,10 +77,10 @@ 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 @@ -103,8 +103,6 @@ Docker in Swarm mode: {{ result.docker_swarm_active }} This is a Manager node: {{ result.docker_swarm_manager }} -- block: - - name: Get info on Docker Swarm and list of registered nodes community.docker.docker_swarm_info: nodes: true @@ -123,7 +121,8 @@ name: mynode register: result -- ansible.builtin.debug: +- name: Show swarm facts + ansible.builtin.debug: var: result.swarm_facts - name: Get the swarm unlock key @@ -131,7 +130,8 @@ unlock_key: true register: result -- ansible.builtin.debug: +- name: Print swarm unlock key + ansible.builtin.debug: var: result.swarm_unlock_key ''' @@ -139,21 +139,21 @@ 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_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 @@ -326,7 +326,7 @@ def get_essential_facts_services(item): # Number of replicas have to be updated in calling method or may be left as None object_essentials['Replicas'] = None object_essentials['Image'] = item['Spec']['TaskTemplate']['ContainerSpec']['Image'] - if 'Ports' in item['Spec']['EndpointSpec']: + if item['Spec'].get('EndpointSpec') and 'Ports' in item['Spec']['EndpointSpec']: object_essentials['Ports'] = item['Spec']['EndpointSpec']['Ports'] else: object_essentials['Ports'] = [] diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py index bb12fd38..4660d113 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service.py @@ -64,7 +64,7 @@ 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,13 +76,18 @@ 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: - Dictionary of key value pairs. - Corresponds to the C(--container-label) option of C(docker service create). type: dict + sysctls: + description: + - Dictionary of key, value pairs. + version_added: 3.10.0 + type: dict dns: description: - List of custom DNS servers. @@ -114,7 +119,7 @@ - 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 +128,7 @@ - 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 +148,15 @@ - 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 +207,15 @@ 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 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 +255,7 @@ 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 +265,7 @@ 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 +284,7 @@ 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 +296,12 @@ 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 +315,14 @@ tmpfs_size: description: - "Size of the tmpfs mount in format C([]). 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 +333,8 @@ 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 +405,9 @@ 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 +417,15 @@ 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 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 +453,7 @@ 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 +465,7 @@ 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 +483,7 @@ 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 +500,7 @@ 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 +535,7 @@ 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 +548,12 @@ 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 +564,7 @@ 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 +590,14 @@ 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 +607,7 @@ 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 +625,7 @@ 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 +654,7 @@ - "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 +667,7 @@ - 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": [ @@ -680,6 +686,7 @@ "engine.labels.operatingsystem == ubuntu 14.04" ], "container_labels": null, + "sysctls": null, "dns": null, "dns_options": null, "dns_search": null, @@ -774,7 +781,7 @@ description: - True if the service has been recreated (removed and created) type: bool - sample: True + sample: true ''' EXAMPLES = ''' @@ -1148,7 +1155,7 @@ def sort_list(unsorted_list): 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, @@ -1225,6 +1232,7 @@ def __init__(self, docker_api_version, docker_py_version): self.log_driver_options = None self.labels = None self.container_labels = None + self.sysctls = None self.limit_cpu = None self.limit_memory = None self.reserve_cpu = None @@ -1291,6 +1299,7 @@ def get_facts(self): 'placement_preferences': self.placement_preferences, 'labels': self.labels, 'container_labels': self.container_labels, + 'sysctls': self.sysctls, 'mode': self.mode, 'replicas': self.replicas, 'endpoint_mode': self.endpoint_mode, @@ -1538,6 +1547,7 @@ def from_ansible_params( s.tty = ap['tty'] s.labels = ap['labels'] s.container_labels = ap['container_labels'] + s.sysctls = ap['sysctls'] s.mode = ap['mode'] s.stop_signal = ap['stop_signal'] s.user = ap['user'] @@ -1739,6 +1749,8 @@ def compare(self, os): differences.add('reserve_memory', parameter=self.reserve_memory, active=os.reserve_memory) if self.container_labels is not None and self.container_labels != (os.container_labels or {}): differences.add('container_labels', parameter=self.container_labels, active=os.container_labels) + if self.sysctls is not None and self.sysctls != (os.sysctls or {}): + differences.add('sysctls', parameter=self.sysctls, active=os.sysctls) if self.stop_signal is not None and self.stop_signal != os.stop_signal: differences.add('stop_signal', parameter=self.stop_signal, active=os.stop_signal) if self.stop_grace_period is not None and self.stop_grace_period != os.stop_grace_period: @@ -1933,6 +1945,8 @@ def build_container_spec(self): container_spec_args['user'] = self.user if self.container_labels is not None: container_spec_args['labels'] = self.container_labels + if self.sysctls is not None: + container_spec_args['sysctls'] = self.sysctls if self.healthcheck is not None: container_spec_args['healthcheck'] = types.Healthcheck(**self.healthcheck) elif self.healthcheck_disabled: @@ -2162,6 +2176,7 @@ def get_service(self, name): ds.read_only = task_template_data['ContainerSpec'].get('ReadOnly') ds.cap_add = task_template_data['ContainerSpec'].get('CapabilityAdd') ds.cap_drop = task_template_data['ContainerSpec'].get('CapabilityDrop') + ds.sysctls = task_template_data['ContainerSpec'].get('Sysctls') healthcheck_data = task_template_data['ContainerSpec'].get('Healthcheck') if healthcheck_data: @@ -2675,6 +2690,7 @@ def main(): hosts=dict(type='dict'), labels=dict(type='dict'), container_labels=dict(type='dict'), + sysctls=dict(type='dict'), mode=dict( type='str', default='replicated', @@ -2750,6 +2766,7 @@ def main(): init=dict(docker_py_version='4.0.0', docker_api_version='1.37'), cap_add=dict(docker_py_version='5.0.3', docker_api_version='1.41'), cap_drop=dict(docker_py_version='5.0.3', docker_api_version='1.41'), + sysctls=dict(docker_py_version='6.0.0', docker_api_version='1.40'), # specials publish_mode=dict( docker_py_version='3.0.0', diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py index ebe8a8e1..0a9dd56c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_swarm_service_info.py @@ -58,7 +58,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume.py index 9a8e50cd..f282cafd 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume.py @@ -38,7 +38,7 @@ 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 @@ 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 @@ 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: @@ -118,7 +118,7 @@ import traceback from ansible.module_utils.common.text.converters import to_native -from ansible.module_utils.six import iteritems, text_type +from ansible.module_utils.six import iteritems from ansible_collections.community.docker.plugins.module_utils.common_api import ( AnsibleDockerClient, @@ -131,7 +131,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.errors import ( APIError, DockerException, - NotFound, ) @@ -215,7 +214,7 @@ def has_different_config(self): 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/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume_info.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume_info.py index 100010ba..9345d2e6 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume_info.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/modules/docker_volume_info.py @@ -63,7 +63,7 @@ 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/openshift/release/ansible/ansible_collections/community/docker/plugins/plugin_utils/socket_handler.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/plugin_utils/socket_handler.py index 204996f2..e8fd266c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/plugins/plugin_utils/socket_handler.py +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/plugin_utils/socket_handler.py @@ -6,7 +6,7 @@ __metaclass__ = type -from ansible.compat import selectors +from ansible_collections.community.docker.plugins.module_utils.selectors import selectors from ansible_collections.community.docker.plugins.module_utils.socket_handler import ( DockerSocketHandlerBase, diff --git a/openshift/release/ansible/ansible_collections/community/docker/plugins/plugin_utils/unsafe.py b/openshift/release/ansible/ansible_collections/community/docker/plugins/plugin_utils/unsafe.py new file mode 100644 index 00000000..1eb61bea --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/plugins/plugin_utils/unsafe.py @@ -0,0 +1,41 @@ +# Copyright (c) 2023, 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 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import re + +from ansible.module_utils.six import binary_type, text_type +from ansible.module_utils.common._collections_compat import Mapping, Set +from ansible.module_utils.common.collections import is_sequence +from ansible.utils.unsafe_proxy import ( + AnsibleUnsafe, + wrap_var as _make_unsafe, +) + +_RE_TEMPLATE_CHARS = re.compile(u'[{}]') +_RE_TEMPLATE_CHARS_BYTES = re.compile(b'[{}]') + + +def make_unsafe(value): + if value is None or isinstance(value, AnsibleUnsafe): + return value + + if isinstance(value, Mapping): + return dict((make_unsafe(key), make_unsafe(val)) for key, val in value.items()) + elif isinstance(value, Set): + return set(make_unsafe(elt) for elt in value) + elif is_sequence(value): + return type(value)(make_unsafe(elt) for elt in value) + elif isinstance(value, binary_type): + if _RE_TEMPLATE_CHARS_BYTES.search(value): + value = _make_unsafe(value) + return value + elif isinstance(value, text_type): + if _RE_TEMPLATE_CHARS.search(value): + value = _make_unsafe(value) + return value + + return value diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/ee/roles/docker_plain/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/ee/roles/docker_plain/tasks/main.yml index a8669435..9c2be8a0 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/ee/roles/docker_plain/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/ee/roles/docker_plain/tasks/main.yml @@ -29,4 +29,4 @@ name: "{{ cname_prefix }}-1" state: absent stop_timeout: 1 - force_kill: yes + force_kill: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/galaxy-importer.cfg b/openshift/release/ansible/ansible_collections/community/docker/tests/galaxy-importer.cfg new file mode 100644 index 00000000..5ab20d06 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/requirements.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/requirements.yml similarity index 76% rename from openshift/release/ansible/ansible_collections/community/docker/tests/requirements.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/requirements.yml index fa0ba167..b4c045f4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/requirements.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/requirements.yml @@ -3,10 +3,9 @@ # 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 -integration_tests_dependencies: +collections: - ansible.posix -- community.internal_test_tools - community.crypto - community.general -unit_tests_dependencies: - community.internal_test_tools +- community.library_inventory_filtering_v1 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection/test_connection.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection/test_connection.yml index 157a7821..bb0a9939 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection/test_connection.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection/test_connection.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - hosts: "{{ target_hosts }}" - gather_facts: no + gather_facts: false serial: 1 tasks: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml index e522a51f..0b073884 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/setup.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh index eebbb6a3..5a2a84c3 100755 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/connection_nsenter/runme.sh +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases index 2e1acc0a..d8f457d5 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/aliases +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml index 7f44c871..6b423221 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml index 41edc1e9..8ea59f86 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml +++ b/openshift/release/ansible/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: yes - with_items: "{{ cnames }}" - diff: no - - name: "Make sure all networks are removed" - docker_network: - name: "{{ item }}" - state: absent - force: yes - with_items: "{{ dnetworks }}" - when: docker_py_version is version('1.10.0', '>=') - diff: no + - 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/tests/start-stop.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/tests/start-stop.yml index 93aff8b0..89945071 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/tests/start-stop.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/tests/start-stop.yml @@ -38,7 +38,7 @@ project_name: "{{ pname }}" state: present definition: "{{ test_service | from_yaml }}" - check_mode: yes + check_mode: true register: present_1 - name: Present @@ -60,7 +60,7 @@ project_name: "{{ pname }}" state: present definition: "{{ test_service | from_yaml }}" - check_mode: yes + check_mode: true register: present_4 - name: Present (changed check) @@ -68,7 +68,7 @@ project_name: "{{ pname }}" state: present definition: "{{ test_service_mod | from_yaml }}" - check_mode: yes + check_mode: true register: present_5 - name: Present (changed) @@ -96,7 +96,7 @@ project_name: "{{ pname }}" state: absent definition: "{{ test_service_mod | from_yaml }}" - check_mode: yes + check_mode: true register: absent_1 - name: Absent @@ -118,7 +118,7 @@ project_name: "{{ pname }}" state: absent definition: "{{ test_service_mod | from_yaml }}" - check_mode: yes + check_mode: true register: absent_4 - assert: @@ -138,7 +138,7 @@ state: present definition: "{{ test_service | from_yaml }}" stopped: true - check_mode: yes + check_mode: true register: present_1 - name: Present stopped @@ -163,7 +163,7 @@ state: present definition: "{{ test_service | from_yaml }}" stopped: true - check_mode: yes + check_mode: true register: present_4 - name: Started (check) @@ -171,7 +171,7 @@ project_name: "{{ pname }}" state: present definition: "{{ test_service | from_yaml }}" - check_mode: yes + check_mode: true register: started_1 - name: Started @@ -193,7 +193,7 @@ project_name: "{{ pname }}" state: present definition: "{{ test_service | from_yaml }}" - check_mode: yes + check_mode: true register: started_4 - name: Stopped (check) @@ -202,7 +202,7 @@ state: present definition: "{{ test_service | from_yaml }}" stopped: true - check_mode: yes + check_mode: true register: stopped_1 - name: Stopped diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/meta/main.yml new file mode 100644 index 00000000..aefcf50f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/main.yml new file mode 100644 index 00000000..dbb2ece7 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/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 # +#################################################################### + +# 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: + - name: Show docker compose --help output + 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/run-test.yml new file mode 100644 index 00000000..72a58962 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/definition.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/definition.yml new file mode 100644 index 00000000..4b88edcd --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/definition.yml @@ -0,0 +1,264 @@ +--- +# 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 }}-definition" + cname: "{{ name_prefix }}-container" + test_service: | + services: + {{ cname }}: + image: "{{ docker_test_image_alpine }}" + command: '/bin/sh -c "sleep 10m"' + stop_grace_period: 1s + test_service_mod: | + 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'] }}" + +#################################################################### +## Present ######################################################### +#################################################################### + + - name: Present (check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + check_mode: true + register: present_1_check + + - name: Present + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + register: present_1 + + - name: Present (idempotent check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + check_mode: true + register: present_2_check + + - name: Present (idempotent) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + register: present_2 + + - name: Present (changed check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service_mod | from_yaml }}' + state: present + check_mode: true + register: present_3_check + + - name: Present (changed) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service_mod | from_yaml }}' + 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_name: '{{ pname }}' + definition: '{{ test_service_mod | from_yaml }}' + state: absent + check_mode: true + register: absent_1_check + + - name: Absent + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service_mod | from_yaml }}' + state: absent + register: absent_1 + + - name: Absent (idempotent check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service_mod | from_yaml }}' + state: absent + check_mode: true + register: absent_2_check + + - name: Absent (idempotent) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service_mod | from_yaml }}' + 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: Present stopped (check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: stopped + check_mode: true + register: present_1_check + + - name: Present stopped + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: stopped + register: present_1 + + - name: Present stopped (idempotent check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: stopped + check_mode: true + register: present_2_check + + - name: Present stopped (idempotent) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: stopped + register: present_2 + + - name: Started (check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + check_mode: true + register: present_3_check + + - name: Started + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + register: present_3 + + - name: Started (idempotent check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + check_mode: true + register: present_4_check + + - name: Started (idempotent) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: present + register: present_4 + + - name: Restarted (check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: restarted + check_mode: true + register: present_5_check + + - name: Restarted + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: restarted + register: present_5 + + - name: Stopped (check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: stopped + check_mode: true + register: present_6_check + + - name: Stopped + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: stopped + register: present_6 + + - name: Restarted (check) + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: restarted + check_mode: true + register: present_7_check + + - name: Restarted + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + state: restarted + register: present_7 + + - name: Cleanup + docker_compose_v2: + project_name: '{{ pname }}' + definition: '{{ test_service | from_yaml }}' + 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/pull.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/pull.yml new file mode 100644 index 00000000..47647a9b --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/start-stop.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2/tasks/tests/start-stop.yml new file mode 100644 index 00000000..22dd5e02 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/meta/main.yml new file mode 100644 index 00000000..aefcf50f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/main.yml new file mode 100644 index 00000000..d2c8497b --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/main.yml @@ -0,0 +1,52 @@ +--- +# 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 }}" + +- name: Show images + command: docker images --all --digests + +# Run the tests +- block: + - name: Show docker compose --help output + 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/run-test.yml new file mode 100644 index 00000000..72a58962 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/tests/pull.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_compose_v2_pull/tasks/tests/pull.yml new file mode 100644 index 00000000..27f2637b --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml index 2650229d..9eeb6626 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_config/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_config/tasks/test_docker_config.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_config/tasks/test_docker_config.yml index fae10579..015e8003 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_config/tasks/test_docker_config.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_config/tasks/test_docker_config.yml @@ -22,7 +22,7 @@ - name: Parameter name should be required docker_config: state: present - ignore_errors: yes + ignore_errors: true register: output - name: Assert failure when called with no name @@ -35,7 +35,7 @@ docker_config: name: foo state: present - ignore_errors: yes + ignore_errors: true register: output - name: Assert failure when called with no data @@ -58,7 +58,7 @@ - name: Inspect config command: "docker config inspect {{ config_id }}" register: inspect - ignore_errors: yes + ignore_errors: true - debug: var: inspect @@ -138,7 +138,7 @@ - name: Check that config is removed command: "docker config inspect {{ config_id }}" register: output - ignore_errors: yes + ignore_errors: true - name: Assert config was removed assert: @@ -173,7 +173,7 @@ - name: Inspect config command: "docker config inspect {{ config_id }}" register: inspect - ignore_errors: yes + ignore_errors: true - debug: var: inspect @@ -216,7 +216,7 @@ - name: Check that config is removed command: "docker config inspect {{ original_output.config_id }}" register: output - ignore_errors: yes + ignore_errors: true - name: Assert config was removed assert: @@ -226,7 +226,7 @@ - name: Check that config is removed command: "docker config inspect {{ new_output.config_id }}" register: output - ignore_errors: yes + ignore_errors: true - name: Assert config was removed assert: @@ -263,7 +263,7 @@ data: opensesame! template_driver: "not a template driver" state: present - ignore_errors: yes + ignore_errors: true register: output - name: Assert failure when called with invalid template_driver @@ -320,7 +320,7 @@ - name: Check that config is removed command: "docker config inspect {{ output.config_id }}" register: output - ignore_errors: yes + ignore_errors: true - name: Assert config was removed assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml index f9c1f663..2236bc80 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/main.yml +++ b/openshift/release/ansible/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: yes - with_items: "{{ cnames }}" - diff: no - - 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: yes - with_items: "{{ dnetworks }}" - diff: no + - 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml index 65c25c38..c37a0c4d 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/comparisons.yml @@ -30,7 +30,7 @@ name: "{{ cname }}" state: started hostname: example.org - force_kill: yes + force_kill: true comparisons: hostname: ignore register: value_2 @@ -42,7 +42,7 @@ name: "{{ cname }}" state: started hostname: example.org - force_kill: yes + force_kill: true comparisons: hostname: strict register: value_3 @@ -51,8 +51,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -83,7 +83,7 @@ state: started dns_servers: - 9.9.9.9 - force_kill: yes + force_kill: true comparisons: dns_servers: ignore register: list_2 @@ -96,7 +96,7 @@ state: started dns_servers: - 9.9.9.9 - force_kill: yes + force_kill: true comparisons: dns_servers: strict register: list_3 @@ -105,8 +105,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -139,7 +139,7 @@ - "1010" - "1011" - "1012" - force_kill: yes + force_kill: true comparisons: groups: ignore register: set_2 @@ -154,7 +154,7 @@ - "1010" - "1011" - "1012" - force_kill: yes + force_kill: true comparisons: groups: allow_more_present register: set_3 @@ -168,7 +168,7 @@ groups: - "1010" - "1012" - force_kill: yes + force_kill: true comparisons: groups: allow_more_present register: set_4 @@ -182,7 +182,7 @@ groups: - "1010" - "1012" - force_kill: yes + force_kill: true comparisons: groups: strict register: set_5 @@ -191,8 +191,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -227,7 +227,7 @@ - "/dev/random:/dev/virt-random:rwm" - "/dev/urandom:/dev/virt-urandom:rwm" - "/dev/null:/dev/virt-null:rwm" - force_kill: yes + force_kill: true comparisons: devices: ignore register: set_dict_2 @@ -242,7 +242,7 @@ - "/dev/random:/dev/virt-random:rwm" - "/dev/urandom:/dev/virt-urandom:rwm" - "/dev/null:/dev/virt-null:rwm" - force_kill: yes + force_kill: true comparisons: devices: allow_more_present register: set_dict_3 @@ -256,7 +256,7 @@ devices: - "/dev/random:/dev/virt-random:rwm" - "/dev/null:/dev/virt-null:rwm" - force_kill: yes + force_kill: true comparisons: devices: allow_more_present register: set_dict_4 @@ -270,7 +270,7 @@ devices: - "/dev/random:/dev/virt-random:rwm" - "/dev/null:/dev/virt-null:rwm" - force_kill: yes + force_kill: true comparisons: devices: strict register: set_dict_5 @@ -279,8 +279,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -315,7 +315,7 @@ ansible.test.1: hello ansible.test.2: world ansible.test.3: ansible - force_kill: yes + force_kill: true comparisons: labels: ignore register: dict_2 @@ -330,7 +330,7 @@ ansible.test.1: hello ansible.test.2: world ansible.test.3: ansible - force_kill: yes + force_kill: true comparisons: labels: allow_more_present register: dict_3 @@ -344,7 +344,7 @@ labels: ansible.test.1: hello ansible.test.3: ansible - force_kill: yes + force_kill: true comparisons: labels: allow_more_present register: dict_4 @@ -358,7 +358,7 @@ labels: ansible.test.1: hello ansible.test.3: ansible - force_kill: yes + force_kill: true comparisons: labels: strict register: dict_5 @@ -367,8 +367,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -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: @@ -413,7 +412,7 @@ labels: ansible.test.1: hello ansible.test.4: ignore - force_kill: yes + force_kill: true comparisons: '*': ignore register: wildcard_2 @@ -430,7 +429,7 @@ ansible.test.1: hello ansible.test.2: world ansible.test.3: ansible - force_kill: yes + force_kill: true comparisons: '*': strict register: wildcard_3 @@ -447,7 +446,7 @@ ansible.test.1: hello ansible.test.2: world ansible.test.3: ansible - force_kill: yes + force_kill: true comparisons: '*': strict register: wildcard_4 @@ -456,8 +455,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/compatibility.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/compatibility.yml index 2ec90965..265aacac 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/compatibility.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/compatibility.yml @@ -21,7 +21,7 @@ command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: compatibility - check_mode: yes + check_mode: true register: start_1 - name: Start container @@ -48,15 +48,15 @@ image: "{{ docker_test_image_alpine }}" state: started container_default_behavior: compatibility - check_mode: yes + check_mode: true register: start_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -76,7 +76,7 @@ command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: no_defaults - check_mode: yes + check_mode: true register: start_1 - name: Start container @@ -104,15 +104,15 @@ command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: no_defaults - check_mode: yes + check_mode: true register: start_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml index d355c6a5..4dfdb02a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/image-ids.yml +++ b/openshift/release/ansible/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 }}" @@ -40,7 +39,7 @@ image: "{{ image_info.images[0].Id }}" name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: create_1 - name: Create container with {{ docker_test_image_hello_world }} image via ID (idempotent) @@ -48,7 +47,7 @@ image: "{{ image_info.images[0].Id }}" name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: create_2 - name: Create container with {{ docker_test_image_alpine }} image via ID @@ -56,7 +55,7 @@ image: "{{ image_info.images[1].Id }}" name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: create_3 - name: Create container with {{ docker_test_image_alpine }} image via ID (idempotent) @@ -64,15 +63,14 @@ image: "{{ image_info.images[1].Id }}" name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: create_4 - 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: yes - state: absent + force: true - name: Create container with {{ docker_test_image_alpine }} image via name (check mode, will pull, same image) docker_container: @@ -80,7 +78,7 @@ name: "{{ cname }}" state: present register: create_5 - check_mode: yes + check_mode: true - name: Create container with {{ docker_test_image_alpine }} image via name (will pull, same image) docker_container: @@ -93,8 +91,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -112,7 +110,7 @@ image: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}" name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: digest_1 - name: Create container with {{ docker_test_image_digest_base }} image via old digest (idempotent) @@ -120,16 +118,16 @@ image: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}" name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: digest_2 - name: Create container with {{ docker_test_image_digest_base }} image via old digest (idempotent, pull) docker_container: image: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}" name: "{{ cname }}" - pull: yes + pull: true state: present - force_kill: yes + force_kill: true register: digest_3 - name: Update container with {{ docker_test_image_digest_base }} image via new digest @@ -137,15 +135,15 @@ image: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v2 }}" name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: digest_4 - name: Cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml index cdfbf2ec..3ce6691a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml @@ -35,7 +35,7 @@ - source: / target: /whatever type: bind - read_only: no + read_only: false register: mounts_1 - name: mounts (idempotency) @@ -48,7 +48,7 @@ - source: / target: /whatever type: bind - read_only: no + read_only: false - source: /tmp target: /tmp type: bind @@ -79,8 +79,8 @@ - source: /tmp target: /somewhereelse type: bind - read_only: yes - force_kill: yes + read_only: true + force_kill: true register: mounts_4 - name: mounts (different modes) @@ -96,8 +96,8 @@ - source: /tmp target: /somewhereelse type: bind - read_only: no - force_kill: yes + read_only: false + force_kill: true register: mounts_5 - name: mounts (endpoint collision) @@ -113,10 +113,10 @@ - source: /etc target: /x type: bind - read_only: no - force_kill: yes + read_only: false + force_kill: true register: mounts_6 - ignore_errors: yes + ignore_errors: true - name: mounts (anonymous volume) docker_container: @@ -146,8 +146,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -161,6 +161,111 @@ - mounts_7 is changed - mounts_8 is not changed +#################################################################### +## tmpfs ########################################################### +#################################################################### + +- name: tmpfs + docker_container: + image: "{{ docker_test_image_alpine }}" + command: '/bin/sh -c "sleep 10m"' + name: "{{ cname }}" + state: started + mounts: + - target: /cache1 + type: tmpfs + tmpfs_mode: "1777" + tmpfs_size: "1GB" + - target: /cache2 + type: tmpfs + tmpfs_mode: "1777" + tmpfs_size: "1GB" + force_kill: true + register: tmpfs_1 + +- name: tmpfs (idempotency) + docker_container: + image: "{{ docker_test_image_alpine }}" + command: '/bin/sh -c "sleep 10m"' + name: "{{ cname }}" + state: started + mounts: + - target: /cache2 + type: tmpfs + tmpfs_mode: "1777" + tmpfs_size: "1GB" + - target: /cache1 + type: tmpfs + tmpfs_mode: "1777" + tmpfs_size: "1GB" + force_kill: true + register: tmpfs_2 + +- name: tmpfs (more mounts) + docker_container: + image: "{{ docker_test_image_alpine }}" + command: '/bin/sh -c "sleep 10m"' + name: "{{ cname }}" + state: started + mounts: + - target: /cache1 + type: tmpfs + tmpfs_mode: "1777" + tmpfs_size: "1GB" + - target: /cache2 + type: tmpfs + tmpfs_mode: "1777" + tmpfs_size: "1GB" + - target: /cache3 + type: tmpfs + tmpfs_mode: "1777" + tmpfs_size: "1GB" + force_kill: true + register: tmpfs_3 + +- name: tmpfs (change mode) + docker_container: + image: "{{ docker_test_image_alpine }}" + command: '/bin/sh -c "sleep 10m"' + name: "{{ cname }}" + state: started + mounts: + - target: /cache1 + type: tmpfs + tmpfs_mode: "1700" + tmpfs_size: "1GB" + force_kill: true + register: tmpfs_4 + +- name: tmpfs (change size) + docker_container: + image: "{{ docker_test_image_alpine }}" + command: '/bin/sh -c "sleep 10m"' + name: "{{ cname }}" + state: started + mounts: + - target: /cache1 + type: tmpfs + tmpfs_mode: "1700" + tmpfs_size: "2GB" + force_kill: true + register: tmpfs_5 + +- name: cleanup + docker_container: + name: "{{ cname }}" + state: absent + force_kill: true + diff: false + +- assert: + that: + - tmpfs_1 is changed + - tmpfs_2 is not changed + - tmpfs_3 is changed + - tmpfs_4 is changed + - tmpfs_5 is changed + #################################################################### ## mounts + volumes ################################################ #################################################################### @@ -175,7 +280,7 @@ - source: / target: /whatever type: bind - read_only: yes + read_only: true volumes: - /tmp:/tmp register: mounts_volumes_1 @@ -190,7 +295,7 @@ - source: / target: /whatever type: bind - read_only: yes + read_only: true volumes: - /tmp:/tmp register: mounts_volumes_2 @@ -205,10 +310,10 @@ - source: /tmp target: /tmp type: bind - read_only: no + read_only: false volumes: - /:/whatever:ro - force_kill: yes + force_kill: true register: mounts_volumes_3 - name: mounts + volumes (collision, should fail) @@ -221,19 +326,19 @@ - source: /tmp target: /tmp type: bind - read_only: no + read_only: false volumes: - /tmp:/tmp - force_kill: yes + force_kill: true register: mounts_volumes_4 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -272,15 +377,15 @@ name: "{{ cname }}" volume_driver: / state: started - force_kill: yes + force_kill: true register: volume_driver_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -335,7 +440,7 @@ volumes: - "/tmp:/tmp" - "/tmp:/somewhereelse:ro,Z" - force_kill: yes + force_kill: true register: volumes_4 - name: volumes (different modes) @@ -347,7 +452,7 @@ volumes: - "/tmp:/tmp" - "/tmp:/somewhereelse:ro" - force_kill: yes + force_kill: true register: volumes_5 - name: volumes (collision) @@ -359,16 +464,16 @@ volumes: - "/etc:/tmp" - "/home:/tmp:ro" - force_kill: yes + force_kill: true register: volumes_6 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -426,21 +531,21 @@ name: "{{ cname }}" state: started volumes_from: "{{ cname_h2 }}" - force_kill: yes + force_kill: true register: volumes_from_3 - name: cleanup docker_container: name: "{{ container_name }}" state: absent - force_kill: yes + force_kill: true loop: - "{{ cname }}" - "{{ cname_h1 }}" - "{{ cname_h2 }}" loop_control: loop_var: container_name - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/network.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/network.yml index adab728f..d6a6f0bc 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/network.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/network.yml @@ -55,7 +55,7 @@ - name: Create network with fixed IPv4 and IPv6 subnets docker_network: name: "{{ nname_3 }}" - enable_ipv6: yes + enable_ipv6: true ipam_config: - subnet: "{{ subnet_ipv4 }}" - subnet: "{{ subnet_ipv6 }}" @@ -90,7 +90,7 @@ name: "{{ cname }}" state: started network_mode: none - force_kill: yes + force_kill: true register: network_mode_3 - name: network_mode (container mode setup) @@ -108,7 +108,7 @@ name: "{{ cname }}" state: started network_mode: "container:{{ cname_h1_id.container.Id }}" - force_kill: yes + force_kill: true register: network_mode_4 - name: network_mode (container mode idempotency) @@ -124,13 +124,13 @@ docker_container: name: "{{ container_name }}" state: absent - force_kill: yes + force_kill: true loop: - "{{ cname }}" - "{{ cname_h1 }}" loop_control: loop_var: container_name - diff: no + diff: false - assert: that: @@ -158,7 +158,7 @@ networks: - name: "{{ nname_1 }}" - name: "{{ nname_2 }}" - networks_cli_compatible: no + networks_cli_compatible: false register: networks_1 - name: networks_cli_compatible=no, networks w/o purge_networks @@ -170,7 +170,7 @@ networks: - name: "{{ nname_1 }}" - name: "{{ nname_2 }}" - networks_cli_compatible: no + networks_cli_compatible: false register: networks_2 - name: networks_cli_compatible=no, networks, purge_networks @@ -184,8 +184,8 @@ networks: - name: bridge - name: "{{ nname_1 }}" - networks_cli_compatible: no - force_kill: yes + networks_cli_compatible: false + force_kill: true register: networks_3 - name: networks_cli_compatible=no, networks, purge_networks (idempotency) @@ -199,7 +199,7 @@ networks: - name: "{{ nname_1 }}" - name: bridge - networks_cli_compatible: no + networks_cli_compatible: false register: networks_4 - name: networks_cli_compatible=no, networks (less networks) @@ -210,7 +210,7 @@ state: started networks: - name: bridge - networks_cli_compatible: no + networks_cli_compatible: false register: networks_5 - name: networks_cli_compatible=no, networks, purge_networks (less networks) @@ -223,8 +223,8 @@ networks: strict networks: - name: bridge - networks_cli_compatible: no - force_kill: yes + networks_cli_compatible: false + force_kill: true register: networks_6 - name: networks_cli_compatible=no, networks, purge_networks (more networks) @@ -238,16 +238,16 @@ networks: - name: bridge - name: "{{ nname_2 }}" - networks_cli_compatible: no - force_kill: yes + networks_cli_compatible: false + force_kill: true register: networks_7 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -304,7 +304,7 @@ - alias1 - alias2 - name: "{{ nname_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_1 - name: networks_cli_compatible=yes, networks specified @@ -316,15 +316,15 @@ networks: - name: "{{ nname_1 }}" - name: "{{ nname_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_2 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - name: networks_cli_compatible=yes, empty networks list specified docker_container: @@ -333,7 +333,7 @@ name: "{{ cname }}" state: started networks: [] - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_3 - name: networks_cli_compatible=yes, empty networks list specified @@ -343,7 +343,7 @@ name: "{{ cname }}" state: started networks: [] - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_4 - name: networks_cli_compatible=yes, empty networks list specified, purge_networks @@ -353,18 +353,18 @@ name: "{{ cname }}" state: started networks: [] - networks_cli_compatible: yes + networks_cli_compatible: true comparisons: networks: strict - force_kill: yes + force_kill: true register: networks_5 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - name: networks_cli_compatible=yes, networks not specified docker_container: @@ -372,8 +372,8 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started - networks_cli_compatible: yes - force_kill: yes + networks_cli_compatible: true + force_kill: true register: networks_6 - name: networks_cli_compatible=yes, networks not specified @@ -382,7 +382,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_7 - name: networks_cli_compatible=yes, networks not specified, purge_networks @@ -391,21 +391,21 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started - networks_cli_compatible: yes + networks_cli_compatible: true purge_networks: true # To replace `purge_networks=true`, we have to specify `networks: []`: # comparisons: # networks: strict # networks: [] - force_kill: yes + force_kill: true register: networks_8 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - debug: var=networks_3 @@ -456,7 +456,7 @@ state: started networks: - name: "{{ nname_1 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_1 - name: different networks, comparisons=ignore @@ -467,7 +467,7 @@ state: started networks: - name: "{{ nname_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true comparisons: network_mode: ignore # otherwise we'd have to set network_mode to nname_1 networks: ignore @@ -480,7 +480,7 @@ name: "{{ cname }}" state: started networks: [] - networks_cli_compatible: yes + networks_cli_compatible: true comparisons: networks: ignore register: networks_3 @@ -492,7 +492,7 @@ name: "{{ cname }}" state: started networks: [] - networks_cli_compatible: yes + networks_cli_compatible: true comparisons: networks: allow_more_present register: networks_4 @@ -505,11 +505,11 @@ state: started networks: - name: "{{ nname_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true comparisons: network_mode: ignore # otherwise we'd have to set network_mode to nname_1 networks: allow_more_present - force_kill: yes + force_kill: true register: networks_5 - name: different networks, comparisons=strict @@ -520,10 +520,10 @@ state: started networks: - name: "{{ nname_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true comparisons: networks: strict - force_kill: yes + force_kill: true register: networks_6 - name: less networks, comparisons=strict @@ -533,18 +533,18 @@ name: "{{ cname }}" state: started networks: [] - networks_cli_compatible: yes + networks_cli_compatible: true comparisons: networks: strict - force_kill: yes + force_kill: true register: networks_7 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -591,7 +591,7 @@ - name: "{{ nname_3 }}" ipv4_address: "{{ nname_3_ipv4_2 }}" ipv6_address: "{{ nname_3_ipv6_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_1 - name: create container (stopped) with one network and fixed IP (idempotent) @@ -604,7 +604,7 @@ - name: "{{ nname_3 }}" ipv4_address: "{{ nname_3_ipv4_2 }}" ipv6_address: "{{ nname_3_ipv6_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_2 - name: create container (stopped) with one network and fixed IP (different IPv4) @@ -617,7 +617,7 @@ - name: "{{ nname_3 }}" ipv4_address: "{{ nname_3_ipv4_3 }}" ipv6_address: "{{ nname_3_ipv6_2 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_3 - name: create container (stopped) with one network and fixed IP (different IPv6) @@ -630,7 +630,7 @@ - name: "{{ nname_3 }}" ipv4_address: "{{ nname_3_ipv4_3 }}" ipv6_address: "{{ nname_3_ipv6_3 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_4 - name: create container (started) with one network and fixed IP @@ -649,8 +649,8 @@ - name: "{{ nname_3 }}" ipv4_address: "{{ nname_3_ipv4_4 }}" ipv6_address: "{{ nname_3_ipv6_3 }}" - networks_cli_compatible: yes - force_kill: yes + networks_cli_compatible: true + force_kill: true register: networks_6 - name: create container (started) with one network and fixed IP (different IPv6) @@ -663,8 +663,8 @@ - name: "{{ nname_3 }}" ipv4_address: "{{ nname_3_ipv4_4 }}" ipv6_address: "{{ nname_3_ipv6_4 }}" - networks_cli_compatible: yes - force_kill: yes + networks_cli_compatible: true + force_kill: true register: networks_7 - name: create container (started) with one network and fixed IP (idempotent) @@ -677,15 +677,15 @@ - name: "{{ nname_3 }}" ipv4_address: "{{ nname_3_ipv4_4 }}" ipv6_address: "{{ nname_3_ipv6_4 }}" - networks_cli_compatible: yes + networks_cli_compatible: true register: networks_8 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -738,7 +738,7 @@ docker_network: name: "{{ network_name }}" state: absent - force: yes + force: true loop: - "{{ nname_1 }}" - "{{ nname_2 }}" diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml index 2e543724..845c7897 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/options.yml @@ -23,7 +23,7 @@ command: '/bin/sh -c "echo"' name: "{{ cname }}" state: started - auto_remove: yes + auto_remove: true register: auto_remove_1 - name: Give container 1 second to be sure it terminated @@ -72,7 +72,7 @@ name: "{{ cname }}" state: started blkio_weight: 234 - force_kill: yes + force_kill: true register: blkio_weight_3 ignore_errors: true @@ -80,8 +80,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - when: blkio_weight_1 is failed assert: @@ -146,15 +146,15 @@ - setgid cap_drop: - all - force_kill: yes + force_kill: true register: capabilities_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -175,7 +175,7 @@ state: started cgroupns_mode: host register: cgroupns_mode_1 - ignore_errors: yes + ignore_errors: true - name: cgroupns_mode (idempotency) docker_container: @@ -185,7 +185,7 @@ state: started cgroupns_mode: host register: cgroupns_mode_2 - ignore_errors: yes + ignore_errors: true - name: cgroupns_mode (changed) docker_container: @@ -195,14 +195,14 @@ state: started cgroupns_mode: private register: cgroupns_mode_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -251,8 +251,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -303,7 +303,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: command_4 - name: command (compatibility, empty list) @@ -313,15 +313,15 @@ command: [] name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: command_5 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -371,7 +371,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: command_4 - name: command (correct, empty list) @@ -381,15 +381,15 @@ command: [] name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: command_5 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -428,15 +428,15 @@ name: "{{ cname }}" cpu_period: 50000 state: started - force_kill: yes + force_kill: true register: cpu_period_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -473,15 +473,15 @@ name: "{{ cname }}" cpu_quota: 50000 state: started - force_kill: yes + force_kill: true register: cpu_quota_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -518,15 +518,15 @@ name: "{{ cname }}" cpu_shares: 1100 state: started - force_kill: yes + force_kill: true register: cpu_shares_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -563,18 +563,18 @@ name: "{{ cname }}" cpuset_cpus: "1" state: started - force_kill: yes + force_kill: true # This will fail if the system the test is run on doesn't have # multiple CPUs/cores available. - ignore_errors: yes + ignore_errors: true register: cpuset_cpus_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -611,18 +611,18 @@ name: "{{ cname }}" cpuset_mems: "1" state: started - force_kill: yes + force_kill: true # This will fail if the system the test is run on doesn't have # multiple MEMs available. - ignore_errors: yes + ignore_errors: true register: cpuset_mems_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -659,7 +659,7 @@ name: "{{ cname }}" cpus: 1.5 state: started - force_kill: yes + force_kill: true # This will fail if the system the test is run on doesn't have # multiple MEMs available. register: cpus_3 @@ -668,8 +668,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -687,14 +687,14 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present - debug: yes + debug: true register: debug_1 - name: debug (start) docker_container: name: "{{ cname }}" state: started - debug: yes + debug: true register: debug_2 - name: debug (stop) @@ -702,16 +702,16 @@ image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: stopped - force_kill: yes - debug: yes + force_kill: true + debug: true register: debug_3 - name: debug (absent) docker_container: name: "{{ cname }}" state: absent - debug: yes - force_kill: yes + debug: true + force_kill: true register: debug_4 - assert: @@ -729,7 +729,7 @@ docker_container: name: "{{ cname }}" image: "{{ docker_test_image_hello_world }}" - detach: no + detach: false register: detach_no_cleanup - name: cleanup @@ -737,14 +737,14 @@ name: "{{ cname }}" state: absent register: detach_no_cleanup_cleanup - diff: no + diff: false - name: detach with cleanup docker_container: name: "{{ cname }}" image: "{{ docker_test_image_hello_world }}" - detach: no - cleanup: yes + detach: false + cleanup: true register: detach_cleanup - name: cleanup (unnecessary) @@ -752,32 +752,32 @@ name: "{{ cname }}" state: absent register: detach_cleanup_cleanup - diff: no + diff: false - name: detach with auto_remove and cleanup docker_container: name: "{{ cname }}" image: "{{ docker_test_image_hello_world }}" - detach: no - auto_remove: yes - cleanup: yes + detach: false + auto_remove: true + cleanup: true register: detach_auto_remove - ignore_errors: yes + ignore_errors: true - name: cleanup (unnecessary) docker_container: name: "{{ cname }}" state: absent register: detach_auto_remove_cleanup - diff: no + diff: false - name: detach with cleanup and non-zero status docker_container: name: "{{ cname }}" image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "exit 42"' - detach: no - cleanup: yes + detach: false + cleanup: true register: detach_cleanup_nonzero ignore_errors: true @@ -847,15 +847,15 @@ devices: - "/dev/random:/dev/virt-random:rwm" - "/dev/null:/dev/virt-null:rwm" - force_kill: yes + force_kill: true register: devices_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -919,7 +919,7 @@ rate: 10M - path: /dev/urandom rate: 5K - force_kill: yes + force_kill: true register: device_read_bps_4 ignore_errors: true @@ -927,8 +927,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - when: device_read_bps_1 is not failed assert: @@ -1002,7 +1002,7 @@ rate: 30 - path: /dev/urandom rate: 50 - force_kill: yes + force_kill: true register: device_read_iops_4 ignore_errors: true @@ -1010,8 +1010,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - when: device_read_iops_1 is not failed assert: @@ -1076,7 +1076,7 @@ device_write_iops: - path: /dev/urandom rate: 100 - force_kill: yes + force_kill: true register: device_write_limit_3 ignore_errors: true @@ -1084,8 +1084,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - when: device_write_limit_1 is not failed assert: @@ -1112,7 +1112,7 @@ state: started device_requests: [] register: device_requests_1 - ignore_errors: yes + ignore_errors: true - name: device_requests (idempotency) docker_container: @@ -1122,14 +1122,14 @@ state: started device_requests: [] register: device_requests_2 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1188,15 +1188,15 @@ dns_opts: - "timeout:10" - no-check-names - force_kill: yes + force_kill: true register: dns_opts_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1240,7 +1240,7 @@ dns_search_domains: - example.org - example.com - force_kill: yes + force_kill: true register: dns_search_domains_3 - name: dns_search_domains (changed elements) @@ -1252,15 +1252,15 @@ dns_search_domains: - ansible.com - example.com - force_kill: yes + force_kill: true register: dns_search_domains_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1304,7 +1304,7 @@ dns_servers: - 8.8.8.8 - 1.1.1.1 - force_kill: yes + force_kill: true register: dns_servers_3 - name: dns_servers (changed elements) @@ -1316,15 +1316,15 @@ dns_servers: - 8.8.8.8 - 9.9.9.9 - force_kill: yes + force_kill: true register: dns_servers_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1362,15 +1362,15 @@ name: "{{ cname }}" domainname: example.org state: started - force_kill: yes + force_kill: true register: domainname_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1421,7 +1421,7 @@ - "-v" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_3 - name: entrypoint (compatibility, fewer parameters) @@ -1434,7 +1434,7 @@ - "'sleep 10m'" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_4 - name: entrypoint (compatibility, other parameters) @@ -1447,7 +1447,7 @@ - "'sleep 5m'" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_5 - name: entrypoint (compatibility, force empty) @@ -1457,15 +1457,15 @@ entrypoint: [] name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_6 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1515,7 +1515,7 @@ - "-v" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_3 - name: entrypoint (correct, fewer parameters) @@ -1528,7 +1528,7 @@ - "sleep 10m" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_4 - name: entrypoint (correct, other parameters) @@ -1541,7 +1541,7 @@ - "sleep 5m" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_5 - name: entrypoint (correct, force empty) @@ -1551,15 +1551,15 @@ entrypoint: [] name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: entrypoint_6 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1621,7 +1621,7 @@ env: TEST1: val1 TEST3: val3 - force_kill: yes + force_kill: true register: env_4 - name: env (fail unwrapped values) @@ -1632,16 +1632,16 @@ state: started env: TEST1: true - force_kill: yes + force_kill: true register: env_5 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1708,7 +1708,7 @@ env: TEST1: val1 TEST3: val3 - force_kill: yes + force_kill: true register: env_file_4 - name: env_file (with env, idempotent) @@ -1732,15 +1732,15 @@ env: TEST2: val2 TEST4: val4alt - force_kill: yes + force_kill: true register: env_file_6 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1804,15 +1804,15 @@ etc_hosts: example.com: 1.2.3.4 example.us: 1.2.3.5 - force_kill: yes + force_kill: true register: etc_hosts_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1866,15 +1866,15 @@ exposed_ports: - "9002" - "9003" - force_kill: yes + force_kill: true register: exposed_ports_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1934,15 +1934,15 @@ groups: - "1234" - "2345" - force_kill: yes + force_kill: true register: groups_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -1969,7 +1969,7 @@ timeout: 2s interval: 0h0m2s3ms4us retries: 2 - force_kill: yes + force_kill: true register: healthcheck_1 - name: healthcheck (idempotency) @@ -1986,7 +1986,7 @@ timeout: 2s interval: 0h0m2s3ms4us retries: 2 - force_kill: yes + force_kill: true register: healthcheck_2 - name: healthcheck (changed) @@ -2003,7 +2003,7 @@ timeout: 3s interval: 0h1m2s3ms4us retries: 3 - force_kill: yes + force_kill: true register: healthcheck_3 - name: healthcheck (no change) @@ -2012,7 +2012,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: healthcheck_4 - name: healthcheck (disabled) @@ -2024,7 +2024,7 @@ healthcheck: test: - NONE - force_kill: yes + force_kill: true register: healthcheck_5 - name: healthcheck (disabled, idempotency) @@ -2036,7 +2036,7 @@ healthcheck: test: - NONE - force_kill: yes + force_kill: true register: healthcheck_6 - name: healthcheck (disabled, idempotency, strict) @@ -2048,7 +2048,7 @@ healthcheck: test: - NONE - force_kill: yes + force_kill: true comparisons: '*': strict register: healthcheck_7 @@ -2061,7 +2061,7 @@ state: started healthcheck: test: "sleep 1" - force_kill: yes + force_kill: true register: healthcheck_8 - name: healthcheck (string in healthcheck test, idempotency) @@ -2072,15 +2072,15 @@ state: started healthcheck: test: "sleep 1" - force_kill: yes + force_kill: true register: healthcheck_9 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -2123,15 +2123,15 @@ name: "{{ cname }}" hostname: me.example.org state: started - force_kill: yes + force_kill: true register: hostname_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -2148,7 +2148,7 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - init: yes + init: true state: started register: init_1 @@ -2157,7 +2157,7 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - init: yes + init: true state: started register: init_2 @@ -2166,17 +2166,17 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - init: no + init: false state: started - force_kill: yes + force_kill: true register: init_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -2193,7 +2193,7 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - interactive: yes + interactive: true state: started register: interactive_1 @@ -2202,7 +2202,7 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - interactive: yes + interactive: true state: started register: interactive_2 @@ -2211,17 +2211,17 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - interactive: no + interactive: false state: started - force_kill: yes + force_kill: true register: interactive_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -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 }}" @@ -2288,7 +2287,7 @@ image_comparison: desired-image name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: ignore_image_3 diff: true @@ -2297,7 +2296,7 @@ image: "{{ docker_test_image_hello_world }}" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: image_change diff: true @@ -2305,8 +2304,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -2379,7 +2378,7 @@ labels: img_label: override state: started - force_kill: yes + force_kill: true register: image_label_mismatch_5 - name: image_label_mismatch (ignore,remove img label) @@ -2390,7 +2389,7 @@ image_label_mismatch: ignore labels: {} state: started - force_kill: yes + force_kill: true register: image_label_mismatch_6 - name: image_label_mismatch (fail,unmanaged labels) @@ -2422,7 +2421,7 @@ labels: strict labels: {} state: started - ignore_errors: yes + ignore_errors: true register: image_label_mismatch_9 - name: image_label_mismatch (fail,match img label) @@ -2445,21 +2444,20 @@ labels: img_label: override state: started - force_kill: yes + force_kill: true register: image_label_mismatch_11 - name: cleanup container docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - name: cleanup image - docker_image: + docker_image_remove: name: "{{ iname_labels }}" - state: absent - diff: no + diff: false - assert: that: @@ -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 }}" @@ -2513,7 +2510,7 @@ - name: ignore_image docker_container: image: "{{ docker_test_image_hello_world }}" - ignore_image: yes + ignore_image: true name: "{{ cname }}" state: started register: ignore_image @@ -2522,7 +2519,7 @@ - name: ignore_image (labels and env differ in image, image_comparison=current-image) docker_container: image: "{{ docker_test_image_registry_nginx }}" - ignore_image: yes + ignore_image: true image_comparison: current-image name: "{{ cname }}" state: started @@ -2532,11 +2529,11 @@ - name: ignore_image (labels and env differ in image, image_comparison=desired-image) docker_container: image: "{{ docker_test_image_registry_nginx }}" - ignore_image: yes + ignore_image: true image_comparison: desired-image name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: ignore_image_3 diff: true @@ -2545,7 +2542,7 @@ image: "{{ docker_test_image_hello_world }}" name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: image_change diff: true @@ -2553,8 +2550,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -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 @@ -2606,21 +2602,20 @@ name: "{{ cname }}" image_name_mismatch: recreate state: started - force_kill: yes + force_kill: true register: image_name_mismatch_3 - name: Cleanup container docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - name: Cleanup image - docker_image: + docker_image_remove: name: "{{ iname_name_mismatch }}" - state: absent - diff: no + diff: false - assert: that: @@ -2672,20 +2667,20 @@ name: "{{ cname }}" state: started ipc_mode: private - force_kill: yes + force_kill: true register: ipc_mode_3 - name: cleanup docker_container: name: "{{ container_name }}" state: absent - force_kill: yes + force_kill: true loop: - "{{ cname }}" - "{{ cname_h1 }}" loop_control: loop_var: container_name - diff: no + diff: false - assert: that: @@ -2705,7 +2700,7 @@ kernel_memory: 8M state: started register: kernel_memory_1 - ignore_errors: yes + ignore_errors: true - name: kernel_memory (idempotency) docker_container: @@ -2715,7 +2710,7 @@ kernel_memory: 8M state: started register: kernel_memory_2 - ignore_errors: yes + ignore_errors: true - name: kernel_memory (change) docker_container: @@ -2724,16 +2719,16 @@ name: "{{ cname }}" kernel_memory: 6M state: started - force_kill: yes + force_kill: true register: kernel_memory_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -2743,6 +2738,8 @@ when: - kernel_memory_1 is not failed or 'kernel memory accounting disabled in this runc build' not in kernel_memory_1.msg - "'Docker warning: Specifying a kernel memory limit is deprecated and will be removed in a future release.' not in (kernel_memory_1.warnings | default([]))" + # API version 1.42 seems to remove the kernel memory option completely + - "'KernelMemory' in kernel_memory_1.container.HostConfig or docker_api_version is version('1.42', '<')" #################################################################### ## kill_signal ##################################################### @@ -2795,15 +2792,15 @@ labels: ansible.test.1: hello ansible.test.3: ansible - force_kill: yes + force_kill: true register: labels_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -2870,14 +2867,14 @@ links: - "{{ cname_h1 }}:test1" - "{{ cname_h3 }}:test3" - force_kill: yes + force_kill: true register: links_4 - name: cleanup docker_container: name: "{{ container_name }}" state: absent - force_kill: yes + force_kill: true loop: - "{{ cname }}" - "{{ cname_h1 }}" @@ -2885,7 +2882,7 @@ - "{{ cname_h3 }}" loop_control: loop_var: container_name - diff: no + diff: false - assert: that: @@ -2923,15 +2920,15 @@ name: "{{ cname }}" state: started log_driver: syslog - force_kill: yes + force_kill: true register: log_driver_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -2990,15 +2987,15 @@ log_options: labels: production_status max-size: 10m - force_kill: yes + force_kill: true register: log_options_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3013,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: yes - register: mac_address_3 - -- name: cleanup - docker_container: - name: "{{ cname }}" - state: absent - force_kill: yes - diff: no - -- 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 ########################################################## @@ -3083,15 +3082,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" memory: 48M state: started - force_kill: yes + force_kill: true register: memory_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3128,15 +3127,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" memory_reservation: 48M state: started - force_kill: yes + force_kill: true register: memory_reservation_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3157,7 +3156,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau memory: 32M memory_swap: 64M state: started - debug: yes + debug: true register: memory_swap_1 - name: memory_swap (idempotency) @@ -3169,7 +3168,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau memory: 32M memory_swap: 64M state: started - debug: yes + debug: true register: memory_swap_2 - name: memory_swap (change) @@ -3181,8 +3180,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau memory: 32M memory_swap: 48M state: started - force_kill: yes - debug: yes + force_kill: true + debug: true register: memory_swap_3 - name: memory_swap (unlimited) @@ -3194,8 +3193,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau memory: 32M memory_swap: unlimited state: started - force_kill: yes - debug: yes + force_kill: true + debug: true register: memory_swap_4 - name: memory_swap (unlimited via -1) @@ -3207,16 +3206,16 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau memory: 32M memory_swap: -1 state: started - force_kill: yes - debug: yes + force_kill: true + debug: true register: memory_swap_5 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3267,15 +3266,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" memory_swappiness: 60 state: started - force_kill: yes + force_kill: true register: memory_swappiness_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3293,7 +3292,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - oom_killer: yes + oom_killer: true state: started register: oom_killer_1 @@ -3302,7 +3301,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - oom_killer: yes + oom_killer: true state: started register: oom_killer_2 @@ -3311,17 +3310,17 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - oom_killer: no + oom_killer: false state: started - force_kill: yes + force_kill: true register: oom_killer_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3359,15 +3358,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" oom_score_adj: 7 state: started - force_kill: yes + force_kill: true register: oom_score_adj_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3392,8 +3391,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau command: "/bin/sh -c 'sleep 10m'" name: "{{ cname }}" state: started - paused: yes - force_kill: yes + paused: true + force_kill: true register: paused_1 - name: inspect paused @@ -3406,8 +3405,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau command: "/bin/sh -c 'sleep 10m'" name: "{{ cname }}" state: started - paused: yes - force_kill: yes + paused: true + force_kill: true register: paused_3 - name: paused (continue) @@ -3416,8 +3415,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau command: "/bin/sh -c 'sleep 10m'" name: "{{ cname }}" state: started - paused: no - force_kill: yes + paused: false + force_kill: true register: paused_4 - name: inspect paused @@ -3428,8 +3427,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3476,20 +3475,20 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" state: started pid_mode: host - force_kill: yes + force_kill: true register: pid_mode_3 - name: cleanup docker_container: name: "{{ container_name }}" state: absent - force_kill: yes + force_kill: true loop: - "{{ cname }}" - "{{ cname_h1 }}" loop_control: loop_var: container_name - diff: no + diff: false - assert: that: @@ -3526,15 +3525,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" state: started pids_limit: 20 - force_kill: yes + force_kill: true register: pids_limit_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3547,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: @@ -3560,18 +3558,39 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau platform: linux/amd64 debug: true register: platform_1 - ignore_errors: yes + 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: yes + 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: @@ -3580,26 +3599,41 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau state: present pull: true platform: linux/386 - force_kill: yes + force_kill: true debug: true comparisons: # Do not restart because of the changed image ID image: ignore - register: platform_3 - ignore_errors: yes + 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 docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: 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: @@ -3608,6 +3642,149 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau ('API version is ' ~ docker_api_version ~ '.') in platform_1.msg and 'Minimum version required is 1.41 ' in platform_1.msg 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 ###################################################### #################################################################### @@ -3617,7 +3794,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - privileged: yes + privileged: true state: started register: privileged_1 @@ -3626,7 +3803,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - privileged: yes + privileged: true state: started register: privileged_2 @@ -3635,17 +3812,17 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - privileged: no + privileged: false state: started - force_kill: yes + force_kill: true register: privileged_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3698,7 +3875,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau published_ports: - '9002' - '9003' - force_kill: yes + force_kill: true register: published_ports_4 - name: published_ports (ports with IP addresses) @@ -3711,7 +3888,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau - '127.0.0.1:9002:9002/tcp' - '[::1]:9003:9003/tcp' - '[fe80::1%test]:90:90/tcp' - force_kill: yes + force_kill: true register: published_ports_5 - name: published_ports (ports with IP addresses, idempotent) @@ -3735,7 +3912,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau published_ports: [] comparisons: published_ports: strict - force_kill: yes + force_kill: true register: published_ports_7 - name: published_ports (default_host_ip not set) @@ -3747,7 +3924,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau published_ports: - '9001' - '9002' - force_kill: yes + force_kill: true register: published_ports_8 - name: published_ports (default_host_ip set to empty string) @@ -3760,7 +3937,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau - '9002' - '9001' default_host_ip: '' - force_kill: yes + force_kill: true register: published_ports_9 - name: published_ports (default_host_ip set to empty string, idempotent) @@ -3784,15 +3961,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau published_ports: - '9002' - '9001' - force_kill: yes + force_kill: true register: published_ports_11 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3823,7 +4000,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - read_only: yes + read_only: true state: started register: read_only_1 @@ -3832,7 +4009,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - read_only: yes + read_only: true state: started register: read_only_2 @@ -3841,17 +4018,17 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - read_only: no + read_only: false state: started - force_kill: yes + force_kill: true register: read_only_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3888,15 +4065,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" restart_policy: unless-stopped state: started - force_kill: yes + force_kill: true register: restart_policy_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3936,15 +4113,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau restart_policy: on-failure restart_retries: 2 state: started - force_kill: yes + force_kill: true register: restart_retries_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -3978,8 +4155,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4047,15 +4224,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau security_opts: - "label:disable" - "no-new-privileges" - force_kill: yes + force_kill: true register: security_opts_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4093,15 +4270,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" shm_size: 75M state: started - force_kill: yes + force_kill: true register: shm_size_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4138,15 +4315,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" stop_signal: "9" state: started - force_kill: yes + force_kill: true register: stop_signal_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4190,8 +4367,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4212,7 +4389,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau size: 12m state: started register: storage_opts_1 - ignore_errors: yes + ignore_errors: true - name: storage_opts (idempotency) docker_container: @@ -4223,7 +4400,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau size: 12m state: started register: storage_opts_2 - ignore_errors: yes + ignore_errors: true - name: storage_opts (change) docker_container: @@ -4233,16 +4410,16 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau storage_opts: size: 24m state: started - force_kill: yes + force_kill: true register: storage_opts_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4313,15 +4490,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau sysctls: net.ipv4.icmp_echo_ignore_all: 1 net.ipv6.conf.default.accept_redirects: 0 - force_kill: yes + force_kill: true register: sysctls_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4375,15 +4552,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau tmpfs: - "/test1:rw,noexec,nosuid,size=65536k" - "/test3:rw,noexec,nosuid,size=65536k" - force_kill: yes + force_kill: true register: tmpfs_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4401,7 +4578,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - tty: yes + tty: true state: started register: tty_1 ignore_errors: true @@ -4411,7 +4588,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - tty: yes + tty: true state: started register: tty_2 ignore_errors: true @@ -4421,9 +4598,9 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - tty: no + tty: false state: started - force_kill: yes + force_kill: true register: tty_3 ignore_errors: true @@ -4431,8 +4608,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4492,15 +4669,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau ulimits: - "nofile:1234:1234" - "sigpending:100:200" - force_kill: yes + force_kill: true register: ulimits_4 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4538,15 +4715,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" user: root state: started - force_kill: yes + force_kill: true register: user_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4583,15 +4760,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" userns_mode: "" state: started - force_kill: yes + force_kill: true register: userns_mode_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4628,15 +4805,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" uts: "" state: started - force_kill: yes + force_kill: true register: uts_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -4673,15 +4850,15 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau name: "{{ cname }}" working_dir: / state: started - force_kill: yes + force_kill: true register: working_dir_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/ports.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/ports.yml index 3db6fbb0..ced86851 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/ports.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/ports.yml @@ -73,7 +73,7 @@ published_ports: - "9001:9001" - "9010-9050:9010-9050" - force_kill: yes + force_kill: true register: published_ports_1 - name: published_ports -- port range (idempotency) @@ -88,7 +88,7 @@ published_ports: - "9001:9001" - "9010-9050:9010-9050" - force_kill: yes + force_kill: true register: published_ports_2 - name: published_ports -- port range (different range) @@ -103,15 +103,15 @@ published_ports: - "9001:9001" - "9020-9060:9020-9060" - force_kill: yes + force_kill: true register: published_ports_3 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -131,7 +131,7 @@ state: started published_ports: - "9010-9050:9010" - force_kill: yes + force_kill: true loop: - '{{ cname }}' - '{{ cname2 }}' @@ -145,7 +145,7 @@ state: started published_ports: - "9010-9050:9010" - force_kill: yes + force_kill: true loop: - '{{ cname }}' - '{{ cname2 }}' @@ -159,7 +159,7 @@ state: started published_ports: - "9010-9051:9010" - force_kill: yes + force_kill: true loop: - '{{ cname }}' - '{{ cname2 }}' @@ -169,11 +169,11 @@ docker_container: name: "{{ item }}" state: absent - force_kill: yes + force_kill: true loop: - '{{ cname }}' - '{{ cname2 }}' - diff: no + diff: false - assert: that: @@ -193,7 +193,7 @@ state: started published_ports: - "[::1]:9001:9001" - force_kill: yes + force_kill: true register: published_ports_1 - name: published_ports -- IPv6 (idempotency) @@ -204,7 +204,7 @@ state: started published_ports: - "[::1]:9001:9001" - force_kill: yes + force_kill: true register: published_ports_2 - name: published_ports -- IPv6 (different IP) @@ -215,7 +215,7 @@ state: started published_ports: - "127.0.0.1:9001:9001" - force_kill: yes + force_kill: true register: published_ports_3 - name: published_ports -- IPv6 (hostname) @@ -226,16 +226,16 @@ state: started published_ports: - "localhost:9001:9001" - force_kill: yes + force_kill: true register: published_ports_4 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -311,7 +311,7 @@ state: started publish_all_ports: "{{ test_case.publish_all_ports_value | default(omit) }}" published_ports: "{{ test_case.published_ports_value | default(omit) }}" - force_kill: yes + force_kill: true register: publish_all_ports loop_control: loop_var: test_case diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml index b57677dd..928463ae 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml @@ -21,7 +21,7 @@ - name: Stop container with a lot of invalid options docker_container: name: "{{ cname }}" - force_kill: yes + force_kill: true # Some options with "invalid" values, which would # have to be parsed. The values are "invalid" because # the containers and networks listed here do not exist. diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/start-stop.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/start-stop.yml index d7423261..97ac38a5 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/start-stop.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/start-stop.yml @@ -20,7 +20,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present - check_mode: yes + check_mode: true register: create_1 - name: Create container @@ -45,7 +45,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present - check_mode: yes + check_mode: true register: create_4 - assert: @@ -63,7 +63,7 @@ docker_container: name: "{{ cname }}" state: started - check_mode: yes + check_mode: true register: start_1 - name: Start container @@ -82,7 +82,7 @@ docker_container: name: "{{ cname }}" state: started - check_mode: yes + check_mode: true register: start_4 - assert: @@ -102,7 +102,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present - check_mode: yes + check_mode: true register: present_check_1 - name: Present check for running container @@ -126,7 +126,7 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true - name: Start container from scratch (check) docker_container: @@ -135,7 +135,7 @@ stop_timeout: 1 name: "{{ cname }}" state: started - check_mode: yes + check_mode: true register: start_scratch_1 - name: Start container from scratch @@ -163,7 +163,7 @@ stop_timeout: 1 name: "{{ cname }}" state: started - check_mode: yes + check_mode: true register: start_scratch_4 - assert: @@ -183,7 +183,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present - force_kill: yes + force_kill: true register: recreate_1 - name: Recreating container (created, recreate, check mode) @@ -191,20 +191,20 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - recreate: yes + recreate: true state: present - force_kill: yes + force_kill: true register: recreate_2 - check_mode: yes + check_mode: true - name: Recreating container (created, recreate) docker_container: image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - recreate: yes + recreate: true state: present - force_kill: yes + force_kill: true register: recreate_3 - name: Recreating container (started) @@ -213,7 +213,7 @@ command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started - force_kill: yes + force_kill: true register: recreate_4 - name: Recreating container (started, recreate, check mode) @@ -221,30 +221,30 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - recreate: yes + recreate: true removal_wait_timeout: 10 state: started - force_kill: yes + force_kill: true register: recreate_5 - check_mode: yes + check_mode: true - name: Recreating container (started, recreate) docker_container: image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - recreate: yes + recreate: true removal_wait_timeout: 10 state: started - force_kill: yes + force_kill: true register: recreate_6 - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - debug: var=recreate_1 - debug: var=recreate_3 @@ -284,22 +284,22 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - restart: yes + restart: true state: started stop_timeout: 1 - force_kill: yes + force_kill: true register: restart_2 - check_mode: yes + check_mode: true - name: Restarting (restart) docker_container: image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" - restart: yes + restart: true state: started stop_timeout: 1 - force_kill: yes + force_kill: true register: restart_3 - name: Restarting (verify volumes) @@ -317,8 +317,8 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - assert: that: @@ -338,7 +338,7 @@ name: "{{ cname }}" state: stopped stop_timeout: 1 - check_mode: yes + check_mode: true register: stop_1 - name: Stop container @@ -363,7 +363,7 @@ name: "{{ cname }}" state: stopped stop_timeout: 1 - check_mode: yes + check_mode: true register: stop_4 - assert: @@ -381,7 +381,7 @@ docker_container: name: "{{ cname }}" state: absent - check_mode: yes + check_mode: true register: remove_1 - name: Remove container @@ -400,7 +400,7 @@ docker_container: name: "{{ cname }}" state: absent - check_mode: yes + check_mode: true register: remove_4 - assert: @@ -425,30 +425,30 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes - check_mode: yes + force_kill: true + check_mode: true register: remove_from_running_1 - name: Remove container from running docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true register: remove_from_running_2 - name: Remove container from running (idempotent) docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true register: remove_from_running_3 - name: Remove container from running (idempotent check) docker_container: name: "{{ cname }}" state: absent - force_kill: yes - check_mode: yes + force_kill: true + check_mode: true register: remove_from_running_4 - assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/update.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/update.yml index 106e6d4b..a180e0f5 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/update.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container/tasks/tests/update.yml @@ -82,7 +82,7 @@ restart_policy: on-failure # only on-failure can have restart_retries, so don't change it here restart_retries: 2 register: update - diff: yes + diff: true - name: Update values again docker_container: @@ -100,7 +100,7 @@ restart_policy: always restart_retries: 0 register: update2 - diff: yes + diff: true - name: Recreate container docker_container: @@ -117,16 +117,16 @@ memory_swap: unlimited restart_policy: on-failure restart_retries: 2 - force_kill: yes + force_kill: true register: recreate - diff: yes + diff: true - name: cleanup docker_container: name: "{{ cname }}" state: absent - force_kill: yes - diff: no + force_kill: true + diff: false - name: Check general things assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml index 2650229d..f5b89789 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml index 20f9a268..7eb1b86a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/content.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/content.yml index ae22af00..b49c05a9 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/content.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/content.yml @@ -1194,4 +1194,4 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/file.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/file.yml index 8181d125..5431ae35 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/file.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_copy_into/tasks/tests/file.yml @@ -1062,4 +1062,4 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/tasks/main.yml index 2cf0e5a1..61c3b81e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_exec/tasks/main.yml @@ -17,7 +17,7 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true - name: Execute in a non-present container docker_container_exec: @@ -37,7 +37,7 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started - force_kill: yes + force_kill: true - name: Execute in a present container (command) docker_container_exec: @@ -220,7 +220,7 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true when: docker_api_version is version('1.25', '>=') diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_info/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_info/tasks/main.yml index 80f03b85..2df597eb 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_info/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_container_info/tasks/main.yml @@ -17,7 +17,7 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true - name: Inspect a non-present container docker_container_info: @@ -36,7 +36,7 @@ image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started - force_kill: yes + force_kill: true - name: Inspect a present container docker_container_info: @@ -48,7 +48,7 @@ - name: "Comparison: use 'docker inspect'" command: docker inspect "{{ cname }}" register: docker_inspect - ignore_errors: yes + ignore_errors: true - block: - set_fact: docker_inspect_result: "{{ docker_inspect.stdout | from_json }}" @@ -76,7 +76,7 @@ docker_container: name: "{{ cname }}" state: absent - force_kill: yes + force_kill: true when: docker_api_version is version('1.25', '>=') diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_host_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml index 88de0c7e..b4871d3e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_host_info/tasks/test_host_info.yml @@ -68,7 +68,7 @@ - name: Get info on Docker host and list containers docker_host_info: - containers: yes + containers: true register: output - name: assert reading docker host facts when docker is running and list containers @@ -84,18 +84,18 @@ - name: Get info on Docker host and list containers matching filters (single label) docker_host_info: - containers: yes + containers: true containers_filters: label: key1=value1 register: output - 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: - containers: yes + containers: true containers_filters: label: - key1=value1 @@ -104,11 +104,11 @@ - 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: - containers: yes + containers: true containers_filters: label: - key1=value1 @@ -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,13 +139,13 @@ - 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: - containers: yes - verbose_output: yes + containers: true + verbose_output: true register: output - name: assert reading docker host facts when docker is running and list containers with verbose output @@ -161,7 +161,7 @@ - name: Get info on Docker host and list images docker_host_info: - images: yes + images: true register: output - name: assert reading docker host facts when docker is running and list images @@ -177,8 +177,8 @@ - name: Get info on Docker host and list images with verbose output docker_host_info: - images: yes - verbose_output: yes + images: true + verbose_output: true register: output - name: assert reading docker host facts when docker is running and list images with verbose output @@ -194,7 +194,7 @@ - name: Get info on Docker host and list networks docker_host_info: - networks: yes + networks: true register: output - name: assert reading docker host facts when docker is running and list networks @@ -210,8 +210,8 @@ - name: Get info on Docker host and list networks with verbose output docker_host_info: - networks: yes - verbose_output: yes + networks: true + verbose_output: true register: output - name: assert reading docker host facts when docker is running and list networks with verbose output @@ -227,7 +227,7 @@ - name: Get info on Docker host and list volumes docker_host_info: - volumes: yes + volumes: true register: output - name: assert reading docker host facts when docker is running and list volumes @@ -243,8 +243,8 @@ - name: Get info on Docker host and list volumes with verbose output docker_host_info: - volumes: yes - verbose_output: yes + volumes: true + verbose_output: true register: output - name: assert reading docker host facts when docker is running and list volumes with verbose output @@ -260,7 +260,7 @@ - name: Get info on Docker host and get disk usage docker_host_info: - disk_usage: yes + disk_usage: true register: output - name: assert reading docker host facts when docker is running and get disk usage @@ -272,12 +272,14 @@ - 'output.volumes is not defined' - 'output.images is not defined' - 'output.disk_usage.LayersSize is number' - - 'output.disk_usage.BuilderSize is not defined' + - 'output.disk_usage.Images is not defined' + - 'output.disk_usage.Containers is not defined' + - 'output.disk_usage.Volumes is not defined' - name: Get info on Docker host and get disk usage with verbose output docker_host_info: - disk_usage: yes - verbose_output: yes + disk_usage: true + verbose_output: true register: output - name: assert reading docker host facts when docker is running and get disk usage with verbose output @@ -289,15 +291,17 @@ - 'output.volumes is not defined' - 'output.images is not defined' - 'output.disk_usage.LayersSize is number' - - 'output.disk_usage.BuilderSize is number' + - 'output.disk_usage.Images is sequence' + - 'output.disk_usage.Containers is sequence' + - 'output.disk_usage.Volumes is sequence' - name: Get info on Docker host, disk usage and get all lists together docker_host_info: - volumes: yes - containers: yes - networks: yes - images: yes - disk_usage: yes + volumes: true + containers: true + networks: true + images: true + disk_usage: true register: output - name: assert reading docker host facts when docker is running, disk usage and get lists together @@ -313,16 +317,18 @@ - 'output.images[0].Id is string' - 'output.images[0].ParentId is not defined' - 'output.disk_usage.LayersSize is number' - - 'output.disk_usage.BuilderSize is not defined' + - 'output.disk_usage.Images is not defined' + - 'output.disk_usage.Containers is not defined' + - 'output.disk_usage.Volumes is not defined' - name: Get info on Docker host, disk usage and get all lists together with verbose output docker_host_info: - volumes: yes - containers: yes - networks: yes - images: yes - disk_usage: yes - verbose_output: yes + volumes: true + containers: true + networks: true + images: true + disk_usage: true + verbose_output: true register: output - name: assert reading docker host facts when docker is running and get disk usage with verbose output @@ -338,14 +344,16 @@ - 'output.images[0].Id is string' - 'output.images[0].ParentId is string' - 'output.disk_usage.LayersSize is number' - - 'output.disk_usage.BuilderSize is number' + - 'output.disk_usage.Images is sequence' + - 'output.disk_usage.Containers is sequence' + - 'output.disk_usage.Volumes is sequence' always: - name: Delete containers docker_container: name: "{{ item }}" state: absent - force_kill: yes + force_kill: true loop: - "{{ cname }}" - "{{ cname2 }}" diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml index f7ba9ab1..511f9e41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml index 5941bc08..ea3b47dd 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/test.yml +++ b/openshift/release/ansible/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: yes - 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml index a6954274..068e92f4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/basic.yml @@ -11,7 +11,7 @@ docker_image: name: "{{ docker_test_image_hello_world }}" state: absent - force_absent: yes + force_absent: true register: absent_1 - name: Make sure image is not there (idempotency) @@ -71,7 +71,7 @@ source: local name: "{{ docker_test_image_hello_world }}" repository: "{{ docker_test_image_hello_world_base }}:alias" - force_tag: yes + force_tag: true register: tag_3 - name: Tag image with ID instead of name @@ -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 }}" @@ -125,7 +125,7 @@ path: "{{ remote_tmp_dir }}/files" force_source: true register: fail_4 - ignore_errors: yes + ignore_errors: true - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml index 8035525b..ffd427fd 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/docker_image.yml +++ b/openshift/release/ansible/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: yes - -- 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: yes - 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: yes - 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: yes - source: local - force_tag: yes - 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: yes - -- 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: no - source: pull - -- name: Push different image with new tag - docker_image: - name: "{{ hello_world_image_base }}" - repository: "{{ hello_world_image_base }}" - tag: newtag - push: yes - 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: yes - 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: no - source: pull - -- name: Push same image with new tag - docker_image: - name: "{{ hello_world_image_base }}" - repository: "{{ hello_world_image_base }}" - tag: newtag2 - push: yes - 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: yes - 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 ###################################################### @@ -202,14 +205,14 @@ docker_image: name: "{{ test_image_base }}:latest" state: absent - force_absent: yes + force_absent: true - name: repository docker_image: name: "{{ iname }}" build: path: "{{ remote_tmp_dir }}/files" - pull: no + pull: false repository: "{{ test_image_base }}" source: build register: repository_1 @@ -252,7 +255,7 @@ docker_image: name: "{{ test_image_base }}:latest" state: absent - force_absent: yes + force_absent: true - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml index 401ee786..b8f6c700 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image/tasks/tests/options.yml @@ -21,7 +21,7 @@ docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - name: buildargs docker_image: @@ -34,10 +34,10 @@ TEST1: val1 TEST2: val2 TEST3: "True" - pull: no + pull: false source: build register: buildargs_1 - ignore_errors: yes + ignore_errors: true - name: buildargs (idempotency) docker_image: @@ -50,16 +50,16 @@ TEST1: val1 TEST2: val2 TEST3: "True" - pull: no + pull: false source: build register: buildargs_2 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - assert: that: @@ -76,10 +76,10 @@ build: path: "{{ remote_tmp_dir }}/files" container_limits: - memory: 4000 - pull: no + memory: 4KB + pull: false source: build - ignore_errors: yes + ignore_errors: true register: container_limits_1 - name: container_limits @@ -88,9 +88,9 @@ build: path: "{{ remote_tmp_dir }}/files" container_limits: - memory: 7000000 - memswap: 8000000 - pull: no + memory: 7MB + memswap: 8MB + pull: false source: build register: container_limits_2 @@ -98,7 +98,7 @@ docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - assert: that: @@ -121,7 +121,7 @@ build: path: "{{ remote_tmp_dir }}/files" dockerfile: "MyDockerfile" - pull: no + pull: false source: build register: dockerfile_1 @@ -129,7 +129,7 @@ docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - assert: that: @@ -145,7 +145,7 @@ docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - name: build.platform docker_image: @@ -153,10 +153,10 @@ build: path: "{{ remote_tmp_dir }}/files" platform: linux - pull: no + pull: false source: build register: platform_1 - ignore_errors: yes + ignore_errors: true - name: build.platform (idempotency) docker_image: @@ -164,16 +164,16 @@ build: path: "{{ remote_tmp_dir }}/files" platform: linux - pull: no + pull: false source: build register: platform_2 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - assert: that: @@ -189,7 +189,7 @@ name: "{{ iname }}" build: path: "{{ remote_tmp_dir }}/files" - pull: no + pull: false source: build - name: force (changed) @@ -198,9 +198,9 @@ build: path: "{{ remote_tmp_dir }}/files" dockerfile: "MyDockerfile" - pull: no + pull: false source: build - force_source: yes + force_source: true register: force_1 - name: force (unchanged) @@ -209,16 +209,16 @@ build: path: "{{ remote_tmp_dir }}/files" dockerfile: "MyDockerfile" - pull: no + pull: false source: build - force_source: yes + force_source: true register: force_2 - name: cleanup docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - assert: that: @@ -309,7 +309,7 @@ docker_image: name: "{{ docker_test_image_hello_world }}" state: absent - force_absent: yes + force_absent: true - name: load image (changed) docker_image: @@ -369,7 +369,7 @@ name: "{{ iname }}" build: path: "{{ remote_tmp_dir }}/files" - pull: no + pull: false source: build register: path_1 @@ -378,7 +378,7 @@ name: "{{ iname }}" build: path: "{{ remote_tmp_dir }}/files" - pull: no + pull: false source: build register: path_2 @@ -386,7 +386,7 @@ docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - assert: that: @@ -404,7 +404,7 @@ path: "{{ remote_tmp_dir }}/files" dockerfile: "StagedDockerfile" target: first - pull: no + pull: false source: build register: dockerfile_2 @@ -412,7 +412,7 @@ docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true - assert: that: @@ -429,7 +429,7 @@ build: path: "{{ remote_tmp_dir }}/files" dockerfile: "EtcHostsDockerfile" - pull: no + pull: false etc_hosts: some-custom-host: "127.0.0.1" source: build @@ -439,8 +439,66 @@ docker_image: name: "{{ iname }}" state: absent - force_absent: yes + force_absent: true + +- 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/meta/main.yml new file mode 100644 index 00000000..71ac98d4 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/main.yml new file mode 100644 index 00000000..88b23cfe --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/run-test.yml new file mode 100644 index 00000000..72a58962 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/test.yml new file mode 100644 index 00000000..57130ef1 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/test.yml @@ -0,0 +1,71 @@ +--- +# 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 + - SecretsDockerfile + - StagedDockerfile + +- debug: + msg: "Has buildx plugin: {{ docker_has_buildx }}" + +- block: + - name: Determine plugin versions + command: docker info -f '{{ "{{" }}json .ClientInfo.Plugins{{ "}}" }}' + register: plugin_versions + + - name: Determine buildx plugin version + set_fact: + buildx_version: >- + {{ + (plugin_versions.stdout | from_json | selectattr('Name', 'eq', 'buildx') | map(attribute='Version') | first).lstrip('v') + }} + + - 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/tests/options.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/tests/options.yml new file mode 100644 index 00000000..5c1211c7 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/tasks/tests/options.yml @@ -0,0 +1,289 @@ +--- +# 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" + +#################################################################### +## secrets ######################################################### +#################################################################### + +- name: Generate secret + set_fact: + docker_image_build_secret_value: this is my secret {{ '%0x' % ((2**32) | random) }} + +- when: buildx_version is version('0.6.0', '>=') + block: + - name: Build image with secrets via environment variables + docker_image_build: + name: "{{ iname }}" + path: "{{ remote_tmp_dir }}/files" + dockerfile: "SecretsDockerfile" + pull: false + secrets: + - id: my-awesome-secret + type: value + value: '{{ docker_image_build_secret_value }}' + nocache: true # using a cache can result in the output step being CACHED + register: secrets_1 + + - name: cleanup + docker_image_remove: + name: "{{ iname }}" + + - name: Show image information + debug: + var: secrets_1.stderr_lines + + - assert: + that: + - secrets_1 is changed + - (docker_image_build_secret_value | b64encode) in secrets_1.stderr + +#################################################################### +## outputs ######################################################### +#################################################################### + +- name: Make sure the image is not there + docker_image_remove: + name: "{{ iname }}" + +- name: Make sure the image tarball is not there + file: + path: "{{ remote_tmp_dir }}/container.tar" + state: absent + +- name: Build image with outputs + docker_image_build: + name: "{{ iname }}" + path: "{{ remote_tmp_dir }}/files" + dockerfile: "Dockerfile" + pull: false + outputs: + - type: tar + dest: "{{ remote_tmp_dir }}/container.tar" + register: outputs_1 + +- name: cleanup (should not be changed) + docker_image_remove: + name: "{{ iname }}" + register: outputs_1_cleanup + +- name: Gather information on tarball + stat: + path: "{{ remote_tmp_dir }}/container.tar" + register: outputs_1_stat + +- name: Show image information + debug: + var: outputs_1.image + +- name: Show tarball information + debug: + var: outputs_1_stat.stat + +- assert: + that: + - outputs_1 is changed + - outputs_1.image | length == 0 + - outputs_1_cleanup is not changed + - outputs_1_stat.stat.exists diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/ArgsDockerfile b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/ArgsDockerfile new file mode 100644 index 00000000..dedd88a8 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/Dockerfile b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/Dockerfile new file mode 100644 index 00000000..286094b9 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/EtcHostsDockerfile b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/EtcHostsDockerfile new file mode 100644 index 00000000..bc21b966 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/MyDockerfile b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/MyDockerfile new file mode 100644 index 00000000..24b1c926 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/SecretsDockerfile b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/SecretsDockerfile new file mode 100644 index 00000000..31bec826 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/SecretsDockerfile @@ -0,0 +1,7 @@ +# Copyright (c) 2024, 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 + +FROM {{ docker_test_image_busybox }} +RUN --mount=type=secret,id=my-awesome-secret \ + cat /run/secrets/my-awesome-secret | base64 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/StagedDockerfile b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_build/templates/StagedDockerfile new file mode 100644 index 00000000..da225342 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/meta/main.yml new file mode 100644 index 00000000..f5b89789 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/main.yml new file mode 100644 index 00000000..88b23cfe --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/run-test.yml new file mode 100644 index 00000000..72a58962 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/test.yml new file mode 100644 index 00000000..e6ffe722 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/tests/basic.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_export/tasks/tests/basic.yml new file mode 100644 index 00000000..b5f7e653 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml index 5bd053ac..289a9cf1 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_info/tasks/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml index 2650229d..f5b89789 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml index 3563419d..e6ffe722 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/test.yml +++ b/openshift/release/ansible/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: yes - 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml index 8d9de994..70dc8df0 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_load/tasks/tests/basic.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/meta/main.yml new file mode 100644 index 00000000..ff316450 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/main.yml new file mode 100644 index 00000000..88b23cfe --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/run-test.yml new file mode 100644 index 00000000..72a58962 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/test.yml new file mode 100644 index 00000000..e6ffe722 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/basic.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/basic.yml new file mode 100644 index 00000000..23e1f092 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/image-ids.yml new file mode 100644 index 00000000..dd092a8b --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/registry.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_pull/tasks/tests/registry.yml new file mode 100644 index 00000000..2edc3b62 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/meta/main.yml new file mode 100644 index 00000000..ff316450 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/main.yml new file mode 100644 index 00000000..88b23cfe --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/run-test.yml new file mode 100644 index 00000000..72a58962 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/test.yml new file mode 100644 index 00000000..e6ffe722 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/basic.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/basic.yml new file mode 100644 index 00000000..15ed8744 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/registry.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_push/tasks/tests/registry.yml new file mode 100644 index 00000000..ca18d196 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/meta/main.yml new file mode 100644 index 00000000..471ddd41 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_remove/tasks/main.yml new file mode 100644 index 00000000..afa72da8 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/aliases new file mode 100644 index 00000000..2e1acc0a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/meta/main.yml new file mode 100644 index 00000000..471ddd41 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_image_tag/tasks/main.yml new file mode 100644 index 00000000..32791748 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml index 3133a036..ff316450 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml index bd99acc0..b56fe799 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/tests/docker_login.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/tests/docker_login.yml index 84ba3d87..efb3efc1 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/tests/docker_login.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_login/tasks/tests/docker_login.yml @@ -18,8 +18,8 @@ password: "1234" state: present register: login_failed_check - ignore_errors: yes - check_mode: yes + ignore_errors: true + check_mode: true - name: Log in with wrong password docker_login: @@ -28,7 +28,7 @@ password: "1234" state: present register: login_failed - ignore_errors: yes + ignore_errors: true - name: Make sure that login failed assert: @@ -45,7 +45,7 @@ password: hunter2 state: present register: login_1 - check_mode: yes + check_mode: true - name: Log in docker_login: @@ -75,7 +75,7 @@ password: hunter2 state: present register: login_4 - check_mode: yes + check_mode: true - name: Make sure that login worked assert: @@ -93,8 +93,8 @@ password: "1234" state: present register: login_failed_check - ignore_errors: yes - check_mode: yes + ignore_errors: true + check_mode: true - name: Log in again with wrong password docker_login: @@ -103,7 +103,7 @@ password: "1234" state: present register: login_failed - ignore_errors: yes + ignore_errors: true - name: Make sure that login failed again assert: @@ -118,7 +118,7 @@ registry_url: "{{ registry_frontend_address }}" state: absent register: logout_1 - check_mode: yes + check_mode: true - name: Log out docker_login: @@ -137,7 +137,7 @@ registry_url: "{{ registry_frontend_address }}" state: absent register: logout_4 - check_mode: yes + check_mode: true - name: Make sure that login worked assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml index 5769ff1c..44bdbe8d 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml index 4f4fad06..d2f7f025 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/main.yml +++ b/openshift/release/ansible/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: yes - loop: "{{ cnames }}" - - name: "Make sure all networks are removed" - docker_network: - name: "{{ item }}" - state: absent - force: yes - 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/basic.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/basic.yml index 4df2f108..1a419c73 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/basic.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/basic.yml @@ -76,7 +76,7 @@ state: present connected: - "{{ cname_3 }}" - appends: yes + appends: true register: networks_4 - name: Connect network to container 3 (idempotency) @@ -85,7 +85,7 @@ state: present connected: - "{{ cname_3 }}" - appends: yes + appends: true register: networks_4_idem - name: Disconnect network from container 1 @@ -129,7 +129,7 @@ docker_container: name: "{{ container_name }}" state: absent - force_kill: yes + force_kill: true loop: - "{{ cname_1 }}" - "{{ cname_2 }}" diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/ipam.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/ipam.yml index 85e77223..7091e95f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/ipam.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/ipam.yml @@ -59,7 +59,7 @@ aux_addresses: host1: 10.25.121.3 register: network - diff: yes + diff: true - assert: that: @@ -92,7 +92,7 @@ - name: Create network with IPv6 IPAM config docker_network: name: "{{ nname_ipam_2 }}" - enable_ipv6: yes + enable_ipv6: true ipam_config: - subnet: fdd1:ac8c:0557:7ce0::/64 register: network @@ -104,7 +104,7 @@ - name: Create network with IPv6 IPAM config (idempotence) docker_network: name: "{{ nname_ipam_2 }}" - enable_ipv6: yes + enable_ipv6: true ipam_config: - subnet: fdd1:ac8c:0557:7ce0::/64 register: network @@ -116,11 +116,11 @@ - name: Change subnet of network with IPv6 IPAM config docker_network: name: "{{ nname_ipam_2 }}" - enable_ipv6: yes + enable_ipv6: true ipam_config: - subnet: fdd1:ac8c:0557:7ce1::/64 register: network - diff: yes + diff: true - assert: that: @@ -131,11 +131,11 @@ - name: Change subnet of network with IPv6 IPAM config docker_network: name: "{{ nname_ipam_2 }}" - enable_ipv6: yes + enable_ipv6: true ipam_config: - subnet: "fdd1:ac8c:0557:7ce1::" register: network - ignore_errors: yes + ignore_errors: true - assert: that: @@ -153,7 +153,7 @@ - name: Create network with IPv6 and custom IPv4 IPAM config docker_network: name: "{{ nname_ipam_3 }}" - enable_ipv6: yes + enable_ipv6: true ipam_config: - subnet: 10.26.120.0/24 - subnet: fdd1:ac8c:0557:7ce2::/64 @@ -166,7 +166,7 @@ - name: Change subnet order of network with IPv6 and custom IPv4 IPAM config (idempotence) docker_network: name: "{{ nname_ipam_3 }}" - enable_ipv6: yes + enable_ipv6: true ipam_config: - subnet: fdd1:ac8c:0557:7ce2::/64 - subnet: 10.26.120.0/24 @@ -179,11 +179,11 @@ - name: Remove IPv6 from network with custom IPv4 and IPv6 IPAM config (change) docker_network: name: "{{ nname_ipam_3 }}" - enable_ipv6: no + enable_ipv6: false ipam_config: - subnet: 10.26.120.0/24 register: network - diff: yes + diff: true - assert: that: @@ -240,7 +240,7 @@ - subnet: 10.26.120.0/24 - subnet: 10.26.122.0/24 register: network - diff: yes + diff: true - assert: that: @@ -278,25 +278,25 @@ ipam_driver_options: a: b register: network_1 - ignore_errors: yes + ignore_errors: true - name: Create network with IPAM driver options (idempotence) docker_network: name: "{{ nname_ipam_3 }}" ipam_driver: default ipam_driver_options: a: b - diff: yes + diff: true register: network_2 - ignore_errors: yes + ignore_errors: true - name: Create network with IPAM driver options (change) docker_network: name: "{{ nname_ipam_3 }}" ipam_driver: default ipam_driver_options: a: c - diff: yes + diff: true register: network_3 - ignore_errors: yes + ignore_errors: true - name: Cleanup network docker_network: name: "{{ nname_ipam_3 }}" diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/options.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/options.yml index 7dba9129..d2e39739 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/options.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/options.yml @@ -17,26 +17,26 @@ - name: internal docker_network: name: "{{ nname_1 }}" - internal: yes + internal: true register: internal_1 - name: internal (idempotency) docker_network: name: "{{ nname_1 }}" - internal: yes + internal: true register: internal_2 - name: internal (change) docker_network: name: "{{ nname_1 }}" - internal: no + internal: false register: internal_3 - name: cleanup docker_network: name: "{{ nname_1 }}" state: absent - force: yes + force: true - assert: that: @@ -66,7 +66,7 @@ docker_network: name: "{{ nname_1 }}" driver_options: - com.docker.network.bridge.enable_icc: False + com.docker.network.bridge.enable_icc: false register: driver_options_3 - name: driver_options (change) @@ -80,14 +80,14 @@ docker_network: name: "{{ nname_1 }}" driver_options: - com.docker.network.bridge.enable_icc: True + com.docker.network.bridge.enable_icc: true register: driver_options_5 - name: cleanup docker_network: name: "{{ nname_1 }}" state: absent - force: yes + force: true - assert: that: @@ -134,7 +134,7 @@ docker_network: name: "{{ nname_1 }}" state: absent - force: yes + force: true - assert: that: @@ -146,7 +146,7 @@ - name: cleanup swarm docker_swarm: state: absent - force: yes + force: true #################################################################### ## attachable ###################################################### @@ -157,27 +157,27 @@ name: "{{ nname_1 }}" attachable: true register: attachable_1 - ignore_errors: yes + ignore_errors: true - name: attachable (idempotency) docker_network: name: "{{ nname_1 }}" attachable: true register: attachable_2 - ignore_errors: yes + ignore_errors: true - name: attachable (change) docker_network: name: "{{ nname_1 }}" attachable: false register: attachable_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_network: name: "{{ nname_1 }}" state: absent - force: yes + force: true - assert: that: @@ -224,7 +224,7 @@ docker_network: name: "{{ nname_1 }}" state: absent - force: yes + force: true - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/overlay.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/overlay.yml index 95ce50d1..59d79cc0 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/overlay.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network/tasks/tests/overlay.yml @@ -47,7 +47,7 @@ docker_network: name: "{{ nname_1 }}" state: absent - force: yes + force: true - assert: that: @@ -59,4 +59,4 @@ - name: cleanup swarm docker_swarm: state: absent - force: yes + force: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network_info/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network_info/tasks/main.yml index ac80e2ed..910b4ec8 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network_info/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_network_info/tasks/main.yml @@ -17,7 +17,7 @@ docker_network: name: "{{ nname }}" state: absent - force: yes + force: true - name: Inspect a non-present network docker_network_info: @@ -45,7 +45,7 @@ - name: "Comparison: use 'docker network inspect'" command: docker network inspect "{{ nname }}" register: docker_inspect - ignore_errors: yes + ignore_errors: true - block: - set_fact: docker_inspect_result: "{{ docker_inspect.stdout | from_json }}" @@ -57,7 +57,7 @@ docker_network: name: "{{ nname }}" state: absent - force: yes + force: true - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml index 5769ff1c..6407d95b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/main.yml index cb0f7d3d..68bb5426 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/main.yml @@ -17,23 +17,23 @@ docker_swarm: state: absent force: true - diff: no - ignore_errors: yes + diff: false + ignore_errors: true - name: Restart docker daemon service: name: docker state: restarted - become: yes + become: true - name: Wait for docker daemon to be fully restarted command: docker ps - ignore_errors: yes + ignore_errors: true - name: Cleanup docker_swarm: state: absent force: true - diff: no + diff: false when: docker_py_version is version('2.4.0', '>=') and docker_api_version is version('1.25', '>=') diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml index 4358fea1..c326fc9f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node/tasks/test_node.yml @@ -11,7 +11,7 @@ - name: Try to get docker_node_info when docker is not running in swarm mode docker_node_info: - ignore_errors: yes + ignore_errors: true register: output - name: assert failure when called when swarm is not in use or not run on manager node @@ -56,7 +56,7 @@ docker_node: hostname: "{{ nodeid }}" role: manager - check_mode: yes + check_mode: true register: set_as_manager_1 - name: Try to set node as manager @@ -75,7 +75,7 @@ docker_node: hostname: "{{ nodeid }}" role: manager - check_mode: yes + check_mode: true register: set_as_manager_4 - name: assert that node role does has not changed @@ -98,14 +98,14 @@ docker_node: hostname: "{{ nodeid }}" role: worker - check_mode: yes + check_mode: true register: set_as_worker_1 - name: Try to set node as worker docker_node: hostname: "{{ nodeid }}" role: worker - ignore_errors: yes + ignore_errors: true register: set_as_worker_2 - name: assert that node cannot change role to worker @@ -123,7 +123,7 @@ docker_node: hostname: "{{ nodeid }}" availability: pause - check_mode: yes + check_mode: true register: set_as_paused_1 - name: Try to set node availability as paused @@ -142,7 +142,7 @@ docker_node: hostname: "{{ nodeid }}" availability: pause - check_mode: yes + check_mode: true register: set_as_paused_4 - name: assert node changed availability to paused @@ -162,7 +162,7 @@ docker_node: hostname: "{{ nodeid }}" availability: drain - check_mode: yes + check_mode: true register: output_drain_1 - name: Try to set node availability as drained @@ -181,7 +181,7 @@ docker_node: hostname: "{{ nodeid }}" availability: drain - check_mode: yes + check_mode: true register: output_drain_4 - name: assert node changed availability to drained @@ -202,7 +202,7 @@ docker_node: hostname: "{{ nodeid }}" availability: active - check_mode: yes + check_mode: true register: output_active_1 - name: Try to set node availability as active @@ -221,7 +221,7 @@ docker_node: hostname: "{{ nodeid }}" availability: active - check_mode: yes + check_mode: true register: output_active_4 - name: assert node changed availability to active @@ -242,7 +242,7 @@ hostname: "{{ nodeid }}" labels: label1: value1 - check_mode: yes + check_mode: true register: output_add_single_label_1 - name: Try to add single label to swarm node @@ -264,7 +264,7 @@ hostname: "{{ nodeid }}" labels: label1: value1 - check_mode: yes + check_mode: true register: output_add_single_label_4 - name: assert adding single label to swarm node @@ -290,7 +290,7 @@ label4: value4 label5: value5 label6: value6 - check_mode: yes + check_mode: true register: output_add_multiple_labels_1 - name: Try to add five labels to swarm node @@ -324,7 +324,7 @@ label4: value4 label5: value5 label6: value6 - check_mode: yes + check_mode: true register: output_add_multiple_labels_4 - name: assert adding multiple labels to swarm node @@ -347,7 +347,7 @@ hostname: "{{ nodeid }}" labels: label1: value1111 - check_mode: yes + check_mode: true register: output_update_label_1 - name: Update value of existing label @@ -369,7 +369,7 @@ hostname: "{{ nodeid }}" labels: label1: value1111 - check_mode: yes + check_mode: true register: output_update_label_4 - name: assert updating single label assigned to swarm node @@ -393,7 +393,7 @@ labels: label2: value2222 label3: value3333 - check_mode: yes + check_mode: true register: output_update_labels_1 - name: Update value of multiple existing label @@ -418,7 +418,7 @@ labels: label2: value2222 label3: value3333 - check_mode: yes + check_mode: true register: output_update_labels_4 - name: assert updating multiple labels assigned to swarm node @@ -442,7 +442,7 @@ hostname: "{{ nodeid }}" labels_to_remove: - label1 - check_mode: yes + check_mode: true register: output_remove_label_1 - name: Try to remove single existing label from swarm node @@ -464,7 +464,7 @@ hostname: "{{ nodeid }}" labels_to_remove: - label1 - check_mode: yes + check_mode: true register: output_remove_label_4 - name: assert removing single label from swarm node @@ -489,7 +489,7 @@ hostname: "{{ nodeid }}" labels_to_remove: - labelnotexist - check_mode: yes + check_mode: true register: output_remove_nonexist_label_1 - name: Try to remove single non-existing label from swarm node @@ -511,7 +511,7 @@ hostname: "{{ nodeid }}" labels_to_remove: - labelnotexist - check_mode: yes + check_mode: true register: output_remove_nonexist_label_4 - name: assert removing single non-existing label from swarm node @@ -536,7 +536,7 @@ labels_to_remove: - label2 - label3 - check_mode: yes + check_mode: true register: output_remove_label_1 - name: Try to remove two existing labels from swarm node @@ -561,7 +561,7 @@ labels_to_remove: - label2 - label3 - check_mode: yes + check_mode: true register: output_remove_label_4 - name: assert removing multiple labels from swarm node @@ -586,7 +586,7 @@ labels_to_remove: - label4 - labelisnotthere - check_mode: yes + check_mode: true register: output_remove_mix_labels_1 - name: Try to remove mix of existing amd non-existing labels from swarm node @@ -611,7 +611,7 @@ labels_to_remove: - label4 - labelisnotthere - check_mode: yes + check_mode: true register: output_remove_mix_labels_4 - name: assert removing mix of existing and non-existing labels from swarm node @@ -638,7 +638,7 @@ label8: value8 labels_to_remove: - label5 - check_mode: yes + check_mode: true register: output_add_del_labels_1 - name: Try to add and remove nonoverlapping labels at the same time @@ -669,7 +669,7 @@ label8: value8 labels_to_remove: - label5 - check_mode: yes + check_mode: true register: output_add_del_labels_4 - name: assert adding and removing nonoverlapping labels from swarm node @@ -696,8 +696,8 @@ labels_to_remove: - label6 - label7 - check_mode: yes - register: output_add_del_overlap_lables_1 + check_mode: true + 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: @@ -730,20 +730,20 @@ labels_to_remove: - label6 - label7 - check_mode: yes - register: output_add_del_overlap_lables_4 + check_mode: true + 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 ############################################# @@ -756,7 +756,7 @@ label11: value11 label12: value12 labels_state: replace - check_mode: yes + check_mode: true register: output_replace_labels_1 - name: Replace labels on swarm node @@ -784,7 +784,7 @@ label11: value11 label12: value12 labels_state: replace - check_mode: yes + check_mode: true register: output_replace_labels_4 - name: assert replacing labels from swarm node @@ -806,7 +806,7 @@ docker_node: hostname: "{{ nodeid }}" labels_state: replace - check_mode: yes + check_mode: true register: output_remove_labels_1 - name: Remove all labels from swarm node @@ -825,10 +825,10 @@ docker_node: hostname: "{{ nodeid }}" labels_state: replace - check_mode: yes + 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml index 5769ff1c..6407d95b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node_info/tasks/test_node_info.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node_info/tasks/test_node_info.yml index d6f78d56..9a89a2a1 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node_info/tasks/test_node_info.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_node_info/tasks/test_node_info.yml @@ -11,7 +11,7 @@ - name: Try to get docker_node_info when docker is not running in swarm mode docker_node_info: - ignore_errors: yes + ignore_errors: true register: output - name: assert failure when called when swarm is not in use or not run on manager node @@ -46,7 +46,7 @@ - name: Try to get docker_node_info using the self parameter docker_node_info: - self: yes + self: true register: output - name: assert reading swarm facts with list of nodes option diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml index 5769ff1c..6407d95b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml index 14261433..8684ca11 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_prune/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_prune/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_prune/tasks/main.yml index 799f1788..8c1309bc 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_prune/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_prune/tasks/main.yml @@ -16,33 +16,47 @@ - block: # Create objects to be pruned - - docker_container: + - name: Create container (without volume) + docker_container: name: "{{ cname }}" image: "{{ docker_test_image_hello_world }}" state: present register: container - - docker_network: + - name: Create network + docker_network: name: "{{ nname }}" state: present register: network - - docker_volume: + - name: Create named volume + docker_volume: name: "{{ vname }}" state: present register: volume + - name: Create anonymous volume + command: docker volume create + register: volume_anon + + - name: List volumes + command: docker volume list # Prune objects - - docker_prune: - containers: yes - images: yes - networks: yes - volumes: yes - builder_cache: yes + - name: Prune everything + docker_prune: + containers: true + images: true + networks: true + volumes: true + builder_cache: true register: result # Analyze result - - debug: var=result - - assert: + - name: Show results + debug: + var: result + - name: General checks + assert: that: + - result is changed # containers - container.container.Id in result.containers - "'containers_space_reclaimed' in result" @@ -51,19 +65,109 @@ # networks - network.network.Name in result.networks # volumes - - volume.volume.Name in result.volumes + - volume_anon.stdout in result.volumes - "'volumes_space_reclaimed' in result" # builder_cache - "'builder_cache_space_reclaimed' in result" + - name: API-version specific volumes check (API version before 1.42) + assert: + that: + # For API version 1.41 and before, pruning always considers all volumes + - volume.volume.Name in result.volumes + when: docker_api_version is version('1.42', '<') + - name: API-version specific volumes check (API version 1.42+) + assert: + that: + # For API version 1.41 and before, pruning considers only anonymous volumes, + # so our named container is not removed + - volume.volume.Name not in result.volumes + when: docker_api_version is version('1.42', '>=') + + # Prune objects again + - name: Prune everything again (should have no change) + docker_prune: + containers: true + images: true + networks: true + volumes: true + builder_cache: true + register: result + + # Analyze result + - name: Show results + debug: + var: result + - name: General checks + assert: + that: + - result is not changed + # containers + - result.containers == [] + - result.containers_space_reclaimed == 0 + # images + - result.images == [] + - result.images_space_reclaimed == 0 + # networks + - result.networks == [] + # volumes + - result.volumes == [] + # builder_cache + - result.builder_cache_space_reclaimed == 0 # Test with filters - - docker_prune: - images: yes + - name: Prune with filters + docker_prune: + images: true images_filters: dangling: true register: result - - debug: var=result + - name: Show results + debug: + var: result + + - name: Prune build cache (API version 1.39+) + when: docker_api_version is version('1.39', '>=') + block: + - name: Prune build cache with option + docker_prune: + builder_cache: true + builder_cache_all: true + builder_cache_filters: + until: 10m + builder_cache_keep_storage: 1MB + register: result + + - name: Show results + debug: + var: result + + - name: Check results + assert: + that: + - "'builder_cache_space_reclaimed' in result" + - "'builder_cache_caches_deleted' in result" + + - name: Prune volumes with all filter (API version 1.42+) + when: docker_api_version is version('1.42', '>=') + block: + - name: Prune with filters + docker_prune: + volumes: true + volumes_filters: + all: true + register: result + + - name: Show results + debug: + var: result + + - name: Check results + assert: + that: + - result is changed + - volume.volume.Name in result.volumes + - "'volumes_space_reclaimed' in result" when: docker_api_version is version('1.25', '>=') diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml index 2650229d..9eeb6626 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_secret/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_secret/tasks/test_secrets.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_secret/tasks/test_secrets.yml index 926aaec3..2615b640 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_secret/tasks/test_secrets.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_secret/tasks/test_secrets.yml @@ -17,7 +17,7 @@ - name: Parameter name should be required docker_secret: state: present - ignore_errors: yes + ignore_errors: true register: output - name: assert failure when called with no name @@ -30,7 +30,7 @@ docker_secret: name: foo state: present - ignore_errors: yes + ignore_errors: true register: output - name: assert failure when called with no data @@ -53,7 +53,7 @@ - name: Inspect secret command: "docker secret inspect {{ secret_id }}" register: inspect - ignore_errors: yes + ignore_errors: true - debug: var=inspect @@ -132,7 +132,7 @@ - name: Check that secret is removed command: "docker secret inspect {{ secret_id }}" register: output - ignore_errors: yes + ignore_errors: true - name: assert secret was removed assert: @@ -156,7 +156,7 @@ - name: Inspect secret command: "docker secret inspect {{ secret_id }}" register: inspect - ignore_errors: yes + ignore_errors: true - debug: var=inspect @@ -198,7 +198,7 @@ - name: Check that secret is removed command: "docker secret inspect {{ original_output.secret_id }}" register: output - ignore_errors: yes + ignore_errors: true - name: assert secret was removed assert: @@ -208,7 +208,7 @@ - name: Check that secret is removed command: "docker secret inspect {{ new_output.secret_id }}" register: output - ignore_errors: yes + ignore_errors: true - name: assert secret was removed assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack/tasks/test_stack.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack/tasks/test_stack.yml index c5d1838b..9f2d170e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack/tasks/test_stack.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack/tasks/test_stack.yml @@ -22,7 +22,7 @@ register: output docker_stack: state: present - ignore_errors: yes + ignore_errors: true - name: assert failure when name not set assert: @@ -34,7 +34,7 @@ register: output docker_stack: name: test_stack - ignore_errors: yes + ignore_errors: true - name: assert failure when compose not set assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml index 19550154..cca26c80 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml +++ b/openshift/release/ansible/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: @@ -69,7 +69,6 @@ that: - 'output.results | type_debug == "list"' - 'output.results[0].Name == "test_stack"' - - 'output.results[0].Orchestrator == "Swarm"' - 'output.results[0].Services == "1"' always: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml index 30b5ca9e..cb905d5c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml index e7ff3d68..13f97ae2 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/cleanup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/cleanup.yml index c49de861..944e795c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/cleanup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/cleanup.yml @@ -7,7 +7,7 @@ docker_swarm: state: absent force: true - ignore_errors: yes + ignore_errors: true register: leave_swarm - name: CLEANUP | Kill Docker and cleanup @@ -15,7 +15,7 @@ block: - name: CLEANUP | Kill docker daemon command: systemctl kill -s 9 docker - become: yes + become: true - name: CLEANUP | Clear out /var/lib/docker shell: rm -rf /var/lib/docker/* @@ -24,7 +24,7 @@ service: name: docker state: started - become: yes + become: true - name: CLEANUP | Wait for docker daemon to be fully started command: docker ps diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml index 16f68153..f2b90167 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml index f55df21f..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/basic.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/basic.yml index 275ff16b..79d524e5 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/basic.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/basic.yml @@ -12,7 +12,7 @@ - name: Test parameters with state=join docker_swarm: state: join - ignore_errors: yes + ignore_errors: true register: output - name: assert failure when called with state=join and no remote_addrs,join_token @@ -24,7 +24,7 @@ - name: Test parameters with state=remove docker_swarm: state: remove - ignore_errors: yes + ignore_errors: true register: output - name: assert failure when called with state=remove and no node_id @@ -41,47 +41,47 @@ docker_swarm: state: present advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: Create a Swarm cluster docker_swarm: state: present advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" - diff: yes + diff: true register: output_2 - name: Create a Swarm cluster (idempotent) docker_swarm: state: present advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" - diff: yes + diff: true register: output_3 - name: Create a Swarm cluster (idempotent, check mode) docker_swarm: state: present advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: Create a Swarm cluster (force re-create) docker_swarm: state: present advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" - force: yes - diff: yes + force: true + diff: true register: output_5 - name: Create a Swarm cluster (force re-create, check mode) docker_swarm: state: present advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" - force: yes - check_mode: yes - diff: yes + force: true + check_mode: true + diff: true register: output_6 - name: assert changed when create a new swarm cluster @@ -117,30 +117,30 @@ docker_swarm: state: absent force: true - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: Remove a Swarm cluster docker_swarm: state: absent force: true - diff: yes + diff: true register: output_2 - name: Remove a Swarm cluster (idempotent) docker_swarm: state: absent force: true - diff: yes + diff: true register: output_3 - name: Remove a Swarm cluster (idempotent, check mode) docker_swarm: state: absent force: true - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: assert changed when remove a swarm cluster diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/options.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/options.yml index 6ff4ceac..f88aa3f4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/options.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/options.yml @@ -11,7 +11,7 @@ state: present advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" name: default - diff: yes + diff: true #################################################################### ## autolock_managers ############################################### @@ -20,63 +20,63 @@ - name: autolock_managers (check mode) docker_swarm: state: present - autolock_managers: yes - check_mode: yes - diff: yes + autolock_managers: true + check_mode: true + diff: true register: output_1 - ignore_errors: yes + ignore_errors: true - name: autolock_managers docker_swarm: state: present - autolock_managers: yes - diff: yes + autolock_managers: true + diff: true register: output_2 - ignore_errors: yes + ignore_errors: true - name: autolock_managers (idempotent) docker_swarm: state: present - autolock_managers: yes - diff: yes + autolock_managers: true + diff: true register: output_3 - ignore_errors: yes + ignore_errors: true - name: autolock_managers (idempotent, check mode) docker_swarm: state: present - autolock_managers: yes - check_mode: yes - diff: yes + autolock_managers: true + check_mode: true + diff: true register: output_4 - ignore_errors: yes + ignore_errors: true - name: autolock_managers (change, check mode) docker_swarm: state: present - autolock_managers: no - check_mode: yes - diff: yes + autolock_managers: false + check_mode: true + diff: true register: output_5 - ignore_errors: yes + ignore_errors: true - name: autolock_managers (change) docker_swarm: state: present - autolock_managers: no - diff: yes + autolock_managers: false + diff: true register: output_6 - ignore_errors: yes + ignore_errors: true - name: autolock_managers (force new swarm) docker_swarm: state: present - force: yes + force: true advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" - autolock_managers: yes - diff: yes + autolock_managers: true + diff: true register: output_7 - ignore_errors: yes + ignore_errors: true - name: assert autolock_managers changes assert: @@ -131,52 +131,52 @@ docker_swarm: state: present ca_force_rotate: 1 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - ignore_errors: yes + ignore_errors: true - name: ca_force_rotate docker_swarm: state: present ca_force_rotate: 1 - diff: yes + diff: true register: output_2 - ignore_errors: yes + ignore_errors: true - name: ca_force_rotate (idempotent) docker_swarm: state: present ca_force_rotate: 1 - diff: yes + diff: true register: output_3 - ignore_errors: yes + ignore_errors: true - name: ca_force_rotate (idempotent, check mode) docker_swarm: state: present ca_force_rotate: 1 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - ignore_errors: yes + ignore_errors: true - name: ca_force_rotate (change, check mode) docker_swarm: state: present ca_force_rotate: 0 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - ignore_errors: yes + ignore_errors: true - name: ca_force_rotate (change) docker_swarm: state: present ca_force_rotate: 0 - diff: yes + diff: true register: output_6 - ignore_errors: yes + ignore_errors: true - name: assert ca_force_rotate changes assert: @@ -221,45 +221,45 @@ docker_swarm: state: present dispatcher_heartbeat_period: 10 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: dispatcher_heartbeat_period docker_swarm: state: present dispatcher_heartbeat_period: 10 - diff: yes + diff: true register: output_2 - name: dispatcher_heartbeat_period (idempotent) docker_swarm: state: present dispatcher_heartbeat_period: 10 - diff: yes + diff: true register: output_3 - name: dispatcher_heartbeat_period (idempotent, check mode) docker_swarm: state: present dispatcher_heartbeat_period: 10 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: dispatcher_heartbeat_period (change, check mode) docker_swarm: state: present dispatcher_heartbeat_period: 23 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: dispatcher_heartbeat_period (change) docker_swarm: state: present dispatcher_heartbeat_period: 23 - diff: yes + diff: true register: output_6 - name: assert dispatcher_heartbeat_period changes @@ -298,45 +298,45 @@ docker_swarm: state: present election_tick: 20 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: election_tick docker_swarm: state: present election_tick: 20 - diff: yes + diff: true register: output_2 - name: election_tick (idempotent) docker_swarm: state: present election_tick: 20 - diff: yes + diff: true register: output_3 - name: election_tick (idempotent, check mode) docker_swarm: state: present election_tick: 20 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: election_tick (change, check mode) docker_swarm: state: present election_tick: 5 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: election_tick (change) docker_swarm: state: present election_tick: 5 - diff: yes + diff: true register: output_6 - name: assert election_tick changes @@ -375,45 +375,45 @@ docker_swarm: state: present heartbeat_tick: 2 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: heartbeat_tick docker_swarm: state: present heartbeat_tick: 2 - diff: yes + diff: true register: output_2 - name: heartbeat_tick (idempotent) docker_swarm: state: present heartbeat_tick: 2 - diff: yes + diff: true register: output_3 - name: heartbeat_tick (idempotent, check mode) docker_swarm: state: present heartbeat_tick: 2 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: heartbeat_tick (change, check mode) docker_swarm: state: present heartbeat_tick: 3 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: heartbeat_tick (change) docker_swarm: state: present heartbeat_tick: 3 - diff: yes + diff: true register: output_6 - name: assert heartbeat_tick changes @@ -451,45 +451,45 @@ docker_swarm: state: present keep_old_snapshots: 1 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: keep_old_snapshots docker_swarm: state: present keep_old_snapshots: 1 - diff: yes + diff: true register: output_2 - name: keep_old_snapshots (idempotent) docker_swarm: state: present keep_old_snapshots: 1 - diff: yes + diff: true register: output_3 - name: keep_old_snapshots (idempotent, check mode) docker_swarm: state: present keep_old_snapshots: 1 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: keep_old_snapshots (change, check mode) docker_swarm: state: present keep_old_snapshots: 2 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: keep_old_snapshots (change) docker_swarm: state: present keep_old_snapshots: 2 - diff: yes + diff: true register: output_6 - name: assert keep_old_snapshots changes @@ -529,10 +529,10 @@ labels: a: v1 b: v2 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - ignore_errors: yes + ignore_errors: true - name: labels docker_swarm: @@ -540,9 +540,9 @@ labels: a: v1 b: v2 - diff: yes + diff: true register: output_2 - ignore_errors: yes + ignore_errors: true - name: labels (idempotent) docker_swarm: @@ -550,9 +550,9 @@ labels: a: v1 b: v2 - diff: yes + diff: true register: output_3 - ignore_errors: yes + ignore_errors: true - name: labels (idempotent, check mode) docker_swarm: @@ -560,10 +560,10 @@ labels: a: v1 b: v2 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - ignore_errors: yes + ignore_errors: true - name: labels (change, check mode) docker_swarm: @@ -571,10 +571,10 @@ labels: a: v1 c: v3 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - ignore_errors: yes + ignore_errors: true - name: labels (change) docker_swarm: @@ -582,24 +582,24 @@ labels: a: v1 c: v3 - diff: yes + diff: true register: output_6 - ignore_errors: yes + ignore_errors: true - name: labels (not specifying, check mode) docker_swarm: state: present - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_7 - ignore_errors: yes + ignore_errors: true - name: labels (not specifying) docker_swarm: state: present - diff: yes + diff: true register: output_8 - ignore_errors: yes + ignore_errors: true - name: labels (idempotency, check that labels are still there) docker_swarm: @@ -607,43 +607,43 @@ labels: a: v1 c: v3 - diff: yes + diff: true register: output_9 - ignore_errors: yes + ignore_errors: true - name: labels (empty, check mode) docker_swarm: state: present labels: {} - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_10 - ignore_errors: yes + ignore_errors: true - name: labels (empty) docker_swarm: state: present labels: {} - diff: yes + diff: true register: output_11 - ignore_errors: yes + ignore_errors: true - name: labels (empty, idempotent, check mode) docker_swarm: state: present labels: {} - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_12 - ignore_errors: yes + ignore_errors: true - name: labels (empty, idempotent) docker_swarm: state: present labels: {} - diff: yes + diff: true register: output_13 - ignore_errors: yes + ignore_errors: true - name: assert labels changes assert: @@ -715,45 +715,45 @@ docker_swarm: state: present log_entries_for_slow_followers: 42 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: log_entries_for_slow_followers docker_swarm: state: present log_entries_for_slow_followers: 42 - diff: yes + diff: true register: output_2 - name: log_entries_for_slow_followers (idempotent) docker_swarm: state: present log_entries_for_slow_followers: 42 - diff: yes + diff: true register: output_3 - name: log_entries_for_slow_followers (idempotent, check mode) docker_swarm: state: present log_entries_for_slow_followers: 42 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: log_entries_for_slow_followers (change, check mode) docker_swarm: state: present log_entries_for_slow_followers: 23 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: log_entries_for_slow_followers (change) docker_swarm: state: present log_entries_for_slow_followers: 23 - diff: yes + diff: true register: output_6 - name: assert log_entries_for_slow_followers changes @@ -791,15 +791,15 @@ docker_swarm: state: present name: default - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: name (idempotent) docker_swarm: state: present name: default - diff: yes + diff: true register: output_2 # The name 'default' is hardcoded in docker swarm. Trying to change @@ -809,9 +809,9 @@ docker_swarm: state: present name: foobar - diff: yes + diff: true register: output_3 - ignore_errors: yes + ignore_errors: true - name: assert name changes assert: @@ -833,45 +833,45 @@ docker_swarm: state: present node_cert_expiry: 7896000000000000 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: node_cert_expiry docker_swarm: state: present node_cert_expiry: 7896000000000000 - diff: yes + diff: true register: output_2 - name: node_cert_expiry (idempotent) docker_swarm: state: present node_cert_expiry: 7896000000000000 - diff: yes + diff: true register: output_3 - name: node_cert_expiry (idempotent, check mode) docker_swarm: state: present node_cert_expiry: 7896000000000000 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: node_cert_expiry (change, check mode) docker_swarm: state: present node_cert_expiry: 8766000000000000 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: node_cert_expiry (change) docker_swarm: state: present node_cert_expiry: 8766000000000000 - diff: yes + diff: true register: output_6 - name: assert node_cert_expiry changes @@ -908,31 +908,31 @@ - name: rotate_manager_token (true, check mode) docker_swarm: state: present - rotate_manager_token: yes - check_mode: yes - diff: yes + rotate_manager_token: true + check_mode: true + diff: true register: output_1 - name: rotate_manager_token (true) docker_swarm: state: present - rotate_manager_token: yes - diff: yes + rotate_manager_token: true + diff: true register: output_2 - name: rotate_manager_token (false, idempotent) docker_swarm: state: present - rotate_manager_token: no - diff: yes + rotate_manager_token: false + diff: true register: output_3 - name: rotate_manager_token (false, check mode) docker_swarm: state: present - rotate_manager_token: no - check_mode: yes - diff: yes + rotate_manager_token: false + check_mode: true + diff: true register: output_4 - name: assert rotate_manager_token changes @@ -961,31 +961,31 @@ - name: rotate_worker_token (true, check mode) docker_swarm: state: present - rotate_worker_token: yes - check_mode: yes - diff: yes + rotate_worker_token: true + check_mode: true + diff: true register: output_1 - name: rotate_worker_token (true) docker_swarm: state: present - rotate_worker_token: yes - diff: yes + rotate_worker_token: true + diff: true register: output_2 - name: rotate_worker_token (false, idempotent) docker_swarm: state: present - rotate_worker_token: no - diff: yes + rotate_worker_token: false + diff: true register: output_3 - name: rotate_worker_token (false, check mode) docker_swarm: state: present - rotate_worker_token: no - check_mode: yes - diff: yes + rotate_worker_token: false + check_mode: true + diff: true register: output_4 - name: assert rotate_worker_token changes @@ -1015,45 +1015,45 @@ docker_swarm: state: present snapshot_interval: 12345 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: snapshot_interval docker_swarm: state: present snapshot_interval: 12345 - diff: yes + diff: true register: output_2 - name: snapshot_interval (idempotent) docker_swarm: state: present snapshot_interval: 12345 - diff: yes + diff: true register: output_3 - name: snapshot_interval (idempotent, check mode) docker_swarm: state: present snapshot_interval: 12345 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: snapshot_interval (change, check mode) docker_swarm: state: present snapshot_interval: 54321 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: snapshot_interval (change) docker_swarm: state: present snapshot_interval: 54321 - diff: yes + diff: true register: output_6 - name: assert snapshot_interval changes @@ -1091,45 +1091,45 @@ docker_swarm: state: present task_history_retention_limit: 23 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_1 - name: task_history_retention_limit docker_swarm: state: present task_history_retention_limit: 23 - diff: yes + diff: true register: output_2 - name: task_history_retention_limit (idempotent) docker_swarm: state: present task_history_retention_limit: 23 - diff: yes + diff: true register: output_3 - name: task_history_retention_limit (idempotent, check mode) docker_swarm: state: present task_history_retention_limit: 23 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_4 - name: task_history_retention_limit (change, check mode) docker_swarm: state: present task_history_retention_limit: 7 - check_mode: yes - diff: yes + check_mode: true + diff: true register: output_5 - name: task_history_retention_limit (change) docker_swarm: state: present task_history_retention_limit: 7 - diff: yes + diff: true register: output_6 - name: assert task_history_retention_limit changes diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/remote-addr-pool.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/remote-addr-pool.yml index 8e229f5a..66f422e5 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/remote-addr-pool.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm/tasks/tests/remote-addr-pool.yml @@ -15,18 +15,18 @@ state: present default_addr_pool: - "2.0.0.0/16" - diff: yes + diff: true register: output_1 - ignore_errors: yes + ignore_errors: true - name: default_addr_pool (idempotent) docker_swarm: state: present default_addr_pool: - "2.0.0.0/16" - diff: yes + diff: true register: output_2 - ignore_errors: yes + ignore_errors: true - name: assert default_addr_pool assert: @@ -52,27 +52,27 @@ - name: Leave swarm docker_swarm: state: absent - force: yes + force: true default_addr_pool: - "2.0.0.0/16" - diff: yes + diff: true - name: subnet_size docker_swarm: state: present - force: yes + force: true subnet_size: 26 - diff: yes + diff: true register: output_1 - ignore_errors: yes + ignore_errors: true - name: subnet_size (idempotent) docker_swarm: state: present subnet_size: 26 - diff: yes + diff: true register: output_2 - ignore_errors: yes + ignore_errors: true - name: assert subnet_size assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml index 5769ff1c..6407d95b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml index a521a689..a2cd5f8f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_info/tasks/test_swarm_info.yml @@ -11,10 +11,10 @@ - name: Try to get docker_swarm_info when docker is not running in swarm mode docker_swarm_info: - ignore_errors: yes + 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' @@ -55,10 +55,10 @@ - name: Try to get docker_swarm_info and list of nodes when docker is running in swarm mode and as manager docker_swarm_info: - nodes: yes + 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' @@ -77,8 +77,8 @@ - name: Try to get docker_swarm_info and verbose list of nodes when docker is running in swarm mode and as manager docker_swarm_info: - nodes: yes - verbose_output: yes + nodes: true + verbose_output: true register: output - name: assert reading swarm facts with list of nodes and versbose output options @@ -96,7 +96,7 @@ - name: Try to get docker_swarm_info and list of nodes with filters providing existing node name docker_swarm_info: - nodes: yes + nodes: true nodes_filters: name: "{{ localnodename }}" register: output @@ -119,7 +119,7 @@ - name: Try to get docker_swarm_info and list of nodes with filters providing non-existing random node name docker_swarm_info: - nodes: yes + nodes: true nodes_filters: name: "{{ randomnodename }}" register: output @@ -138,9 +138,9 @@ - name: Try to get docker_swarm_info and swarm_unlock_key on non a unlocked swarm docker_swarm_info: - unlock_key: yes + unlock_key: true register: output - ignore_errors: yes + ignore_errors: true - name: assert reading swarm facts and non existing swarm unlock key assert: @@ -163,13 +163,13 @@ advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}" autolock_managers: true register: autolock_managers_update_output - ignore_errors: yes + ignore_errors: true - name: Try to get docker_swarm_info and swarm_unlock_key docker_swarm_info: - unlock_key: yes + unlock_key: true register: output - ignore_errors: yes + ignore_errors: true - name: assert reading swarm facts and swarm unlock key assert: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml index 5769ff1c..6407d95b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml index ffc04719..bbea0a03 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/main.yml +++ b/openshift/release/ansible/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 @@ -39,44 +41,44 @@ name: "{{ item }}" state: absent loop: "{{ service_names }}" - ignore_errors: yes + ignore_errors: true - name: Make sure all networks are removed docker_network: name: "{{ item }}" state: absent - force: yes + force: true loop: "{{ network_names }}" - ignore_errors: yes + ignore_errors: true - name: Make sure all configs are removed docker_config: name: "{{ item }}" state: absent - force: yes + force: true loop: "{{ config_names }}" - ignore_errors: yes + ignore_errors: true - name: Make sure all volumes are removed docker_volume: name: "{{ item }}" state: absent loop: "{{ volume_names }}" - ignore_errors: yes + ignore_errors: true - name: Make sure all secrets are removed docker_secret: name: "{{ item }}" state: absent - force: yes + force: true loop: "{{ secret_names }}" - ignore_errors: yes + ignore_errors: true - name: Make sure swarm is removed docker_swarm: state: absent - force: yes - ignore_errors: yes + force: true + ignore_errors: true when: docker_py_version is version('2.0.2', '>=') and docker_api_version is version('1.25', '>=') - fail: msg="Too old docker / docker-py version to run docker_swarm_service tests!" diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml index f1008869..9f2fa8c3 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml @@ -44,32 +44,32 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" filename: "/tmp/{{ config_name_1 }}.txt" register: configs_1 - ignore_errors: yes + ignore_errors: true - name: configs (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_name: "{{ config_name_1 }}" filename: "/tmp/{{ config_name_1 }}.txt" register: configs_2 - ignore_errors: yes + ignore_errors: true - name: configs (add) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" @@ -78,13 +78,13 @@ - config_name: "{{ config_name_2 }}" filename: "/tmp/{{ config_name_2 }}.txt" register: configs_3 - ignore_errors: yes + ignore_errors: true - name: configs (add idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_name: "{{ config_name_1 }}" @@ -93,13 +93,13 @@ config_name: "{{ config_name_2 }}" filename: "/tmp/{{ config_name_2 }}.txt" register: configs_4 - ignore_errors: yes + ignore_errors: true - name: configs (add idempotency no id) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_name: "{{ config_name_1 }}" @@ -107,13 +107,13 @@ - config_name: "{{ config_name_2 }}" filename: "/tmp/{{ config_name_2 }}.txt" register: configs_5 - ignore_errors: yes + ignore_errors: true - name: configs (add idempotency no id and re-ordered) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_name: "{{ config_name_2 }}" @@ -121,39 +121,39 @@ - config_name: "{{ config_name_1 }}" filename: "/tmp/{{ config_name_1 }}.txt" register: configs_6 - ignore_errors: yes + ignore_errors: true - name: configs (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: [] register: configs_7 - ignore_errors: yes + ignore_errors: true - name: configs (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: [] register: configs_8 - ignore_errors: yes + ignore_errors: true - name: rolling configs docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_name: "{{ config_name_3 }}_v1" filename: "/run/configs/{{ config_name_3 }}.txt" register: configs_9 - ignore_errors: yes + ignore_errors: true - name: update rolling config docker_config: @@ -163,25 +163,25 @@ rolling_versions: true register: configs_10 when: docker_api_version is version('1.30', '>=') and docker_py_version is version('2.6.0', '>=') - ignore_errors: yes + ignore_errors: true - name: rolling configs service update docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_name: "{{ config_name_3 }}_v2" filename: "/run/configs/{{ config_name_3 }}.txt" register: configs_11 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -212,72 +212,72 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" uid: 1000 register: configs_1 - ignore_errors: yes + ignore_errors: true - name: configs (uid int idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" uid: 1000 register: configs_2 - ignore_errors: yes + ignore_errors: true - name: configs (uid int change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" uid: 1002 register: configs_3 - ignore_errors: yes + ignore_errors: true - name: configs (uid str) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" uid: "1001" register: configs_4 - ignore_errors: yes + ignore_errors: true - name: configs (uid str idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" uid: "1001" register: configs_5 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: - configs_1 is changed @@ -302,72 +302,72 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" gid: 1000 register: configs_1 - ignore_errors: yes + ignore_errors: true - name: configs (gid int idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" gid: 1000 register: configs_2 - ignore_errors: yes + ignore_errors: true - name: configs (gid int change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" gid: 1002 register: configs_3 - ignore_errors: yes + ignore_errors: true - name: configs (gid str) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" gid: "1001" register: configs_4 - ignore_errors: yes + ignore_errors: true - name: configs (gid str idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" gid: "1001" register: configs_5 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: - configs_1 is changed @@ -391,46 +391,46 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" mode: 0600 register: configs_1 - ignore_errors: yes + ignore_errors: true - name: configs (mode idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" mode: 0600 register: configs_2 - ignore_errors: yes + ignore_errors: true - name: configs (mode change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' configs: - config_id: "{{ config_result_1.config_id|default('') }}" config_name: "{{ config_name_1 }}" mode: 0777 register: configs_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: - configs_1 is changed @@ -452,12 +452,12 @@ docker_config: name: "{{ config_name }}" state: absent - force: yes + force: true loop: - "{{ config_name_1 }}" - "{{ config_name_2 }}" - "{{ config_name_3 }}" loop_control: loop_var: config_name - ignore_errors: yes + ignore_errors: true when: docker_api_version is version('1.30', '>=') and docker_py_version is version('2.6.0', '>=') diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml index 9408196c..22947fbd 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml @@ -19,7 +19,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: json-file @@ -29,7 +29,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: json-file @@ -39,7 +39,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: syslog @@ -49,7 +49,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -65,7 +65,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: json-file @@ -78,7 +78,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: json-file @@ -91,7 +91,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: json-file @@ -105,7 +105,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: json-file @@ -116,7 +116,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' logging: driver: json-file @@ -127,7 +127,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml index a2bf4d7c..a1e185e1 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml @@ -8,7 +8,7 @@ register: output docker_swarm_service: state: present - ignore_errors: yes + ignore_errors: true - name: assert failure when name not set assert: @@ -33,7 +33,7 @@ name: test_service endpoint_mode: dnsrr image: "{{ docker_test_image_busybox }}" - resolve_image: no + resolve_image: false args: - sleep - "3600" @@ -48,7 +48,7 @@ docker_swarm_service: name: test_service image: "{{ docker_test_image_busybox }}" - resolve_image: no + resolve_image: false args: - sleep - "1800" @@ -63,7 +63,7 @@ docker_swarm_service: name: test_service image: "{{ docker_test_image_busybox }}" - resolve_image: no + resolve_image: false endpoint_mode: vip mode: global args: @@ -80,7 +80,7 @@ docker_swarm_service: name: test_service image: "{{ docker_test_image_busybox }}" - resolve_image: no + resolve_image: false mode: global args: - sleep diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml index c90b77c4..7605d9fc 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml @@ -31,7 +31,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -43,7 +43,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -55,7 +55,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -70,7 +70,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "/tmp/" @@ -85,7 +85,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: [] register: mounts_5 @@ -94,7 +94,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: [] register: mounts_6 @@ -103,7 +103,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -122,7 +122,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -135,7 +135,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -147,7 +147,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -159,7 +159,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -175,7 +175,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "/tmp" @@ -189,7 +189,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "/tmp" @@ -202,7 +202,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "/tmp" @@ -215,7 +215,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -231,7 +231,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -247,7 +247,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -262,7 +262,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -276,7 +276,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -292,7 +292,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -306,7 +306,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -319,7 +319,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -332,7 +332,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -348,7 +348,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -364,7 +364,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -380,7 +380,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -394,7 +394,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -410,7 +410,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -418,13 +418,13 @@ type: "tmpfs" tmpfs_size: "50M" register: mounts_tmpfs_size_1 - ignore_errors: yes + ignore_errors: true - name: mounts.tmpfs_size (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -432,13 +432,13 @@ type: "tmpfs" tmpfs_size: "50M" register: mounts_tmpfs_size_2 - ignore_errors: yes + ignore_errors: true - name: mounts.tmpfs_size (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -446,13 +446,13 @@ type: "tmpfs" tmpfs_size: "25M" register: mounts_tmpfs_size_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -474,7 +474,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -482,13 +482,13 @@ type: "tmpfs" tmpfs_mode: 0444 register: mounts_tmpfs_mode_1 - ignore_errors: yes + ignore_errors: true - name: mounts.tmpfs_mode (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -496,13 +496,13 @@ type: "tmpfs" tmpfs_mode: 0444 register: mounts_tmpfs_mode_2 - ignore_errors: yes + ignore_errors: true - name: mounts.tmpfs_mode (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "{{ volume_name_1 }}" @@ -510,13 +510,13 @@ type: "tmpfs" tmpfs_mode: 0777 register: mounts_tmpfs_mode_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -538,45 +538,45 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "" target: "/tmp/{{ volume_name_1 }}" type: "tmpfs" register: mounts_tmpfs_source_1 - ignore_errors: yes + ignore_errors: true - name: mounts.source (empty for tmpfs idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - source: "" target: "/tmp/{{ volume_name_1 }}" type: "tmpfs" register: mounts_tmpfs_source_2 - ignore_errors: yes + ignore_errors: true - name: mounts.source (not specified for tmpfs idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mounts: - target: "/tmp/{{ volume_name_1 }}" type: "tmpfs" register: mounts_tmpfs_source_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -603,4 +603,4 @@ - "{{ volume_name_2 }}" loop_control: loop_var: volume_name - ignore_errors: yes + ignore_errors: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml index 8e596a33..f57824f9 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml @@ -32,7 +32,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "{{ network_name_1 }}" @@ -42,7 +42,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "{{ network_name_1 }}" @@ -52,7 +52,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -62,7 +62,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "{{ network_name_1 }}" @@ -73,7 +73,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "{{ network_name_1 }}" @@ -84,7 +84,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -95,7 +95,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -106,7 +106,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "{{ network_name_2 }}" @@ -117,7 +117,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "{{ network_name_2 }}" @@ -127,7 +127,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "{{ network_name_2 }}" @@ -137,7 +137,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: [] register: networks_11 @@ -146,7 +146,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: [] register: networks_12 @@ -155,40 +155,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - "idonotexist" register: networks_13 - ignore_errors: yes + ignore_errors: true - name: networks (missing dict key name) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - foo: "bar" register: networks_14 - ignore_errors: yes + ignore_errors: true - name: networks (invalid list type) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - [1, 2, 3] register: networks_15 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -231,7 +231,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -244,7 +244,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -257,7 +257,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -270,7 +270,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -282,7 +282,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -293,7 +293,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -304,20 +304,20 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" aliases: - [1, 2, 3] register: networks_aliases_7 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -338,7 +338,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -351,7 +351,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -364,7 +364,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -377,7 +377,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -389,19 +389,19 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" options: [1, 2, 3] register: networks_options_5 - ignore_errors: yes + ignore_errors: true - name: networks.options (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -412,7 +412,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' networks: - name: "{{ network_name_1 }}" @@ -423,7 +423,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -444,10 +444,10 @@ docker_network: name: "{{ network_name }}" state: absent - force: yes + force: true loop: - "{{ network_name_1 }}" - "{{ network_name_2 }}" loop_control: loop_var: network_name - ignore_errors: yes + ignore_errors: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml index fe7b87e1..7b206698 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml @@ -19,7 +19,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false args: - sleep - "3600" @@ -29,7 +29,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false args: - sleep - "3600" @@ -39,7 +39,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false args: - sleep - "3400" @@ -49,7 +49,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false args: [] register: args_4 @@ -57,7 +57,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false args: [] register: args_5 @@ -65,7 +65,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -83,7 +83,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' register: command_1 @@ -91,7 +91,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' register: command_2 @@ -99,7 +99,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -c "sleep 10m"' register: command_3 @@ -107,7 +107,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: - "/bin/sh" - "-c" @@ -118,7 +118,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: [] register: command_5 @@ -126,7 +126,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: [] register: command_6 @@ -134,27 +134,27 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no - command: yes + resolve_image: false + command: true register: command_7 - ignore_errors: yes + ignore_errors: true - name: command (list failure) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: - "/bin/sh" - - yes + - true register: command_8 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -175,7 +175,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' container_labels: test_1: "1" @@ -186,7 +186,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' container_labels: test_1: "1" @@ -197,7 +197,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' container_labels: test_1: "1" @@ -208,7 +208,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' container_labels: {} register: container_labels_4 @@ -217,7 +217,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' container_labels: {} register: container_labels_5 @@ -226,7 +226,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -244,75 +244,75 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns: - 1.1.1.1 - 8.8.8.8 register: dns_1 - ignore_errors: yes + ignore_errors: true - name: dns (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns: - 1.1.1.1 - 8.8.8.8 register: dns_2 - ignore_errors: yes + ignore_errors: true - name: dns_servers (changed order) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns: - 8.8.8.8 - 1.1.1.1 register: dns_3 - ignore_errors: yes + ignore_errors: true - name: dns_servers (changed elements) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns: - 8.8.8.8 - 9.9.9.9 register: dns_4 - ignore_errors: yes + ignore_errors: true - name: dns_servers (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns: [] register: dns_5 - ignore_errors: yes + ignore_errors: true - name: dns_servers (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns: [] register: dns_6 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -337,75 +337,75 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_options: - "timeout:10" - rotate register: dns_options_1 - ignore_errors: yes + ignore_errors: true - name: dns_options (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_options: - "timeout:10" - rotate register: dns_options_2 - ignore_errors: yes + ignore_errors: true - name: dns_options (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_options: - "timeout:10" - no-check-names register: dns_options_3 - ignore_errors: yes + ignore_errors: true - name: dns_options (order idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_options: - no-check-names - "timeout:10" register: dns_options_4 - ignore_errors: yes + ignore_errors: true - name: dns_options (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_options: [] register: dns_options_5 - ignore_errors: yes + ignore_errors: true - name: dns_options (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_options: [] register: dns_options_6 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -430,75 +430,75 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_search: - example.com - example.org register: dns_search_1 - ignore_errors: yes + ignore_errors: true - name: dns_search (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_search: - example.com - example.org register: dns_search_2 - ignore_errors: yes + ignore_errors: true - name: dns_search (different order) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_search: - example.org - example.com register: dns_search_3 - ignore_errors: yes + ignore_errors: true - name: dns_search (changed elements) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_search: - ansible.com - example.com register: dns_search_4 - ignore_errors: yes + ignore_errors: true - name: dns_search (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_search: [] register: dns_search_5 - ignore_errors: yes + ignore_errors: true - name: dns_search (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' dns_search: [] register: dns_search_6 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -523,37 +523,37 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' endpoint_mode: "dnsrr" register: endpoint_mode_1 - ignore_errors: yes + ignore_errors: true - name: endpoint_mode (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' endpoint_mode: "dnsrr" register: endpoint_mode_2 - ignore_errors: yes + ignore_errors: true - name: endpoint_mode (changes) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' endpoint_mode: "vip" register: endpoint_mode_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -575,7 +575,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' env: - "TEST1=val1" @@ -586,7 +586,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' env: TEST1: val1 @@ -597,7 +597,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' env: - "TEST1=val1" @@ -608,7 +608,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' env: - "TEST2=val3" @@ -619,7 +619,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' env: [] register: env_5 @@ -628,7 +628,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' env: [] register: env_6 @@ -637,28 +637,28 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env: TEST1: true register: env_7 - ignore_errors: yes + ignore_errors: true - name: env (fail invalid formatted string) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env: - "TEST1=val3" - "TEST2" register: env_8 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -687,7 +687,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env_files: - "{{ remote_tmp_dir }}/env-file-1" register: env_file_1 @@ -696,7 +696,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env_files: - "{{ remote_tmp_dir }}/env-file-1" register: env_file_2 @@ -705,7 +705,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env_files: - "{{ remote_tmp_dir }}/env-file-1" - "{{ remote_tmp_dir }}/env-file-2" @@ -715,7 +715,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env_files: - "{{ remote_tmp_dir }}/env-file-2" - "{{ remote_tmp_dir }}/env-file-1" @@ -725,7 +725,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env_files: - "{{ remote_tmp_dir }}/env-file-2" - "{{ remote_tmp_dir }}/env-file-1" @@ -735,7 +735,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env_files: [] register: env_file_6 @@ -743,7 +743,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false env_files: [] register: env_file_7 @@ -751,7 +751,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -771,33 +771,33 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' args: - sleep - "3600" - force_update: yes + force_update: true register: force_update_1 - ignore_errors: yes + ignore_errors: true - name: force_update (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' args: - sleep - "3600" - force_update: yes + force_update: true register: force_update_2 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -818,74 +818,74 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' groups: - "1234" - "5678" register: groups_1 - ignore_errors: yes + ignore_errors: true - name: groups (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' groups: - "1234" - "5678" register: groups_2 - ignore_errors: yes + ignore_errors: true - name: groups (order idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' groups: - "5678" - "1234" register: groups_3 - ignore_errors: yes + ignore_errors: true - name: groups (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' groups: - "1234" register: groups_4 - ignore_errors: yes + ignore_errors: true - name: groups (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' groups: [] register: groups_5 - ignore_errors: yes + ignore_errors: true - name: groups (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' groups: [] register: groups_6 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -910,7 +910,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: test: @@ -922,13 +922,13 @@ retries: 2 start_period: 20s register: healthcheck_1 - ignore_errors: yes + ignore_errors: true - name: healthcheck (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: test: @@ -940,13 +940,13 @@ retries: 2 start_period: 20s register: healthcheck_2 - ignore_errors: yes + ignore_errors: true - name: healthcheck (changed) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: test: @@ -957,79 +957,79 @@ interval: 0h1m2s3ms4us retries: 3 register: healthcheck_3 - ignore_errors: yes + ignore_errors: true - name: healthcheck (disabled) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: test: - NONE register: healthcheck_4 - ignore_errors: yes + ignore_errors: true - name: healthcheck (disabled, idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: test: - NONE register: healthcheck_5 - ignore_errors: yes + ignore_errors: true - name: healthcheck (string in healthcheck test, changed) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: test: "sleep 1" register: healthcheck_6 - ignore_errors: yes + ignore_errors: true - name: healthcheck (string in healthcheck test, idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: test: "sleep 1" register: healthcheck_7 - ignore_errors: yes + ignore_errors: true - name: healthcheck (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: {} register: healthcheck_8 - ignore_errors: yes + ignore_errors: true - name: healthcheck (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' healthcheck: {} register: healthcheck_9 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1057,37 +1057,37 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' hostname: me.example.com register: hostname_1 - ignore_errors: yes + ignore_errors: true - name: hostname (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' hostname: me.example.com register: hostname_2 - ignore_errors: yes + ignore_errors: true - name: hostname (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' hostname: me.example.org register: hostname_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1109,42 +1109,42 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' hosts: example.com: 1.2.3.4 example.org: 4.3.2.1 register: hosts_1 - ignore_errors: yes + ignore_errors: true - name: hosts (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' hosts: example.com: 1.2.3.4 example.org: 4.3.2.1 register: hosts_2 - ignore_errors: yes + ignore_errors: true - name: hosts (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' hosts: example.com: 1.2.3.4 register: hosts_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1167,7 +1167,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' register: image_1 @@ -1175,7 +1175,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' register: image_2 @@ -1189,7 +1189,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1205,7 +1205,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' labels: test_1: "1" @@ -1216,7 +1216,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' labels: test_1: "1" @@ -1227,7 +1227,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' labels: test_1: "1" @@ -1239,7 +1239,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' labels: {} register: labels_4 @@ -1248,7 +1248,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' labels: {} register: labels_5 @@ -1257,7 +1257,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1275,7 +1275,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mode: "replicated" replicas: 1 @@ -1285,7 +1285,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mode: "replicated" replicas: 1 @@ -1295,7 +1295,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' mode: "global" replicas: 1 @@ -1305,7 +1305,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1321,7 +1321,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' stop_grace_period: 60s register: stop_grace_period_1 @@ -1330,7 +1330,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' stop_grace_period: 60s register: stop_grace_period_2 @@ -1339,7 +1339,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' stop_grace_period: 1m30s register: stop_grace_period_3 @@ -1348,7 +1348,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1364,37 +1364,37 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' stop_signal: "30" register: stop_signal_1 - ignore_errors: yes + ignore_errors: true - name: stop_signal (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' stop_signal: "30" register: stop_signal_2 - ignore_errors: yes + ignore_errors: true - name: stop_signal (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' stop_signal: "9" register: stop_signal_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1416,7 +1416,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: tcp @@ -1426,13 +1426,13 @@ published_port: 60002 target_port: 60002 register: publish_1 - ignore_errors: yes + ignore_errors: true - name: publish (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: udp @@ -1441,13 +1441,13 @@ - published_port: 60001 target_port: 60001 register: publish_2 - ignore_errors: yes + ignore_errors: true - name: publish (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: tcp @@ -1457,13 +1457,13 @@ published_port: 60001 target_port: 60001 register: publish_3 - ignore_errors: yes + ignore_errors: true - name: publish (mode) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: tcp @@ -1475,13 +1475,13 @@ target_port: 60001 mode: host register: publish_4 - ignore_errors: yes + ignore_errors: true - name: publish (mode idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: udp @@ -1493,33 +1493,33 @@ target_port: 60003 mode: host register: publish_5 - ignore_errors: yes + ignore_errors: true - name: publish (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: [] register: publish_6 - ignore_errors: yes + ignore_errors: true - name: publish (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: [] register: publish_7 - ignore_errors: yes + ignore_errors: true - name: publish (publishes the same port with both protocols) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: udp @@ -1531,7 +1531,7 @@ target_port: 60001 mode: host register: publish_8 - ignore_errors: yes + ignore_errors: true - name: gather service info docker_swarm_service_info: name: "{{ service_name }}" @@ -1541,14 +1541,14 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: udp target_port: 60001 mode: host register: publish_9 - ignore_errors: yes + ignore_errors: true - name: gather service info docker_swarm_service_info: name: "{{ service_name }}" @@ -1558,14 +1558,14 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' publish: - protocol: udp target_port: 60001 mode: host register: publish_10 - ignore_errors: yes + ignore_errors: true - name: gather service info docker_swarm_service_info: name: "{{ service_name }}" @@ -1575,7 +1575,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1605,37 +1605,37 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' read_only: true register: read_only_1 - ignore_errors: yes + ignore_errors: true - name: read_only (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' read_only: true register: read_only_2 - ignore_errors: yes + ignore_errors: true - name: read_only (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' read_only: false register: read_only_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1657,7 +1657,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' replicas: 2 register: replicas_1 @@ -1666,7 +1666,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' replicas: 2 register: replicas_2 @@ -1675,7 +1675,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' replicas: 3 register: replicas_3 @@ -1684,7 +1684,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1719,13 +1719,13 @@ command: '/bin/sh -v -c "sleep 10m"' resolve_image: true register: resolve_image_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1750,37 +1750,37 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' - tty: yes + tty: true register: tty_1 - ignore_errors: yes + ignore_errors: true - name: tty (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' - tty: yes + tty: true register: tty_2 - ignore_errors: yes + ignore_errors: true - name: tty (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' - tty: no + tty: false register: tty_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1802,7 +1802,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' user: "operator" register: user_1 @@ -1811,7 +1811,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' user: "operator" register: user_2 @@ -1820,7 +1820,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' user: "root" register: user_3 @@ -1829,7 +1829,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1845,7 +1845,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false working_dir: /tmp register: working_dir_1 @@ -1853,7 +1853,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false working_dir: /tmp register: working_dir_2 @@ -1861,7 +1861,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false working_dir: / register: working_dir_3 @@ -1869,7 +1869,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1885,7 +1885,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false init: true register: init_1 @@ -1893,7 +1893,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false init: true register: init_2 @@ -1901,7 +1901,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false init: false register: init_3 @@ -1909,7 +1909,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -1932,61 +1932,61 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false init: true cap_add: - sys_time cap_drop: - all register: capabilities_1 - ignore_errors: yes + ignore_errors: true - name: capabilities, cap_drop (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false init: true cap_add: - sys_time cap_drop: - all register: capabilities_2 - ignore_errors: yes + ignore_errors: true diff: true - name: capabilities, cap_drop (less) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false init: true cap_add: [] cap_drop: - all register: capabilities_3 - ignore_errors: yes + ignore_errors: true diff: true - name: capabilities, cap_drop (changed) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false init: true cap_add: - setgid cap_drop: - all register: capabilities_4 - ignore_errors: yes + ignore_errors: true diff: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml index 733ac3b9..30ed155b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml @@ -20,65 +20,65 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: preferences: - spread: "node.labels.test" register: placement_preferences_1 - ignore_errors: yes + ignore_errors: true - name: placement.preferences (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: preferences: - spread: "node.labels.test" register: placement_preferences_2 - ignore_errors: yes + ignore_errors: true - name: placement.preferences (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: preferences: - spread: "node.labels.test2" register: placement_preferences_3 - ignore_errors: yes + ignore_errors: true - name: placement.preferences (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: preferences: [] register: placement_preferences_4 - ignore_errors: yes + ignore_errors: true - name: placement.preferences (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: preferences: [] register: placement_preferences_5 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -102,91 +102,91 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: constraints: - "node.role == manager" register: constraints_1 - ignore_errors: yes + ignore_errors: true - name: placement.constraints (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: constraints: - "node.role == manager" register: constraints_2 - ignore_errors: yes + ignore_errors: true - name: placement.constraints (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: constraints: - "node.role == worker" register: constraints_3 - ignore_errors: yes + ignore_errors: true - name: placement.constraints (add) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: constraints: - "node.role == worker" - "node.label != non_existent_label" register: constraints_4 - ignore_errors: yes + ignore_errors: true - name: placement.constraints (order idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: constraints: - "node.label != non_existent_label" - "node.role == worker" register: constraints_5 - ignore_errors: yes + ignore_errors: true - name: placement.constraints (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: constraints: [] register: constraints_6 - ignore_errors: yes + ignore_errors: true - name: placement.constraints (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: constraints: [] register: constraints_7 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -212,41 +212,41 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: replicas_max_per_node: 1 register: replicas_max_per_node_1 - ignore_errors: yes + ignore_errors: true - name: placement.replicas_max_per_node (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: replicas_max_per_node: 1 register: replicas_max_per_node_2 - ignore_errors: yes + ignore_errors: true - name: placement.replicas_max_per_node (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' placement: replicas_max_per_node: 2 register: replicas_max_per_node_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml index a216a4eb..ac891750 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml @@ -19,7 +19,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' limits: cpus: 1 @@ -29,7 +29,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' limits: cpus: 1 @@ -39,7 +39,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' limits: cpus: 0.5 @@ -49,7 +49,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -65,7 +65,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' limits: memory: 64M @@ -75,7 +75,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' limits: memory: 64M @@ -85,7 +85,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' limits: memory: 32M @@ -95,7 +95,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -111,7 +111,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' reservations: cpus: 1 @@ -121,7 +121,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' reservations: cpus: 1 @@ -131,7 +131,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' reservations: cpus: 0.5 @@ -141,7 +141,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -157,7 +157,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' reservations: memory: 64M @@ -167,7 +167,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' reservations: memory: 64M @@ -177,7 +177,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' reservations: memory: 32M @@ -187,7 +187,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml index 8c55999e..f80a4475 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml @@ -19,7 +19,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: condition: "on-failure" @@ -29,7 +29,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: condition: "on-failure" @@ -39,7 +39,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: condition: "any" @@ -49,7 +49,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -65,7 +65,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: max_attempts: 1 @@ -75,7 +75,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: max_attempts: 1 @@ -85,7 +85,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: max_attempts: 2 @@ -95,7 +95,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -111,7 +111,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: delay: 5s @@ -121,7 +121,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: delay: 5s @@ -131,7 +131,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: delay: 10s @@ -141,7 +141,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -157,7 +157,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: window: 10s @@ -167,7 +167,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: window: 10s @@ -177,7 +177,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' restart_config: window: 20s @@ -187,7 +187,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml index 7e6a85b5..9035ffdb 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml @@ -19,40 +19,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: delay: 5s register: rollback_config_delay_1 - ignore_errors: yes + ignore_errors: true - name: rollback_config.delay (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: delay: 5s register: rollback_config_delay_2 - ignore_errors: yes + ignore_errors: true - name: rollback_config.delay (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: delay: 12s register: rollback_config_delay_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -74,40 +74,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: failure_action: "pause" register: rollback_config_failure_action_1 - ignore_errors: yes + ignore_errors: true - name: rollback_config.failure_action (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: failure_action: "pause" register: rollback_config_failure_action_2 - ignore_errors: yes + ignore_errors: true - name: rollback_config.failure_action (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: failure_action: "continue" register: rollback_config_failure_action_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -129,40 +129,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: max_failure_ratio: 0.25 register: rollback_config_max_failure_ratio_1 - ignore_errors: yes + ignore_errors: true - name: rollback_config.max_failure_ratio (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: max_failure_ratio: 0.25 register: rollback_config_max_failure_ratio_2 - ignore_errors: yes + ignore_errors: true - name: rollback_config.max_failure_ratio (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: max_failure_ratio: 0.50 register: rollback_config_max_failure_ratio_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -184,40 +184,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: monitor: 10s register: rollback_config_monitor_1 - ignore_errors: yes + ignore_errors: true - name: rollback_config.monitor (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: monitor: 10s register: rollback_config_monitor_2 - ignore_errors: yes + ignore_errors: true - name: rollback_config.monitor (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: monitor: 60s register: rollback_config_monitor_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -239,40 +239,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: order: "start-first" register: rollback_config_order_1 - ignore_errors: yes + ignore_errors: true - name: rollback_config.order (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: order: "start-first" register: rollback_config_order_2 - ignore_errors: yes + ignore_errors: true - name: rollback_config.order (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: order: "stop-first" register: rollback_config_order_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -294,40 +294,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: parallelism: 2 register: rollback_config_parallelism_1 - ignore_errors: yes + ignore_errors: true - name: rollback_config.parallelism (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: parallelism: 2 register: rollback_config_parallelism_2 - ignore_errors: yes + ignore_errors: true - name: rollback_config.parallelism (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' rollback_config: parallelism: 1 register: rollback_config_parallelism_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml index a658d806..2af5076f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml @@ -44,32 +44,32 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" filename: "/run/secrets/{{ secret_name_1 }}.txt" register: secrets_1 - ignore_errors: yes + ignore_errors: true - name: secrets (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_name: "{{ secret_name_1 }}" filename: "/run/secrets/{{ secret_name_1 }}.txt" register: secrets_2 - ignore_errors: yes + ignore_errors: true - name: secrets (add) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" @@ -78,13 +78,13 @@ - secret_name: "{{ secret_name_2 }}" filename: "/run/secrets/{{ secret_name_2 }}.txt" register: secrets_3 - ignore_errors: yes + ignore_errors: true - name: secrets (add idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_name: "{{ secret_name_1 }}" @@ -93,13 +93,13 @@ secret_name: "{{ secret_name_2 }}" filename: "/run/secrets/{{ secret_name_2 }}.txt" register: secrets_4 - ignore_errors: yes + ignore_errors: true - name: secrets (add idempotency no id) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_name: "{{ secret_name_1 }}" @@ -107,13 +107,13 @@ - secret_name: "{{ secret_name_2 }}" filename: "/run/secrets/{{ secret_name_2 }}.txt" register: secrets_5 - ignore_errors: yes + ignore_errors: true - name: secrets (order idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_name: "{{ secret_name_2 }}" @@ -121,39 +121,39 @@ - secret_name: "{{ secret_name_1 }}" filename: "/run/secrets/{{ secret_name_1 }}.txt" register: secrets_6 - ignore_errors: yes + ignore_errors: true - name: secrets (empty) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: [] register: secrets_7 - ignore_errors: yes + ignore_errors: true - name: secrets (empty idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: [] register: secrets_8 - ignore_errors: yes + ignore_errors: true - name: rolling secrets docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_name: "{{ secret_name_3 }}_v1" filename: "/run/secrets/{{ secret_name_3 }}.txt" register: secrets_9 - ignore_errors: yes + ignore_errors: true - name: update rolling secret docker_secret: @@ -163,25 +163,25 @@ rolling_versions: true register: secrets_10 when: docker_py_version is version('2.1.0', '>=') - ignore_errors: yes + ignore_errors: true - name: rolling secrets service update docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_name: "{{ secret_name_3 }}_v2" filename: "/run/secrets/{{ secret_name_3 }}.txt" register: secrets_11 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -211,72 +211,72 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" uid: 1000 register: secrets_1 - ignore_errors: yes + ignore_errors: true - name: secrets (uid int idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" uid: 1000 register: secrets_2 - ignore_errors: yes + ignore_errors: true - name: secrets (uid int change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" uid: 1002 register: secrets_3 - ignore_errors: yes + ignore_errors: true - name: secrets (uid str) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" uid: "1001" register: secrets_4 - ignore_errors: yes + ignore_errors: true - name: secrets (uid str idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" uid: "1001" register: secrets_5 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -300,72 +300,72 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" gid: 1001 register: secrets_1 - ignore_errors: yes + ignore_errors: true - name: secrets (gid int idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" gid: 1001 register: secrets_2 - ignore_errors: yes + ignore_errors: true - name: secrets (gid int change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" gid: 1002 register: secrets_3 - ignore_errors: yes + ignore_errors: true - name: secrets (gid str) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" gid: "1003" register: secrets_4 - ignore_errors: yes + ignore_errors: true - name: secrets (gid str idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" gid: "1003" register: secrets_5 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -389,46 +389,46 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" mode: 0600 register: secrets_1 - ignore_errors: yes + ignore_errors: true - name: secrets (mode idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" mode: 0600 register: secrets_2 - ignore_errors: yes + ignore_errors: true - name: secrets (mode change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' secrets: - secret_id: "{{ secret_result_1.secret_id|default('') }}" secret_name: "{{ secret_name_1 }}" mode: 0777 register: secrets_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -450,12 +450,12 @@ docker_secret: name: "{{ secret_name }}" state: absent - force: yes + force: true loop: - "{{ secret_name_1 }}" - "{{ secret_name_2 }}" - "{{ secret_name_3 }}" loop_control: loop_var: secret_name - ignore_errors: yes + ignore_errors: true when: docker_py_version is version('2.1.0', '>=') diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml index faae2a69..fb335a03 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml @@ -19,7 +19,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: delay: 5s @@ -29,7 +29,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: delay: 5s @@ -39,7 +39,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: delay: 12s @@ -49,7 +49,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -65,7 +65,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: failure_action: "pause" @@ -75,7 +75,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: failure_action: "pause" @@ -85,7 +85,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: failure_action: "continue" @@ -95,29 +95,29 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: failure_action: "rollback" register: update_failure_action_4 - ignore_errors: yes + ignore_errors: true - name: update_config.failure_action (rollback idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: failure_action: "rollback" register: update_failure_action_5 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -146,40 +146,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: max_failure_ratio: 0.25 register: update_max_failure_ratio_1 - ignore_errors: yes + ignore_errors: true - name: update_config.max_failure_ratio (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: max_failure_ratio: 0.25 register: update_max_failure_ratio_2 - ignore_errors: yes + ignore_errors: true - name: update_config.max_failure_ratio (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: max_failure_ratio: 0.50 register: update_max_failure_ratio_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -201,40 +201,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: monitor: 10s register: update_monitor_1 - ignore_errors: yes + ignore_errors: true - name: update_config.monitor (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: monitor: 10s register: update_monitor_2 - ignore_errors: yes + ignore_errors: true - name: update_config.monitor (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: monitor: 60s register: update_monitor_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -256,40 +256,40 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: order: "start-first" register: update_order_1 - ignore_errors: yes + ignore_errors: true - name: update_config.order (idempotency) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: order: "start-first" register: update_order_2 - ignore_errors: yes + ignore_errors: true - name: update_config.order (change) docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: order: "stop-first" register: update_order_3 - ignore_errors: yes + ignore_errors: true - name: cleanup docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: @@ -311,7 +311,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: parallelism: 2 @@ -321,7 +321,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: parallelism: 2 @@ -331,7 +331,7 @@ docker_swarm_service: name: "{{ service_name }}" image: "{{ docker_test_image_alpine }}" - resolve_image: no + resolve_image: false command: '/bin/sh -v -c "sleep 10m"' update_config: parallelism: 1 @@ -341,7 +341,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - diff: no + diff: false - assert: that: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/vars/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/vars/main.yml index 836ee41c..bd8c799e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/vars/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service/vars/main.yml @@ -58,3 +58,4 @@ service_expected_output: user: null working_dir: null init: null + sysctls: null diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml index 5769ff1c..6407d95b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml index d5f4cbdb..ee191138 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml @@ -20,7 +20,7 @@ - name: Try to get docker_swarm_service_info when docker is not running in swarm mode docker_swarm_service_info: name: "{{ service_name }}" - ignore_errors: yes + ignore_errors: true register: output - name: assert failure when called when swarm is not in use or not run on manager node @@ -72,7 +72,7 @@ docker_swarm_service: name: "{{ service_name }}" state: absent - ignore_errors: yes + ignore_errors: true - name: Remove swarm docker_swarm: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml index b356e561..05589840 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml index 65853ddd..72a58962 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume/tasks/run-test.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/tasks/main.yml index 24bd7f5f..09cb84d7 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/docker_volume_info/tasks/main.yml @@ -43,7 +43,7 @@ - name: "Comparison: use 'docker volume inspect'" command: docker volume inspect "{{ cname }}" register: docker_volume_inspect - ignore_errors: yes + ignore_errors: true - block: - set_fact: docker_volume_inspect_result: "{{ docker_volume_inspect.stdout | from_json }}" diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml index e7ff3d68..7440275b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/tasks/main.yml index 4a0c6336..e43833b8 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_connection_tests/tasks/main.yml @@ -52,7 +52,7 @@ loop: - nginx.conf register: can_copy_files - ignore_errors: yes + ignore_errors: true - when: can_copy_files is not failed block: @@ -62,7 +62,7 @@ path: '{{ remote_tmp_dir }}/{{ item }}.key' type: ECC curve: secp256r1 - force: yes + force: true loop: - cert - ca @@ -73,7 +73,7 @@ privatekey_path: '{{ remote_tmp_dir }}/ca.key' basic_constraints: - 'CA:TRUE' - basic_constraints_critical: yes + basic_constraints_critical: true - name: Create CA certificate community.crypto.x509_certificate: @@ -174,7 +174,8 @@ - (output_direct.host_info | sanitize_host_info) == (output_https.host_info | sanitize_host_info) always: - - command: docker logs {{ daemon_nginx_frontend }} + - name: Obtain logs from the nginx frontend + command: docker logs {{ daemon_nginx_frontend }} register: output ignore_errors: true - debug: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml index 6fdc1c8e..ee4a358c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml index 74483e50..8bfa5251 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/generic_ssh_connection/tasks/main.yml @@ -58,16 +58,16 @@ - 'output.volumes is not defined' - 'output.images is not defined' - 'output.disk_usage is not defined' - when: output is succeeded or 'Install paramiko package to enable' in output.msg - # For whatever reason, even though paramiko is installed, *sometimes* this error - # shows up. I have no idea why it sometimes works and sometimes not... + when: output is succeeded or 'Failed to import the required Python library (paramiko)' not in output.msg + # Sometimes paramiko being installed isn't enough: importing it can fail + # due to 'ImportError: No module named x25519' when it executes + # `from cryptography.hazmat.primitives.asymmetric.x25519 import ...`. - name: Get docker daemon information via ssh (OpenSSH) to localhost docker_host_info: docker_host: "ssh://root@localhost" use_ssh_client: true register: output - ignore_errors: true - name: Make sure we got information assert: @@ -79,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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml index 5769ff1c..471ddd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml index 29341650..9a01aa28 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_cleanup.yml @@ -5,22 +5,13 @@ - hosts: 127.0.0.1 connection: local - gather_facts: yes + gather_facts: true tasks: - name: remove docker containers docker_container: name: "{{ item }}" state: absent - force_kill: yes + force_kill: true 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml index 5eabe47c..72507e41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml @@ -6,13 +6,17 @@ - hosts: 127.0.0.1 connection: local vars: - docker_skip_cleanup: yes + docker_skip_cleanup: true tasks: - name: Setup docker 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml index 9dbb7132..976b25b2 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_1.yml @@ -5,7 +5,7 @@ - hosts: 127.0.0.1 connection: local # otherwise Ansible will complain that it cannot connect via ssh to 127.0.0.1:22 - gather_facts: no + gather_facts: false tasks: - name: Show all groups debug: @@ -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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml index df2e9ff5..71346bfa 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/playbooks/test_inventory_2.yml @@ -5,7 +5,7 @@ - hosts: 127.0.0.1 connection: local # otherwise Ansible will complain that it cannot connect via ssh to 127.0.0.1:22 - gather_facts: no + gather_facts: false tasks: - name: Show all groups debug: @@ -33,7 +33,7 @@ connection: local vars: ansible_python_interpreter: "{{ ansible_playbook_python }}" - gather_facts: no + gather_facts: false tasks: - name: Show all variables debug: @@ -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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh index acc1d5f4..318275d9 100755 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_containers/runme.sh +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml index b24c3818..aacaf67b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml +++ b/openshift/release/ansible/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: @@ -19,4 +23,4 @@ dest: /tmp/docker-machine - name: Install docker-machine binary command: install /tmp/docker-machine /usr/bin/docker-machine - become: yes + become: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml index a4098eb3..fb58718d 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - hosts: 127.0.0.1 - gather_facts: no + gather_facts: false tasks: - name: sanity check Docker Machine output vars: @@ -33,7 +33,7 @@ - "'DOCKER_MACHINE_NAME=\"{{ hostvars['vm'].dm_DOCKER_MACHINE_NAME }}\"' in result.stdout" - hosts: vm - gather_facts: no + gather_facts: false tasks: - name: do something to verify that accept-new ssh setting was applied by the docker-machine inventory plugin raw: uname -a @@ -42,7 +42,7 @@ - debug: var=result.stdout - hosts: 127.0.0.1 - gather_facts: no + gather_facts: false environment: DOCKER_CERT_PATH: "{{ hostvars['vm'].dm_DOCKER_CERT_PATH }}" DOCKER_HOST: "{{ hostvars['vm'].dm_DOCKER_HOST }}" diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh index b39a08c4..5d00aa66 100755 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_machine/runme.sh +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml index 5769ff1c..6407d95b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml index da9be518..a6bedd41 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_cleanup.yml @@ -5,18 +5,9 @@ - hosts: 127.0.0.1 connection: local - gather_facts: yes + gather_facts: true tasks: - name: Make sure swarm is removed docker_swarm: state: absent - force: yes - - - name: remove docker pagkages - action: "{{ ansible_facts.pkg_mgr }}" - args: - name: - - docker - - docker-ce - - docker-ce-cli - state: absent + force: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml index 98bd59f0..9dd43dd2 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml @@ -6,13 +6,17 @@ - hosts: 127.0.0.1 connection: local vars: - docker_skip_cleanup: yes + docker_skip_cleanup: true tasks: - name: Setup docker 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_1.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_1.yml index 69592bc3..77fcc371 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_1.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_1.yml @@ -5,7 +5,7 @@ - hosts: 127.0.0.1 connection: local # otherwise Ansible will complain that it cannot connect via ssh to 127.0.0.1:22 - gather_facts: no + gather_facts: false tasks: - name: Show all groups debug: @@ -32,22 +32,22 @@ - "groups.manager | length > 0" - "groups.worker | length >= 0" - "groups.leader | length == 1" - run_once: yes + run_once: true - name: List manager group debug: var: groups.manager - run_once: yes + run_once: true - name: List worker group debug: var: groups.worker - run_once: yes + run_once: true - name: List leader group debug: var: groups.leader - run_once: yes + run_once: true - name: Print ansible_host per host debug: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_2.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_2.yml index f9b69c86..091b891a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_2.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/playbooks/test_inventory_2.yml @@ -5,7 +5,7 @@ - hosts: 127.0.0.1 connection: local # otherwise Ansible will complain that it cannot connect via ssh to 127.0.0.1:22 - gather_facts: no + gather_facts: false tasks: - name: Show all groups debug: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh index 746b8592..1759b888 100755 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/inventory_docker_swarm/runme.sh +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml index c120b5a3..412fc564 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/defaults/main.yml @@ -5,18 +5,13 @@ docker_cli_version: '0.0' docker_api_version: '0.0' -docker_py_version: '0.0' -docker_skip_cleanup: yes +docker_skip_cleanup: true docker_prereq_packages: [] docker_packages: - docker-ce 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml index 96ca226c..ec68f655 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/handlers/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml index b3044b88..cb07fbf7 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Alpine.yml @@ -5,6 +5,7 @@ - name: Install docker apk: - name: docker - update_cache: yes + name: + - docker + update_cache: true notify: cleanup docker diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Archlinux.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Archlinux.yml index 9015b088..3a67ff2b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Archlinux.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Archlinux.yml @@ -6,5 +6,5 @@ - name: Install docker community.general.pacman: name: docker - update_cache: yes + update_cache: true notify: cleanup docker diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Fedora.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Fedora.yml index e13ae086..039751a7 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Fedora.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Fedora.yml @@ -14,8 +14,8 @@ name: docker-ce-stable description: Docker CE Stable - $basearch baseurl: https://download.docker.com/linux/fedora/{{ 31 if ansible_facts.distribution_major_version|int > 31 else '$releasever' }}/$basearch/stable - enabled: yes - gpgcheck: yes + enabled: true + gpgcheck: true - name: Update cache command: dnf makecache diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Suse.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Suse.yml index 945b728d..18974cb2 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Suse.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/Suse.yml @@ -6,7 +6,7 @@ - name: Install docker 17 community.general.zypper: name: "{{ docker_packages if needs_docker_daemon else docker_cli_packages }}" - force: yes - disable_gpg_check: yes - update_cache: yes + force: true + disable_gpg_check: true + update_cache: true notify: cleanup docker diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml index a09d236d..54c27e43 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/tasks/main.yml +++ b/openshift/release/ansible/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: @@ -66,47 +74,25 @@ - name: Check Docker API version command: "docker version -f {% raw %}'{{(index .Server.Components 0).Details.ApiVersion}}'{% endraw %}" register: docker_api_version_stdout - ignore_errors: yes - - - 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 + ignore_errors: true - # Detect docker CLI, API and docker-py versions + # 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: yes - - - name: Check Docker API version - command: "{{ ansible_python.executable }} -c 'import docker; print(docker.from_env().version()[\"ApiVersion\"])'" - register: docker_api_version_stdout - ignore_errors: yes - - - name: Check docker-py API version - command: "{{ ansible_python.executable }} -c 'import docker; print(docker.__version__)'" - register: docker_py_version_stdout - ignore_errors: yes + 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 - - command: 'docker ps --no-trunc --format {% raw %}"{{.Names}}"{% endraw %}' + - name: Show all containers + command: 'docker ps --no-trunc --format {% raw %}"{{.Names}}"{% endraw %}' - name: "Remove all ansible-docker-test-* docker containers" shell: 'docker ps --no-trunc --format {% raw %}"{{.Names}}"{% endraw %} | grep "^ansible-docker-test-" | xargs -r docker rm -f' @@ -114,17 +100,17 @@ retries: 3 delay: 3 until: docker_containers is success - ignore_errors: yes + ignore_errors: true - name: "Remove all ansible-docker-test-* docker volumes" shell: 'docker volume ls --format {% raw %}"{{.Name}}"{% endraw %} | grep "^ansible-docker-test-" | xargs -r docker volume rm -f' register: docker_volumes - ignore_errors: yes + ignore_errors: true - name: "Remove all ansible-docker-test-* docker networks" shell: 'docker network ls --no-trunc --format {% raw %}"{{.Name}}"{% endraw %} | grep "^ansible-docker-test-" | xargs -r docker network rm' register: docker_networks - ignore_errors: yes + ignore_errors: true - name: Cleaned docker resources debug: @@ -139,22 +125,22 @@ - name: List all docker containers command: docker ps --no-trunc -a register: docker_containers - ignore_errors: yes + ignore_errors: true - name: List all docker volumes command: docker volume ls register: docker_volumes - ignore_errors: yes + ignore_errors: true - name: List all docker networks command: docker network ls --no-trunc register: docker_networks - ignore_errors: yes + ignore_errors: true - name: List all docker images command: docker images --no-trunc -a register: docker_images - ignore_errors: yes + ignore_errors: true - name: Still existing docker resources debug: @@ -167,13 +153,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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml index b1e28987..bbf9ed32 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/RedHat-7.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml index d7c82455..f55df21f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/Ubuntu-14.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml index e4eafc24..1859bdfe 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker/vars/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/meta/main.yml new file mode 100644 index 00000000..5769ff1c --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Alpine.yml new file mode 100644 index 00000000..48d357a3 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Archlinux.yml new file mode 100644 index 00000000..5d270901 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Debian.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Fedora.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-7.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-8.yml new file mode 100644 index 00000000..6bb81a94 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/RedHat-9.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/Suse.yml new file mode 100644 index 00000000..fd667cc2 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/main.yml new file mode 100644 index 00000000..979ad2ba --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml similarity index 88% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml index c5d18002..a93d788a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-7.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/tasks/nothing.yml @@ -3,4 +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 -skip_docker_compose: true +# nothing to do +[] diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/default.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/vars/default.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/default.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_buildx/vars/default.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/meta/main.yml new file mode 100644 index 00000000..5769ff1c --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Alpine.yml new file mode 100644 index 00000000..7190dbad --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Archlinux.yml new file mode 100644 index 00000000..89dedb0b --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Debian.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Fedora.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-7.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-8.yml new file mode 100644 index 00000000..b4ece59a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml new file mode 120000 index 00000000..0b069514 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/RedHat-9.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/Suse.yml new file mode 100644 index 00000000..5b80302b --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/main.yml new file mode 100644 index 00000000..5a58c982 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/main.yml @@ -0,0 +1,66 @@ +--- +# 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: + - name: Obtain docker info + 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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/nothing.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/tasks/nothing.yml new file mode 100644 index 00000000..a93d788a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/vars/default.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_cli_compose/vars/default.yml new file mode 100644 index 00000000..f55df21f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/defaults/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/defaults/main.yml new file mode 100644 index 00000000..0ebf5269 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/meta/main.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/meta/main.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/meta/main.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Alpine.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Alpine.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Alpine.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Alpine.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Archlinux.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Archlinux.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Debian.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Debian.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Debian.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Debian.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Fedora.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Fedora.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Fedora.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Fedora.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-7.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-7.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-7.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-8.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-8.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-8.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-8.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-9.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-9.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/RedHat-9.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/RedHat-9.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Suse.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml similarity index 83% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Suse.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml index bf8db5c0..46e50fd4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/Suse.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/Suse.yml @@ -6,7 +6,7 @@ - name: Install docker-compose as system package community.general.zypper: name: "{{ docker_compose_packages }}" - force: yes - disable_gpg_check: yes - update_cache: yes + force: true + disable_gpg_check: true + update_cache: true notify: cleanup docker diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/main.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/main.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/main.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/setup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml similarity index 75% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/setup.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml index 08c68a89..0db7293d 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/tasks/setup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/tasks/setup.yml @@ -37,21 +37,41 @@ 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-compose version + - 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 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Alpine.yml new file mode 100644 index 00000000..65f6f432 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/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 + +docker_compose_packages: + - docker-compose +docker_compose_pip_packages: + - docker-compose + # Force PyYAML to 5.3.1 + - PyYAML==5.3.1 + # Force requests to < 2.32.0 (https://github.com/docker/docker-py/issues/3256) + - requests<2.32.0 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/defaults/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml similarity index 77% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/defaults/main.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml index f701c90e..f0698a3e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/defaults/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml @@ -3,8 +3,7 @@ # 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 + # Force PyYAML to 5.3.1 + - PyYAML==5.3.1 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/CentOS-8.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/CentOS-8.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/CentOS-8.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/CentOS-8.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-11.yml new file mode 100644 index 00000000..727d541f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Debian-12.yml new file mode 100644 index 00000000..727d541f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-7.yml new file mode 100644 index 00000000..99b27c1c --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-8.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-8.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-8.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-8.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-9.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-9.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/RedHat-9.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/RedHat-9.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py2.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py2.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py2.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py2.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py3.yml similarity index 85% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Suse-py3.yml index 46c58b25..7279eac1 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Suse-py3.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-14.yml new file mode 100644 index 00000000..f701e1f7 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-16.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-16.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-16.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-16.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-18.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-18.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu-18.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu-18.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu.yml similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose/vars/Ubuntu.yml rename to openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Ubuntu.yml diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/default.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/default.yml new file mode 100644 index 00000000..f55df21f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v2/tasks/Suse.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v2/tasks/Suse.yml index bf8db5c0..46e50fd4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v2/tasks/Suse.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v2/tasks/Suse.yml @@ -6,7 +6,7 @@ - name: Install docker-compose as system package community.general.zypper: name: "{{ docker_compose_packages }}" - force: yes - disable_gpg_check: yes - update_cache: yes + force: true + disable_gpg_check: true + update_cache: true notify: cleanup docker diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/meta/main.yml new file mode 100644 index 00000000..2a770b72 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_current_container_network_ip/tasks/main.yml new file mode 100644 index 00000000..21ed3972 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/aliases new file mode 100644 index 00000000..0a430dff --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/defaults/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/defaults/main.yml new file mode 100644 index 00000000..cd11129e --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/meta/main.yml new file mode 100644 index 00000000..d4a5c7d0 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/tasks/main.yml new file mode 100644 index 00000000..67c2651d --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/RedHat-7.yml new file mode 100644 index 00000000..ff572017 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/Ubuntu-14.yml new file mode 100644 index 00000000..41a8bceb --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/default.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_python_deps/vars/default.yml new file mode 100644 index 00000000..f55df21f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases index 357972ff..e1026a83 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/aliases +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml index 5c04ebc8..6833be48 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/handlers/cleanup.yml @@ -4,16 +4,15 @@ # 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" command: "docker logs {{ docker_registry_container_name_registry }}" register: registry_logs - no_log: yes - ignore_errors: yes + no_log: true + ignore_errors: true - name: "Printing registry logs" debug: @@ -23,14 +22,14 @@ - name: "Get nginx logs for first instance" command: "docker logs {{ docker_registry_container_name_nginx }}" register: nginx_logs - no_log: yes - ignore_errors: yes + no_log: true + ignore_errors: true - name: "Get nginx logs for second instance" command: "docker logs {{ docker_registry_container_name_nginx2 }}" register: nginx2_logs - no_log: yes - ignore_errors: yes + no_log: true + ignore_errors: true - name: "Printing nginx logs for first instance" debug: @@ -46,7 +45,7 @@ docker_container: name: "{{ item }}" state: absent - force_kill: yes + force_kill: true with_items: "{{ docker_registry_setup_cnames }}" register: result retries: 3 @@ -56,4 +55,4 @@ - name: "Make sure all volumes are removed" command: "docker volume rm -f {{ item }}" with_items: "{{ docker_registry_setup_vnames }}" - ignore_errors: yes + ignore_errors: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml index 4ab14ed1..f13fc1ad 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/meta/main.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml index 66bc1dae..25bb2029 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml @@ -49,7 +49,7 @@ - nginx.conf - nginx.htpasswd register: can_copy_files - ignore_errors: yes + ignore_errors: true - when: can_copy_files is not failed block: @@ -59,7 +59,7 @@ path: '{{ remote_tmp_dir }}/cert.key' type: ECC curve: secp256r1 - force: yes + force: true - name: Create CSR for frontend certificate community.crypto.openssl_csr: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml index b3a8662e..454c6604 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_registry/tasks/setup.yml +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/aliases b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/aliases new file mode 100644 index 00000000..0a430dff --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/defaults/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/defaults/main.yml new file mode 100644 index 00000000..29a257f8 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/meta/main.yml new file mode 100644 index 00000000..d4a5c7d0 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/tasks/main.yml new file mode 100644 index 00000000..91cd5fcb --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/RedHat-7.yml new file mode 100644 index 00000000..9fa5efa5 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/Ubuntu-14.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/Ubuntu-14.yml new file mode 100644 index 00000000..f701e1f7 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/default.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_docker_sdk_for_python/vars/default.yml new file mode 100644 index 00000000..f55df21f --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_pkg_mgr/tasks/main.yml index a6f171bb..bc74b251 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_pkg_mgr/tasks/main.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -11,13 +11,13 @@ - set_fact: pkg_mgr: community.general.pkgng ansible_pkg_mgr: community.general.pkgng - cacheable: yes + cacheable: true when: ansible_os_family == "FreeBSD" - set_fact: pkg_mgr: community.general.zypper ansible_pkg_mgr: community.general.zypper - cacheable: yes + cacheable: true when: ansible_os_family == "Suse" - shell: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml index e19d903e..cc74b70a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml @@ -7,4 +7,4 @@ file: path: "{{ remote_tmp_dir }}" state: absent - no_log: yes + no_log: true diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/action-group.json b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/action-group.json new file mode 100644 index 00000000..477ca3f8 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt.license b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/action-group.json.license similarity index 100% rename from openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt.license rename to openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/action-group.json.license diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/action-group.py b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/action-group.py new file mode 100755 index 00000000..efe31ab9 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/action-group.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python +# Copyright (c) 2024, 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 +"""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/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.json b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.json index c2e612e5..9a28d174 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.json +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.json @@ -1,10 +1,13 @@ { "include_symlinks": false, "prefixes": [ - "docs/docsite/" + "docs/docsite/", + "plugins/", + "roles/" ], "output": "path-line-column-message", "requirements": [ + "ansible-core", "antsibull-docs" ] } diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py index 67310492..251e6d70 100755 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/extra/extra-docs.py @@ -13,9 +13,14 @@ def main(): """Main entry point.""" - if not os.path.isdir(os.path.join('docs', 'docsite')): - return - p = subprocess.run(['antsibull-docs', 'lint-collection-docs', '.'], check=False) + env = os.environ.copy() + 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', '--skip-rstcheck', '.'], + env=env, + check=False, + ) if p.returncode not in (0, 3): print('{0}:0:0: unexpected return code {1}'.format(sys.argv[0], p.returncode)) diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.10.txt deleted file mode 100644 index 1a9f4888..00000000 --- a/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt index 1a9f4888..8dce572f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.11.txt @@ -7,5 +7,8 @@ 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 +plugins/modules/docker_image_build.py validate-modules:invalid-documentation diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt index 3d71834d..a3d961e4 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.12.txt @@ -1,3 +1,6 @@ .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 +plugins/modules/docker_image_build.py validate-modules:invalid-documentation diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt index 2a06013d..ef8aab6c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.13.txt @@ -1,2 +1,4 @@ .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 +plugins/modules/docker_image_build.py validate-modules:invalid-documentation diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.14.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.14.txt index 2a06013d..f717d24a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.14.txt +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.14.txt @@ -1,2 +1,3 @@ .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 +plugins/modules/docker_image_build.py validate-modules:invalid-documentation diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.15.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.15.txt index 2a06013d..f717d24a 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.15.txt +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.15.txt @@ -1,2 +1,3 @@ .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 +plugins/modules/docker_image_build.py validate-modules:invalid-documentation diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt new file mode 100644 index 00000000..b60ad344 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt @@ -0,0 +1,2 @@ +plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin +plugins/modules/docker_image_build.py validate-modules:invalid-documentation diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt.license b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.16.txt.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.16.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/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt new file mode 100644 index 00000000..f1974bd5 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt @@ -0,0 +1,4 @@ +plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin +plugins/module_utils/_api/api/client.py pylint:use-yield-from # suggested construct does not work with Python 2 +plugins/module_utils/_api/utils/build.py pylint:use-yield-from # suggested construct does not work with Python 2 +tests/unit/plugins/module_utils/test_copy.py pylint:use-yield-from # suggested construct does not work with Python 2 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt.license b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.17.txt.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.18.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.18.txt new file mode 100644 index 00000000..f1974bd5 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.18.txt @@ -0,0 +1,4 @@ +plugins/modules/docker_container_copy_into.py validate-modules:undocumented-parameter # _max_file_size_for_diff is used by the action plugin +plugins/module_utils/_api/api/client.py pylint:use-yield-from # suggested construct does not work with Python 2 +plugins/module_utils/_api/utils/build.py pylint:use-yield-from # suggested construct does not work with Python 2 +tests/unit/plugins/module_utils/test_copy.py pylint:use-yield-from # suggested construct does not work with Python 2 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.18.txt.license b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.18.txt.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.18.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/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/sanity/ignore-2.9.txt deleted file mode 100644 index 81b68cbd..00000000 --- a/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/builtins.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/builtins.py index b0cc6186..d548601d 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/builtins.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/builtins.py @@ -13,7 +13,7 @@ # One unittest needs to import builtins via __import__() so we need to have # the string that represents it try: - import __builtin__ + import __builtin__ # noqa: F401, pylint: disable=unused-import except ImportError: BUILTINS = 'builtins' else: diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/mock.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/mock.py index 515b94a3..6ef80a7c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/mock.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/compat/mock.py @@ -9,7 +9,7 @@ ''' Compat module for Python3.x's unittest.mock module ''' -import sys +import sys # noqa: F401, pylint: disable=unused-import # Python 2.7 @@ -20,11 +20,11 @@ # Allow wildcard import because we really do want to import all of mock's # symbols into this compat shim # pylint: disable=wildcard-import,unused-wildcard-import - from unittest.mock import * + from unittest.mock import * # noqa: F401, pylint: disable=unused-import except ImportError: # Python 2 # pylint: disable=wildcard-import,unused-wildcard-import try: - from mock import * + from mock import * # noqa: F401, pylint: disable=unused-import except ImportError: print('You need the mock library installed on python2.x to run tests') diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py index 682c3212..279b469c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/connection/test_docker.py @@ -7,14 +7,13 @@ __metaclass__ = type from io import StringIO -import pytest from ansible_collections.community.docker.tests.unit.compat import mock from ansible_collections.community.docker.tests.unit.compat import unittest from ansible.errors import AnsibleError from ansible.playbook.play_context import PlayContext -from ansible_collections.community.docker.plugins.connection.docker import Connection as DockerConnection from ansible.plugins.loader import connection_loader +from ansible.module_utils.six import PY2 class TestDockerConnectionClass(unittest.TestCase): @@ -38,7 +37,8 @@ def tearDown(self): 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)) @@ -56,4 +56,5 @@ def test_docker_connection_module(self, mock_new_docker_verison, mock_old_docker 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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py index 74721bfe..e5761247 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/inventory/test_docker_containers.py @@ -6,25 +6,27 @@ __metaclass__ = type -import json -import textwrap - import pytest -from ansible_collections.community.docker.tests.unit.compat.mock import MagicMock - -from ansible import constants as C -from ansible.errors import AnsibleError from ansible.inventory.data import InventoryData -from ansible.inventory.manager import InventoryManager +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 templar(): + dataloader = create_autospec(DataLoader, instance=True) + return Templar(loader=dataloader) @pytest.fixture(scope="module") -def inventory(): +def inventory(templar): r = InventoryModule() r.inventory = InventoryData() + r.templar = templar return r @@ -122,6 +124,7 @@ def test_populate(inventory, mocker): 'compose': {}, 'groups': {}, 'keyed_groups': {}, + 'filters': None, })) inventory._populate(client) @@ -153,6 +156,7 @@ def test_populate_service(inventory, mocker): 'groups': {}, 'keyed_groups': {}, 'docker_host': 'unix://var/run/docker.sock', + 'filters': None, })) inventory._populate(client) @@ -194,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) @@ -220,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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py index ea003565..87769a3c 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/api/test_client.py @@ -35,7 +35,6 @@ from ansible_collections.community.docker.plugins.module_utils._api import constants, errors from ansible_collections.community.docker.plugins.module_utils._api.api.client import APIClient from ansible_collections.community.docker.plugins.module_utils._api.constants import DEFAULT_DOCKER_API_VERSION -from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import convert_filters from requests.packages import urllib3 from .. import fake_api @@ -246,56 +245,6 @@ def test_login(self): 'serveraddress': None, } - def test_events(self): - self.client.events() - - fake_request.assert_called_with( - 'GET', - url_prefix + 'events', - params={'since': None, 'until': None, 'filters': None}, - stream=True, - timeout=None - ) - - def test_events_with_since_until(self): - ts = 1356048000 - now = datetime.datetime.utcfromtimestamp(ts) - since = now - datetime.timedelta(seconds=10) - until = now + datetime.timedelta(seconds=10) - - self.client.events(since=since, until=until) - - fake_request.assert_called_with( - 'GET', - url_prefix + 'events', - params={ - 'since': ts - 10, - 'until': ts + 10, - 'filters': None - }, - stream=True, - timeout=None - ) - - def test_events_with_filters(self): - filters = {'event': ['die', 'stop'], - 'container': fake_api.FAKE_CONTAINER_ID} - - self.client.events(filters=filters) - - expected_filters = convert_filters(filters) - fake_request.assert_called_with( - 'GET', - url_prefix + 'events', - params={ - 'since': None, - 'until': None, - 'filters': expected_filters - }, - stream=True, - timeout=None - ) - def _socket_path_for_client_session(self, client): socket_adapter = client.get_adapter('http+docker://') return socket_adapter.socket_path @@ -619,7 +568,7 @@ def test_read_from_socket_no_stream_tty_demux(self): 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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/test_errors.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/test_errors.py index 96b5bd9e..2cc114ed 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/test_errors.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/test_errors.py @@ -20,11 +20,10 @@ pytestmark = pytest.mark.skip('Python 2.6 is not supported') from ansible_collections.community.docker.plugins.module_utils._api.errors import ( - APIError, ContainerError, DockerException, + APIError, DockerException, create_unexpected_kwargs_error, create_api_error_from_http_exception, ) -from .fake_api import FAKE_CONTAINER_ID, FAKE_IMAGE_ID class APIErrorTest(unittest.TestCase): diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py index 428163e6..77e5017e 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py @@ -20,14 +20,18 @@ 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 @@ def test_only_uses_tls(self): 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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/compose_v2_test_cases.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/compose_v2_test_cases.py new file mode 100644 index 00000000..d7258396 --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__logfmt.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__logfmt.py new file mode 100644 index 00000000..efcc15ff --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__logfmt.py @@ -0,0 +1,100 @@ +# Copyright (c) 2024, 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 + +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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__scramble.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__scramble.py index 5718fe34..ff004306 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__scramble.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test__scramble.py @@ -6,7 +6,6 @@ __metaclass__ = type import pytest -import tarfile from ansible_collections.community.docker.plugins.module_utils._scramble import ( scramble, diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_compose_v2.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_compose_v2.py new file mode 100644 index 00000000..7292af2a --- /dev/null +++ b/openshift/release/ansible/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/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_copy.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_copy.py index 4962cf73..3668573b 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_copy.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/module_utils/test_copy.py @@ -6,7 +6,6 @@ __metaclass__ = type import pytest -import tarfile from ansible_collections.community.docker.plugins.module_utils.copy import ( _stream_generator_to_fileobj, diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/modules/test_docker_image.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/modules/test_docker_image.py index 7755c7cc..3401837f 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/modules/test_docker_image.py +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/modules/test_docker_image.py @@ -9,10 +9,7 @@ from ansible_collections.community.docker.plugins.modules.docker_image import ImageManager -from ansible_collections.community.docker.plugins.module_utils.image_archive import ( - api_image_id, - ImageArchiveInvalidException -) +from ansible_collections.community.docker.plugins.module_utils.image_archive import api_image_id from ..test_support.docker_image_archive_stubbing import ( write_imitation_archive, diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/plugin_utils/test_unsafe.py b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/plugin_utils/test_unsafe.py new file mode 100644 index 00000000..286c51cf --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/plugins/plugin_utils/test_unsafe.py @@ -0,0 +1,133 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2024, 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 + +# Make coding more python3-ish +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + + +import pytest + +from ansible.utils.unsafe_proxy import AnsibleUnsafe + +from ansible_collections.community.docker.plugins.plugin_utils.unsafe import ( + make_unsafe, +) + + +TEST_MAKE_UNSAFE = [ + ( + u'text', + [], + [ + (), + ], + ), + ( + u'{{text}}', + [ + (), + ], + [], + ), + ( + b'text', + [], + [ + (), + ], + ), + ( + b'{{text}}', + [ + (), + ], + [], + ), + ( + { + 'skey': 'value', + 'ukey': '{{value}}', + 1: [ + 'value', + '{{value}}', + { + 1.0: '{{value}}', + 2.0: 'value', + }, + ], + }, + [ + ('ukey', ), + (1, 1), + (1, 2, 1.0), + ], + [ + ('skey', ), + (1, 0), + (1, 2, 2.0), + ], + ), + ( + ['value', '{{value}}'], + [ + (1, ), + ], + [ + (0, ), + ], + ), +] + + +@pytest.mark.parametrize("value, check_unsafe_paths, check_safe_paths", TEST_MAKE_UNSAFE) +def test_make_unsafe(value, check_unsafe_paths, check_safe_paths): + unsafe_value = make_unsafe(value) + assert unsafe_value == value + for check_path in check_unsafe_paths: + obj = unsafe_value + for elt in check_path: + obj = obj[elt] + assert isinstance(obj, AnsibleUnsafe) + for check_path in check_safe_paths: + obj = unsafe_value + for elt in check_path: + obj = obj[elt] + assert not isinstance(obj, AnsibleUnsafe) + + +def test_make_unsafe_dict_key(): + value = { + b'test': 1, + u'test': 2, + } + unsafe_value = make_unsafe(value) + assert unsafe_value == value + for obj in unsafe_value: + assert not isinstance(obj, AnsibleUnsafe) + + value = { + b'{{test}}': 1, + u'{{test}}': 2, + } + unsafe_value = make_unsafe(value) + assert unsafe_value == value + for obj in unsafe_value: + assert isinstance(obj, AnsibleUnsafe) + + +def test_make_unsafe_set(): + value = set([b'test', u'test']) + unsafe_value = make_unsafe(value) + assert unsafe_value == value + for obj in unsafe_value: + assert not isinstance(obj, AnsibleUnsafe) + + value = set([b'{{test}}', u'{{test}}']) + unsafe_value = make_unsafe(value) + assert unsafe_value == value + for obj in unsafe_value: + assert isinstance(obj, AnsibleUnsafe) diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/unit/requirements.yml b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/requirements.yml new file mode 100644 index 00000000..e91ea474 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/unit/requirements.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 + +collections: +- community.internal_test_tools +- community.library_inventory_filtering_v1 diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/utils/constraints.txt b/openshift/release/ansible/ansible_collections/community/docker/tests/utils/constraints.txt index 8d66367f..d8fcb61d 100644 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/utils/constraints.txt +++ b/openshift/release/ansible/ansible_collections/community/docker/tests/utils/constraints.txt @@ -12,6 +12,7 @@ cryptography >= 1.3.0, < 3.4 ; python_version < '3.6' # cryptography 3.4 drops s urllib3 < 1.24 ; python_version < '2.7' # urllib3 1.24 and later require python 2.7 or later wheel < 0.30.0 ; python_version < '2.7' # wheel 0.30.0 and later require python 2.7 or later paramiko < 2.4.0 ; python_version < '2.7' # paramiko 2.4.0 drops support for python 2.6 +paramiko < 3.0.0 ; python_version < '3.7' # paramiko 3.0.0 forces installation of a too new cryptography requests < 2.20.0 ; python_version < '2.7' # requests 2.20.0 drops support for python 2.6 requests < 2.28 ; python_version < '3.7' # requests 2.28.0 drops support for python < 3.7 virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later diff --git a/openshift/release/ansible/ansible_collections/community/docker/tests/utils/shippable/shippable.sh b/openshift/release/ansible/ansible_collections/community/docker/tests/utils/shippable/shippable.sh index 2ca96b88..c824e2ab 100755 --- a/openshift/release/ansible/ansible_collections/community/docker/tests/utils/shippable/shippable.sh +++ b/openshift/release/ansible/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. diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/dependabot.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/dependabot.yml new file mode 100644 index 00000000..2f4ff900 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/dependabot.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 + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/ansible-test.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/ansible-test.yml new file mode 100644 index 00000000..a9d3a296 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/ansible-test.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 + +# For the comprehensive list of the inputs supported by the ansible-community/ansible-test-gh-action GitHub Action, see +# https://github.com/marketplace/actions/ansible-test + +name: CI +on: + # Run CI against all pushes (direct commits, also merged PRs), Pull Requests + push: + branches: + - stable-* + pull_request: + # Run CI once per day (at 04:45 UTC) + schedule: + - cron: '45 4 * * *' + +jobs: + sanity: + name: Sanity (Ⓐ${{ matrix.ansible }}) + strategy: + matrix: + ansible: + # It's important that Sanity is tested against all stable-X.Y branches + # Testing against `devel` may fail as new tests are added. + - stable-2.9 + - stable-2.10 + - stable-2.11 + - stable-2.12 + - stable-2.13 + - stable-2.14 + - stable-2.15 + - stable-2.16 + - stable-2.17 + - devel + # 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 + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["stable-2.9", "stable-2.10", "stable-2.11"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} + steps: + - name: Perform sanity testing + uses: felixfontein/ansible-test-gh-action@main + with: + ansible-core-version: ${{ matrix.ansible }} + testing-type: sanity + + units: + # 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 + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["stable-2.9", "stable-2.10", "stable-2.11"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} + name: Units (Ⓐ${{ matrix.ansible }}) + strategy: + # As soon as the first unit test fails, cancel the others to free up the CI queue + fail-fast: true + matrix: + ansible: + - stable-2.9 + - stable-2.10 + - stable-2.11 + - stable-2.12 + - stable-2.13 + - stable-2.14 + - stable-2.15 + - stable-2.16 + - stable-2.17 + - devel + + steps: + - name: Perform unit testing against Ansible version ${{ matrix.ansible }} + uses: felixfontein/ansible-test-gh-action@main + with: + ansible-core-version: ${{ matrix.ansible }} + testing-type: units + # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429) + pre-test-cmd: >- + git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/docs-pr.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/docs-pr.yml new file mode 100644 index 00000000..b5a8e0d0 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/docs-pr.yml @@ -0,0 +1,92 @@ +--- +# 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: Collection Docs +concurrency: + group: docs-pr-${{ github.head_ref }} + cancel-in-progress: true +on: + pull_request_target: + types: [opened, synchronize, reopened, closed] + +env: + GHP_BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} + +jobs: + build-docs: + permissions: + contents: read + name: Build Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main + with: + collection-name: community.library_inventory_filtering_v1 + init-lenient: false + init-fail-on-error: true + squash-hierarchy: true + init-project: Community.Library_Inventory_Filtering Collection + init-copyright: Community.Library_Inventory_Filtering Contributors + init-title: Community.Library_Inventory_Filtering Collection Documentation + init-html-short-title: Community.Library_Inventory_Filtering Collection Docs + init-extra-html-theme-options: | + documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/stable-1/ + render-file-line: '> * `$` [$](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$)' + + publish-docs-gh-pages: + # for now we won't run this on forks + if: github.repository == 'ansible-collections/community.library_inventory_filtering' + permissions: + contents: write + needs: [build-docs] + name: Publish Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main + with: + artifact-name: ${{ needs.build-docs.outputs.artifact-name }} + action: ${{ (github.event.action == 'closed' || needs.build-docs.outputs.changed != 'true') && 'teardown' || 'publish' }} + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + comment: + permissions: + pull-requests: write + runs-on: ubuntu-latest + needs: [build-docs, publish-docs-gh-pages] + name: PR comments + steps: + - name: PR comment + uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main + with: + body-includes: '## Docs Build' + reactions: heart + action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }} + on-closed-body: | + ## Docs Build 📝 + + This PR is closed and any previously published docsite has been unpublished. + on-merged-body: | + ## Docs Build 📝 + + Thank you for contribution!✨ + + This PR has been merged and the docs are now incorporated into `stable-1`: + ${{ env.GHP_BASE_URL }}/branch/stable-1 + body: | + ## Docs Build 📝 + + Thank you for contribution!✨ + + The docs for **this PR** have been published here: + ${{ env.GHP_BASE_URL }}/pr/${{ github.event.number }} + + You can compare to the docs for the `stable-1` branch here: + ${{ env.GHP_BASE_URL }}/branch/stable-1 + + The docsite for **this PR** is also available for download as an artifact from this run: + ${{ needs.build-docs.outputs.artifact-url }} + + File changes: + + ${{ needs.build-docs.outputs.diff-files-rendered }} + + ${{ needs.build-docs.outputs.diff-rendered }} diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/docs-push.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/docs-push.yml new file mode 100644 index 00000000..53a4a56d --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/docs-push.yml @@ -0,0 +1,51 @@ +--- +# 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: Collection Docs +concurrency: + group: docs-push-${{ github.sha }} + cancel-in-progress: true +on: + push: + branches: + - stable-* + tags: + - '*' + # Run CI once per day (at 04:45 UTC) + schedule: + - cron: '45 4 * * *' + # Allow manual trigger (for newer antsibull-docs, sphinx-ansible-theme, ... versions) + workflow_dispatch: + +jobs: + build-docs: + permissions: + contents: read + name: Build Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-push.yml@main + with: + collection-name: community.library_inventory_filtering_v1 + init-lenient: false + init-fail-on-error: true + squash-hierarchy: true + init-project: Community.Library_Inventory_Filtering Collection + init-copyright: Community.Library_Inventory_Filtering Contributors + init-title: Community.Library_Inventory_Filtering Collection Documentation + init-html-short-title: Community.Library_Inventory_Filtering Collection Docs + init-extra-html-theme-options: | + documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/stable-1/ + + publish-docs-gh-pages: + # for now we won't run this on forks + if: github.repository == 'ansible-collections/community.library_inventory_filtering' + permissions: + contents: write + needs: [build-docs] + name: Publish Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main + with: + artifact-name: ${{ needs.build-docs.outputs.artifact-name }} + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/extra-tests.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/extra-tests.yml new file mode 100644 index 00000000..67917626 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/extra-tests.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 + +name: extra-tests +on: + # Run CI against all pushes (direct commits, also merged PRs), Pull Requests + push: + branches: + - stable-* + pull_request: + # Run CI once per day (at 04:45 UTC) + # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version + schedule: + - cron: '45 4 * * *' +env: + NAMESPACE: community + COLLECTION_NAME: library_inventory_filtering_v1 + +jobs: + extra-sanity: + name: Extra Sanity + runs-on: ubuntu-latest + steps: + + - name: Check out code + uses: actions/checkout@v4 + with: + path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install ansible-core + run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check + + - name: Install collection dependencies + run: git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ./ansible_collections/community/internal_test_tools + # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429) + # run: ansible-galaxy collection install community.internal_test_tools -p . + + - name: Run sanity tests + run: ../../community/internal_test_tools/tools/run.py --color + working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/import-galaxy.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/import-galaxy.yml new file mode 100644 index 00000000..0c0ee402 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.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/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/reuse.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/reuse.yml new file mode 100644 index 00000000..276b2ea2 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.github/workflows/reuse.yml @@ -0,0 +1,27 @@ +--- +# 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: Verify REUSE + +on: + push: + branches: + - stable-* + pull_request: + # Run CI once per day (at 04:45 UTC) + schedule: + - cron: '45 4 * * *' + +jobs: + check: + permissions: + contents: read + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v3 diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.reuse/dep5 b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.reuse/dep5 new file mode 100644 index 00000000..0c3745eb --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/.reuse/dep5 @@ -0,0 +1,5 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: changelogs/fragments/* +Copyright: Ansible Project +License: GPL-3.0-or-later diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.md b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.md new file mode 100644 index 00000000..b3ff507d --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.md @@ -0,0 +1,34 @@ +# Community Inventory Filtering Library Collection Release Notes + +**Topics** + +- v1\.0\.1 + - Release Summary +- v1\.0\.0 + - Release Summary +- v0\.1\.0 + - Release Summary + + +## v1\.0\.1 + + +### Release Summary + +Maintenance release with documentation\. + + +## v1\.0\.0 + + +### Release Summary + +First production ready release\. + + +## v0\.1\.0 + + +### Release Summary + +Initial test release\. diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.md.license b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.md.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/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/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.rst b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.rst new file mode 100644 index 00000000..4f13fcf9 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.rst @@ -0,0 +1,29 @@ +============================================================== +Community Inventory Filtering Library Collection Release Notes +============================================================== + +.. contents:: Topics + +v1.0.1 +====== + +Release Summary +--------------- + +Maintenance release with documentation. + +v1.0.0 +====== + +Release Summary +--------------- + +First production ready release. + +v0.1.0 +====== + +Release Summary +--------------- + +Initial test release. diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.rst.license b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.rst.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/CHANGELOG.rst.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/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/COPYING b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/COPYING new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/FILES.json b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/FILES.json new file mode 100644 index 00000000..332860b5 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/FILES.json @@ -0,0 +1,432 @@ +{ + "files": [ + { + "name": ".", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": ".github", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": ".github/workflows", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": ".github/workflows/ansible-test.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e4c0dfca6b656fd2a85ffa83996421299ef5b10f9f46b39231ae2505238fc355", + "format": 1 + }, + { + "name": ".github/workflows/docs-pr.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "baa2a051226089dd82bf1ca7ca9c305d2d81b0c3cf18a0bb688aecf56e269828", + "format": 1 + }, + { + "name": ".github/workflows/docs-push.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "504c9bf048c3bfc77a6428d7854c5e747d2fe8c56c033063753174469920df52", + "format": 1 + }, + { + "name": ".github/workflows/extra-tests.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "113b8c148b730d8abf8040ed7491696ddc7ab03326325945e5e721eccc3b6b16", + "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": "4c8fff4ef98f0dc1af3658b126140721ab1085979e76ed099308aa39828b297e", + "format": 1 + }, + { + "name": ".github/dependabot.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f314f2fce46d346ef9559fdeae3a55ce6d799bab45a255092446c31e17e6874d", + "format": 1 + }, + { + "name": ".reuse", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": ".reuse/dep5", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "9d8cb20d72d7e81aaf2e7f0ddce7eacdb3d47a890541717d7fae08a6cab7ebed", + "format": 1 + }, + { + "name": "LICENSES", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "LICENSES/GPL-3.0-or-later.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "format": 1 + }, + { + "name": "changelogs", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "changelogs/fragments", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "changelogs/fragments/.keep", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "format": 1 + }, + { + "name": "changelogs/changelog.yaml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ae6dc5859ee98156f3fdbdfd1f3187782cb6586248a52358f2f565774654e78c", + "format": 1 + }, + { + "name": "changelogs/changelog.yaml.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { + "name": "changelogs/config.yaml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b39f1dff98defdbedc9794ae82d77f5817d5c14144f0b6269c942bf5577a4feb", + "format": 1 + }, + { + "name": "docs", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "docs/docsite", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "docs/docsite/rst", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "docs/docsite/rst/usage_guide.rst", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "9cb7a0386071576cb076b0ac3bd680df3c3a1c22d316587c445666dadba986f3", + "format": 1 + }, + { + "name": "docs/docsite/config.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0c5ec9ff76cf4db33b5d3f771419ef50d448e5d510cb7a98fc07dd9ecee69c4e", + "format": 1 + }, + { + "name": "docs/docsite/extra-docs.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "bbc2aa66c91ee37c4aea3e5aaff25983305e48b7281dc0356506ccb1e7c05103", + "format": 1 + }, + { + "name": "docs/docsite/links.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "2844a8906b69c6d9d7ab60546c1feb624bda986c8e49c5d6f0275e8dc2f687f1", + "format": 1 + }, + { + "name": "meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "meta/runtime.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4ed63a88ab6b7c15fc1ba0c16d2accb77b3305fff800731770f40609a7593393", + "format": 1 + }, + { + "name": "plugins", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "plugins/doc_fragments", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "plugins/doc_fragments/inventory_filter.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "2ab92d32537a93231ac4c6d9acb96537c5bb8638841c134613c664a5222acaee", + "format": 1 + }, + { + "name": "plugins/plugin_utils", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "plugins/plugin_utils/inventory_filter.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ba30f4d33b81c74a18cab8cbce209c84833789b81867b0e1be01d687472e03bb", + "format": 1 + }, + { + "name": "tests", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/sanity", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/sanity/extra", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/sanity/extra/extra-docs.json", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6c7fbc8a07fa803ce062387232eb0d0198a311f5347493f06c19a07aa45a9bf6", + "format": 1 + }, + { + "name": "tests/sanity/extra/extra-docs.json.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { + "name": "tests/sanity/extra/extra-docs.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c52e316daf1292bbb063be19429fd1f06e02bce3c9d4622a8dfc61fa3af06688", + "format": 1 + }, + { + "name": "tests/sanity/extra/licenses.json", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "8c111eb62fa6f1b6c8a1260e9ff06c8b76ef8244428c6289969d79678093618f", + "format": 1 + }, + { + "name": "tests/sanity/extra/licenses.json.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { + "name": "tests/sanity/extra/licenses.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ff502f0707adf15a57b2fc48842fc47d154bfbd3aeadf4c0c05e96b0589c3cd4", + "format": 1 + }, + { + "name": "tests/sanity/extra/licenses.py.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "88f745b5d91e1371369c207e3392877af6f3e1de48fbaca63a728d4dcf79e03c", + "format": 1 + }, + { + "name": "tests/sanity/extra/no-unwanted-files.json", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a3d3b17f699b042958c7cd845a9d685bc935d83062e0bcf077f2c7200e2c0bac", + "format": 1 + }, + { + "name": "tests/sanity/extra/no-unwanted-files.json.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { + "name": "tests/sanity/extra/no-unwanted-files.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "416fdc4ddd0ad89ddad54bcacc8bf5790d3a9610f7c059167123046849f0ade9", + "format": 1 + }, + { + "name": "tests/unit", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/unit/plugins", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/unit/plugins/plugin_utils", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/unit/plugins/plugin_utils/test_inventory_filter.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "7cd8dcd9c83396681e88db981df8505debf3df6f5ea383f19d5f4886b8eac6ef", + "format": 1 + }, + { + "name": "tests/unit/requirements.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "dbf3688bcda2816222b33ee535d6513ddc5c7814bcf91d9aefb85911b49f344d", + "format": 1 + }, + { + "name": "tests/unit/requirements.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "999b6bb4a4234b1f38abb63cbd57d40af2d93bcff2260ab088e09157a055abaf", + "format": 1 + }, + { + "name": "tests/config.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "498d46cf08b5abb09880088fa8fd142315f7f775e94cdc7d41364ed20fc2cd65", + "format": 1 + }, + { + "name": "CHANGELOG.md", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e5dc2d05e3fe257bcfd97b59ff5b7a0fcbcef18a7b3204b866d930b304e89c91", + "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": "8e3955ac95e2b3189609b191684a7a3164551c2583fa1389536635a2b3291e75", + "format": 1 + }, + { + "name": "CHANGELOG.rst.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { + "name": "COPYING", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "format": 1 + }, + { + "name": "README.md", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "bef45f0f502d9a001eaf1300ae1480acc6930ddd543741d4dc26e1bd85b7001f", + "format": 1 + }, + { + "name": "codecov.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "fccd5fc7ac924bcb9b7269c4ecd7c0fa7f25ed9fa1a88ced6f06f933a4f9b391", + "format": 1 + } + ], + "format": 1 +} \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/LICENSES/GPL-3.0-or-later.txt b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/LICENSES/GPL-3.0-or-later.txt new file mode 120000 index 00000000..012065c8 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/LICENSES/GPL-3.0-or-later.txt @@ -0,0 +1 @@ +../COPYING \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/MANIFEST.json b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/MANIFEST.json new file mode 100644 index 00000000..19de3ad4 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/MANIFEST.json @@ -0,0 +1,33 @@ +{ + "collection_info": { + "namespace": "community", + "name": "library_inventory_filtering_v1", + "version": "1.0.1", + "authors": [ + "Felix Fontein (github.com/felixfontein)" + ], + "readme": "README.md", + "tags": [ + "inventory", + "filtering" + ], + "description": "Library for inventory plugins in other collections that allows to filter hosts in a generic way.", + "license": [ + "GPL-3.0-or-later" + ], + "license_file": null, + "dependencies": {}, + "repository": "https://github.com/ansible-collections/community.library_inventory_filtering", + "documentation": null, + "homepage": "https://github.com/ansible-collections/community.library_inventory_filtering", + "issues": "https://github.com/ansible-collections/community.library_inventory_filtering/issues" + }, + "file_manifest_file": { + "name": "FILES.json", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3a7e23348c6de582464cfc3937c64cc325727e3e6514fef783ecaa3328fe3ee1", + "format": 1 + }, + "format": 1 +} \ No newline at end of file diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/README.md b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/README.md new file mode 100644 index 00000000..c29686f7 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/README.md @@ -0,0 +1,74 @@ + + +# Community Inventory Filtering Library Collection +[![CI](https://github.com/ansible-collections/community.library_inventory_filtering/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/community.library_inventory_filtering/actions) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.library_inventory_filtering)](https://codecov.io/gh/ansible-collections/community.library_inventory_filtering) + +This repository contains the `community.library_inventory_filtering_v1` Ansible Collection. The collection includes helpers for use with other collections, that allow inventory plugins to offer common filtering functionality. + +## Tested with Ansible + +Tested with the current Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14, ansible-core 2.15, ansible-core 2.16, and ansible-core 2.17 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported. + +## Included content + +- `inventory_filter` docs fragment and plugin utils. + +## Using this collection + +Usually this collection is installed as a dependency of another collection. You do not need to install it explicitly. + +See [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for general instructions on how to use collections. + +## Collection Documentation + +Browsing the [**latest** collection documentation](https://docs.ansible.com/ansible/latest/collections/community/library_inventory_filtering_v1) will show docs for the _latest version released in the Ansible package_, not the latest version of the collection released on Galaxy. + +Browsing the [**devel** collection documentation](https://docs.ansible.com/ansible/devel/collections/community/library_inventory_filtering_v1) shows docs for the _latest version released on Galaxy_. + +We also separately publish [**latest commit** collection documentation](https://ansible-collections.github.io/community.library_inventory_filtering/branch/stable-1/) which shows docs for the _latest commit in the `stable-1` branch_. + +If you use the Ansible package and do not update collections independently, use **latest**. If you install or update this collection directly from Galaxy, use **devel**. If you are looking to contribute, use **latest commit**. + +## Contributing to this collection + +If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATH`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there. + +You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html). + +## Release notes + +See the [changelog](https://github.com/ansible-collections/community.library_inventory_filtering/tree/stable-1/CHANGELOG.md). + +## Releasing, Versioning and Deprecation + +This collection follows [Semantic Versioning](https://semver.org/). More details on versioning can be found [in the Ansible docs](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#collection-versions). + +We plan to regularly release new minor or bugfix versions once new features or bugfixes have been implemented. + +Releasing the major version X happens from the `stable-X` branch. The collection name depends on the major branch; the collections released from `stable-1` have a `_v1` suffix; the collections released from `stable-2` have a `_v2` suffix; and so on. The different suffix allows to install multiple major releases of the collection in parallel. This makes it possible to migrate some collections to major version 2 without forcing to upgrade all of them simultaneously. + +Features might be backported to earlier stable branches. Bugfixes are backported as long as these stable branches are still maintained. Generally stable branches should still be maintained as long as they are still used by maintained branches of collections. Backporting bugfixes or creating more specialized bugfixes for stable branches might need to be done by the maintainers of the collections still using these branches. + +Since multiple versions are maintained in parallel, there is no need to wait between deprecation and removal. Removal requires a new major release (and thus a new collection name due to a different version suffix). + +## More information + +- [Ansible Collection overview](https://github.com/ansible-collections/overview) +- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html) +- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html) +- [Ansible Collections Checklist](https://github.com/ansible-collections/overview/blob/master/collection_requirements.rst) +- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) +- [The Bullhorn (the Ansible Contributor newsletter)](https://us19.campaign-archive.com/home/?u=56d874e027110e35dea0e03c1&id=d6635f5420) +- [Changes impacting Contributors](https://github.com/ansible-collections/overview/issues/45) + +## Licensing + +This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later. + +See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.library_inventory_filtering/blob/stable-1/COPYING) for the full text. + +All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `.reuse/dep5`. This conforms to the [REUSE specification](https://reuse.software/spec/). diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/changelog.yaml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/changelog.yaml new file mode 100644 index 00000000..b4bf6bbc --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/changelog.yaml @@ -0,0 +1,20 @@ +ancestor: null +releases: + 0.1.0: + changes: + release_summary: Initial test release. + fragments: + - 0.1.0.yml + release_date: '2023-12-07' + 1.0.0: + changes: + release_summary: First production ready release. + fragments: + - 1.0.0.yml + release_date: '2023-12-28' + 1.0.1: + changes: + release_summary: Maintenance release with documentation. + fragments: + - 1.0.1.yml + release_date: '2024-04-21' diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/changelog.yaml.license b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/changelog.yaml.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/changelog.yaml.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/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/config.yaml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/config.yaml new file mode 100644 index 00000000..cdfc8f32 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/config.yaml @@ -0,0 +1,38 @@ +--- +# 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 + +changelog_filename_template: ../CHANGELOG.rst +changelog_filename_version_depth: 0 +changes_file: changelog.yaml +changes_format: combined +keep_fragments: false +mention_ancestor: true +new_plugins_after_name: removed_features +notesdir: fragments +output_formats: +- rst +- md +prelude_section_name: release_summary +prelude_section_title: Release Summary +sections: +- - major_changes + - Major Changes +- - minor_changes + - Minor Changes +- - breaking_changes + - Breaking Changes / Porting Guide +- - deprecated_features + - Deprecated Features +- - removed_features + - Removed Features (previously deprecated) +- - security_fixes + - Security Fixes +- - bugfixes + - Bugfixes +- - known_issues + - Known Issues +title: Community Inventory Filtering Library Collection +trivial_section_name: trivial +use_fqcn: true diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/fragments/.keep b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/changelogs/fragments/.keep new file mode 100644 index 00000000..e69de29b diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/codecov.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/codecov.yml new file mode 100644 index 00000000..200063a8 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/codecov.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 + +fixes: + - "ansible_collections/community/library_inventory_filtering_v1/::" diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/config.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/config.yml new file mode 100644 index 00000000..1d6cf855 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/config.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 + +changelog: + write_changelog: true diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/extra-docs.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/extra-docs.yml new file mode 100644 index 00000000..55abd220 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/extra-docs.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 + +sections: + - title: Usage guide + toctree: + - usage_guide diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/links.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/links.yml new file mode 100644 index 00000000..0346f180 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/links.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 + +edit_on_github: + repository: ansible-collections/community.library_inventory_filtering + branch: stable-1 + path_prefix: '' + +extra_links: + - description: Submit a bug report + url: https://github.com/ansible-collections/community.library_inventory_filtering/issues/new?assignees=&labels=&template=bug_report.md + - description: Request a feature + url: https://github.com/ansible-collections/community.library_inventory_filtering/issues/new?assignees=&labels=&template=feature_request.md + +communication: + matrix_rooms: + - topic: General usage and support questions + room: '#community:ansible.im' diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/rst/usage_guide.rst b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/rst/usage_guide.rst new file mode 100644 index 00000000..d1b1e837 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/docs/docsite/rst/usage_guide.rst @@ -0,0 +1,75 @@ +.. + 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 + +.. _ansible_collections.community.library_inventory_filtering_v1.docsite.usage_guide: + +Usage Guide +=========== + +The `community.library_inventory_filtering_v1 collection `_ enables other collections to add common filter functionality to inventory plugins. + +.. contents:: + :local: + :depth: 1 + + +Requirements +------------ + +The ``stable-1`` branch of this collection, released as , works with all ansible-base and ansible-core versions, and with Ansible >= 2.9.10. + +Adding filter functionality to an inventory plugin +-------------------------------------------------- + +The preferred way to use this collection is to use the ``inventory_filter`` docs fragment and the ``inventory_filter`` plugin utils. + +To use the documentation fragment, add it to the ``extends_documentation_fragment`` list in ``DOCUMENTATION``: + +.. code-block:: yaml + + extends_documentation_fragment: + - community.library_inventory_filtering_v1.inventory_filter + +For the filtering, you need to import two functions from the plugin util, ``parse_filters()`` and ``filter_host()``: + +.. code-block:: python + + from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import ( + parse_filters, + filter_host, + ) + +You can use ``parse_filters()`` to parse the ``filters`` option's value (``self.get_option('filters')``), and ``filter_host()`` to determine whether to include a host: + +.. code-block:: python + + class InventoryModule(BaseInventoryPlugin, ...): + + def parse(self, inventory, loader, path, cache=True): + super(InventoryModule, self).parse(inventory, loader, path, cache) + self._read_config_data(path) + + ... + + # Parse the filters option + filters = parse_filters(self.get_option('filters')) + + ... + + for host in hosts: + # Compile the host vars + host_vars = ... + + # Now we can evaluate potential filter conditions + # based on the host name and host vars: + if not filter_host(self, host, host_vars, filters): + continue + + # Add the host with its vars + self.inventory.add_host(name) + for key, value in host_vars.items(): + self.inventory.set_variable(name, key, value) + + ... diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/meta/runtime.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/meta/runtime.yml new file mode 100644 index 00000000..d642fb89 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/meta/runtime.yml @@ -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 + +requires_ansible: '>=2.9.10' diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/plugins/doc_fragments/inventory_filter.py b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/plugins/doc_fragments/inventory_filter.py new file mode 100644 index 00000000..64ce2fa5 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/plugins/doc_fragments/inventory_filter.py @@ -0,0 +1,36 @@ +# -*- coding: utf-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 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Docker doc fragment + DOCUMENTATION = r''' +options: + filters: + description: + - A list of include/exclude filters that allows to select/deselect hosts for this inventory. + - Filters are processed sequentially until the first filter where O(filters[].exclude) or + O(filters[].include) matches is found. In case O(filters[].exclude) matches, the host is + excluded, and in case O(filters[].include) matches, the host is included. In case no filter + matches, the host is included. + type: list + elements: dict + suboptions: + exclude: + description: + - A Jinja2 condition. If it matches for a host, that host is B(excluded). + - Exactly one of O(filters[].exclude) and O(filters[].include) can be specified. + type: str + include: + description: + - A Jinja2 condition. If it matches for a host, that host is B(included). + - Exactly one of O(filters[].exclude) and O(filters[].include) can be specified. + type: str +''' diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/plugins/plugin_utils/inventory_filter.py b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/plugins/plugin_utils/inventory_filter.py new file mode 100644 index 00000000..460dc208 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/plugins/plugin_utils/inventory_filter.py @@ -0,0 +1,91 @@ +# -*- coding: utf-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 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.errors import AnsibleError, AnsibleParserError +from ansible.module_utils.common._collections_compat import Mapping +from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.parsing.convert_bool import boolean +from ansible.module_utils.six import string_types + + +_ALLOWED_KEYS = ('include', 'exclude') + + +def parse_filters(filters): + """ + Parse get_option('filter') and return normalized version to be fed into filter_host(). + """ + result = [] + if filters is None: + return result + for index, filter in enumerate(filters): + if not isinstance(filter, Mapping): + raise AnsibleError('filter[{index}] must be a dictionary'.format( + index=index + 1, + )) + if len(filter) != 1: + raise AnsibleError('filter[{index}] must have exactly one key-value pair'.format( + index=index + 1, + )) + key, value = list(filter.items())[0] + if key not in _ALLOWED_KEYS: + raise AnsibleError('filter[{index}] must have a {allowed_keys} key, not "{key}"'.format( + index=index + 1, + key=key, + allowed_keys=' or '.join('"{key}"'.format(key=key) for key in _ALLOWED_KEYS), + )) + if not isinstance(value, (string_types, bool)): + raise AnsibleError('filter[{index}].{key} must be a string, not {value_type}'.format( + index=index + 1, + key=key, + value_type=type(value), + )) + result.append(filter) + return result + + +def filter_host(inventory_plugin, host, host_vars, filters): + """ + Determine whether a host should be accepted (``True``) or not (``False``). + """ + vars = { + 'inventory_hostname': host, + } + if host_vars: + vars.update(host_vars) + + def evaluate(condition): + if isinstance(condition, bool): + return condition + conditional = "{%% if %s %%} True {%% else %%} False {%% endif %%}" % condition + templar = inventory_plugin.templar + old_vars = templar.available_variables + try: + templar.available_variables = vars + return boolean(templar.template(conditional)) + except Exception as e: + raise AnsibleParserError("Could not evaluate filter condition {condition!r} for host {host}: {err}".format( + host=host, + condition=condition, + err=to_native(e), + )) + finally: + templar.available_variables = old_vars + + for filter in filters: + if 'include' in filter: + expr = filter['include'] + if evaluate(expr): + return True + if 'exclude' in filter: + expr = filter['exclude'] + if evaluate(expr): + return False + + return True diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/config.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/config.yml new file mode 100644 index 00000000..38590f2e --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/config.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 + +# See template for more information: +# https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/config/config.yml +modules: + python_requires: default diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.json b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.json new file mode 100644 index 00000000..9a28d174 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.json @@ -0,0 +1,13 @@ +{ + "include_symlinks": false, + "prefixes": [ + "docs/docsite/", + "plugins/", + "roles/" + ], + "output": "path-line-column-message", + "requirements": [ + "ansible-core", + "antsibull-docs" + ] +} diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.json.license b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.json.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.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/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.py b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.py new file mode 100755 index 00000000..251e6d70 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/extra-docs.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# 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 +"""Check extra collection docs with antsibull-docs.""" +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import sys +import subprocess + + +def main(): + """Main entry point.""" + env = os.environ.copy() + 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', '--skip-rstcheck', '.'], + env=env, + check=False, + ) + if p.returncode not in (0, 3): + print('{0}:0:0: unexpected return code {1}'.format(sys.argv[0], p.returncode)) + + +if __name__ == '__main__': + main() diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.json b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.json new file mode 100644 index 00000000..50e47ca8 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.json @@ -0,0 +1,4 @@ +{ + "include_symlinks": false, + "output": "path-message" +} diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.json.license b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.json.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.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/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.py b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.py new file mode 100755 index 00000000..80eb795e --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python +# 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 +"""Prevent files without a correct license identifier from being added to the source tree.""" +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import glob +import sys + + +def format_license_list(licenses): + if not licenses: + return '(empty)' + return ', '.join(['"%s"' % license for license in licenses]) + + +def find_licenses(filename, relax=False): + spdx_license_identifiers = [] + other_license_identifiers = [] + has_copyright = False + try: + with open(filename, 'r', encoding='utf-8') as f: + for line in f: + line = line.rstrip() + if 'Copyright ' in line: + has_copyright = True + if 'Copyright: ' in line: + print('%s: found copyright line with "Copyright:". Please remove the colon.' % (filename, )) + if 'SPDX-FileCopyrightText: ' in line: + has_copyright = True + idx = line.find('SPDX-License-Identifier: ') + if idx >= 0: + lic_id = line[idx + len('SPDX-License-Identifier: '):] + spdx_license_identifiers.extend(lic_id.split(' OR ')) + if 'GNU General Public License' in line: + if 'v3.0+' in line: + other_license_identifiers.append('GPL-3.0-or-later') + if 'version 3 or later' in line: + other_license_identifiers.append('GPL-3.0-or-later') + if 'Simplified BSD License' in line: + other_license_identifiers.append('BSD-2-Clause') + if 'Apache License 2.0' in line: + other_license_identifiers.append('Apache-2.0') + if 'PSF License' in line or 'Python-2.0' in line: + other_license_identifiers.append('PSF-2.0') + if 'MIT License' in line: + other_license_identifiers.append('MIT') + except Exception as exc: + print('%s: error while processing file: %s' % (filename, exc)) + if len(set(spdx_license_identifiers)) < len(spdx_license_identifiers): + print('%s: found identical SPDX-License-Identifier values' % (filename, )) + if other_license_identifiers and set(other_license_identifiers) != set(spdx_license_identifiers): + print('%s: SPDX-License-Identifier yielded the license list %s, while manual guessing yielded the license list %s' % ( + filename, format_license_list(spdx_license_identifiers), format_license_list(other_license_identifiers))) + if not has_copyright and not relax: + print('%s: found no copyright notice' % (filename, )) + return sorted(spdx_license_identifiers) + + +def main(): + """Main entry point.""" + paths = sys.argv[1:] or sys.stdin.read().splitlines() + + # The following paths are allowed to have no license identifier + no_comments_allowed = [ + 'changelogs/fragments/*.yml', + 'changelogs/fragments/*.yaml', + ] + + # These files are completely ignored + ignore_paths = [ + '.ansible-test-timeout.json', + '.reuse/dep5', + 'LICENSES/*.txt', + 'COPYING', + ] + + no_comments_allowed = [fn for pattern in no_comments_allowed for fn in glob.glob(pattern)] + ignore_paths = [fn for pattern in ignore_paths for fn in glob.glob(pattern)] + + valid_licenses = [license_file[len('LICENSES/'):-len('.txt')] for license_file in glob.glob('LICENSES/*.txt')] + + for path in paths: + if path.startswith('./'): + path = path[2:] + if path in ignore_paths or path.startswith('tests/output/'): + continue + if os.stat(path).st_size == 0: + continue + if not path.endswith('.license') and os.path.exists(path + '.license'): + path = path + '.license' + valid_licenses_for_path = valid_licenses + if path.startswith('plugins/') and not path.startswith(('plugins/modules/', 'plugins/module_utils/')): + valid_licenses_for_path = [license for license in valid_licenses if license == 'GPL-3.0-or-later'] + licenses = find_licenses(path, relax=path in no_comments_allowed) + if not licenses: + if path not in no_comments_allowed: + print('%s: must have at least one license' % (path, )) + else: + for license in licenses: + if license not in valid_licenses_for_path: + print('%s: found not allowed license "%s", must be one of %s' % ( + path, license, format_license_list(valid_licenses_for_path))) + + +if __name__ == '__main__': + main() diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.py.license b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.py.license new file mode 100644 index 00000000..6c4958fe --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/licenses.py.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: 2022, Felix Fontein diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.json b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.json new file mode 100644 index 00000000..c789a7fd --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.json @@ -0,0 +1,7 @@ +{ + "include_symlinks": true, + "prefixes": [ + "plugins/" + ], + "output": "path-message" +} diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.json.license b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.json.license new file mode 100644 index 00000000..edff8c76 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.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/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.py b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.py new file mode 100755 index 00000000..51444ab7 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/sanity/extra/no-unwanted-files.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python +# 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 +"""Prevent unwanted files from being added to the source tree.""" +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import sys + + +def main(): + """Main entry point.""" + paths = sys.argv[1:] or sys.stdin.read().splitlines() + + allowed_extensions = ( + '.cs', + '.ps1', + '.psm1', + '.py', + ) + + skip_paths = set([ + ]) + + skip_directories = ( + ) + + for path in paths: + if path in skip_paths: + continue + + if any(path.startswith(skip_directory) for skip_directory in skip_directories): + continue + + ext = os.path.splitext(path)[1] + + if ext not in allowed_extensions: + print('%s: extension must be one of: %s' % (path, ', '.join(allowed_extensions))) + + +if __name__ == '__main__': + main() diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/plugins/plugin_utils/test_inventory_filter.py b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/plugins/plugin_utils/test_inventory_filter.py new file mode 100644 index 00000000..5d354f05 --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/plugins/plugin_utils/test_inventory_filter.py @@ -0,0 +1,114 @@ +# Copyright (c), Felix Fontein , 2023 +# 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.errors import AnsibleError, AnsibleParserError +from ansible.template import Templar + +from mock import MagicMock +from ansible_collections.community.internal_test_tools.tests.unit.mock.loader import DictDataLoader + +from .....plugins.plugin_utils.inventory_filter import parse_filters, filter_host + + +@pytest.fixture(scope='module') +def inventory(): + r = MagicMock() + r.templar = Templar(loader=DictDataLoader({})) + return r + + +@pytest.mark.parametrize('input', [ + None, + [], + [{'include': 'foo'}], + [{'include': True}], + [{'exclude': 'foo'}], + [{'exclude': False}], +]) +def test_parse_success(input): + result = parse_filters(input) + print(result) + assert result == (input or []) + + +@pytest.mark.parametrize('input, output', [ + ( + [23], + ('filter[1] must be a dictionary', ), + ), + ( + [{}], + ('filter[1] must have exactly one key-value pair', ), + ), + ( + [{'a': 'b', 'c': 'd'}], + ('filter[1] must have exactly one key-value pair', ), + ), + ( + [{'foo': 'bar'}], + ('filter[1] must have a "include" or "exclude" key, not "foo"', ), + ), + ( + [{'include': 23}], + ( + "filter[1].include must be a string, not ", + "filter[1].include must be a string, not ", + ), + ), +]) +def test_parse_errors(input, output): + with pytest.raises(AnsibleError) as exc: + parse_filters(input) + + print(exc.value.args[0]) + assert exc.value.args[0] in output + + +@pytest.mark.parametrize('host, host_vars, filters, result', [ + ( + 'example.com', + {}, + [], + True, + ), + ( + 'example.com', + {'foo': 'bar'}, + [{'include': 'inventory_hostname == "example.com"'}, {'exclude': 'true'}], + True, + ), + ( + 'example.com', + {}, + [{'include': 'inventory_hostname == "foo.com"'}, {'exclude': 'false'}, {'exclude': True}], + False, + ), +]) +def test_filter_success(inventory, host, host_vars, filters, result): + assert filter_host(inventory, host, host_vars, filters) == result + + +@pytest.mark.parametrize('host, host_vars, filters, result', [ + ( + 'example.com', + {}, + [{'include': 'foobar'}], + ( + "Could not evaluate filter condition 'foobar' for host example.com: 'foobar' is undefined", + "Could not evaluate filter condition 'foobar' for host example.com: 'foobar' is undefined. 'foobar' is undefined", + ), + ), +]) +def test_filter_errors(inventory, host, host_vars, filters, result): + with pytest.raises(AnsibleParserError) as exc: + filter_host(inventory, host, host_vars, filters) + + print(exc.value.args[0]) + assert exc.value.args[0] in result diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/requirements.txt b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/requirements.txt new file mode 100644 index 00000000..4e4af39b --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/requirements.txt @@ -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 + +unittest2 ; python_version < '2.7' +importlib ; python_version < '2.7' diff --git a/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/requirements.yml b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/requirements.yml new file mode 100644 index 00000000..586a6a1b --- /dev/null +++ b/openshift/release/ansible/ansible_collections/community/library_inventory_filtering_v1/tests/unit/requirements.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 + +collections: +- community.internal_test_tools diff --git a/openshift/release/ansible/requirements.yml b/openshift/release/ansible/requirements.yml index 26238679..2060e872 100644 --- a/openshift/release/ansible/requirements.yml +++ b/openshift/release/ansible/requirements.yml @@ -7,4 +7,4 @@ collections: - name: cloud.common version: "2.1.1" - name: community.docker - version: "3.4.0" \ No newline at end of file + version: "3.10.3" \ No newline at end of file