mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
docker_network: improve test failure debugging (#201)
* Show inspection results for all Docker networks before running docker_network tests. * AZP/Docker seems to prefer networks in 172.0.0.0/8, so we use 10.0.0.0/8 for our tests. * Fix use of wrong variable.
This commit is contained in:
@@ -4,6 +4,16 @@
|
||||
# and should not be used as examples of how to write Ansible roles #
|
||||
####################################################################
|
||||
|
||||
- name: List inspection results for all docker networks
|
||||
docker_host_info:
|
||||
networks: true
|
||||
verbose_output: true
|
||||
register: all_networks
|
||||
|
||||
- name: Show inspection results for all docker networks
|
||||
debug:
|
||||
var: all_networks.networks
|
||||
|
||||
- name: Create random name prefix
|
||||
set_fact:
|
||||
name_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
|
||||
|
||||
Reference in New Issue
Block a user