mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Use FQCNs. (#1180)
This commit is contained in:
@@ -9,26 +9,26 @@
|
||||
####################################################################
|
||||
|
||||
- name: List inspection results for all docker networks
|
||||
docker_host_info:
|
||||
community.docker.docker_host_info:
|
||||
networks: true
|
||||
verbose_output: true
|
||||
register: all_networks
|
||||
|
||||
- name: Show inspection results for all docker networks
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: all_networks.networks
|
||||
|
||||
- name: Create random name prefix
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
|
||||
cnames: []
|
||||
dnetworks: []
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "Using name prefix {{ name_prefix }}"
|
||||
|
||||
- block:
|
||||
- include_tasks: run-test.yml
|
||||
- ansible.builtin.include_tasks: run-test.yml
|
||||
with_fileglob:
|
||||
- "tests/*.yml"
|
||||
loop_control:
|
||||
@@ -36,13 +36,13 @@
|
||||
|
||||
always:
|
||||
- name: "Make sure all containers are removed"
|
||||
docker_container:
|
||||
community.docker.docker_container:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
force_kill: true
|
||||
loop: "{{ cnames }}"
|
||||
- name: "Make sure all networks are removed"
|
||||
docker_network:
|
||||
community.docker.docker_network:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
force: true
|
||||
@@ -50,5 +50,5 @@
|
||||
|
||||
when: docker_api_version is version('1.25', '>=') # FIXME: find out API version!
|
||||
|
||||
- fail: msg="Too old docker / docker-py version to run docker_network tests!"
|
||||
- ansible.builtin.fail: msg="Too old docker / docker-py version to run docker_network tests!"
|
||||
when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
|
||||
|
||||
Reference in New Issue
Block a user