Use FQCNs. (#1180)

This commit is contained in:
Felix Fontein
2025-10-25 10:12:21 +02:00
committed by GitHub
parent be000755fc
commit b24bce77b6
196 changed files with 3289 additions and 3289 deletions
@@ -4,23 +4,23 @@
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Create random name prefix
set_fact:
ansible.builtin.set_fact:
name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
- name: Create image and container list
set_fact:
ansible.builtin.set_fact:
inames: []
cnames: []
- debug:
- ansible.builtin.debug:
msg: "Using name prefix {{ name_prefix }}"
- name: Create files directory
file:
ansible.builtin.file:
path: '{{ remote_tmp_dir }}/files'
state: directory
- name: Template files
template:
ansible.builtin.template:
src: '{{ item }}'
dest: '{{ remote_tmp_dir }}/files/{{ item }}'
loop:
@@ -31,22 +31,22 @@
- SecretsDockerfile
- StagedDockerfile
- debug:
- ansible.builtin.debug:
msg: "Has buildx plugin: {{ docker_has_buildx }}"
- block:
- name: Determine plugin versions
command: docker info -f '{{ "{{" }}json .ClientInfo.Plugins{{ "}}" }}'
ansible.builtin.command: docker info -f '{{ "{{" }}json .ClientInfo.Plugins{{ "}}" }}'
register: plugin_versions
- name: Determine buildx plugin version
set_fact:
ansible.builtin.set_fact:
buildx_version: >-
{{
(plugin_versions.stdout | from_json | selectattr('Name', 'eq', 'buildx') | map(attribute='Version') | first).lstrip('v')
}}
- include_tasks: run-test.yml
- ansible.builtin.include_tasks: run-test.yml
with_fileglob:
- "tests/*.yml"
loop_control:
@@ -54,12 +54,12 @@
always:
- name: "Make sure all images are removed"
docker_image:
community.docker.docker_image:
name: "{{ item }}"
state: absent
with_items: "{{ inames }}"
- name: "Make sure all containers are removed"
docker_container:
community.docker.docker_container:
name: "{{ item }}"
state: absent
force_kill: true
@@ -67,5 +67,5 @@
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!"
- ansible.builtin.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