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:
Felix Fontein
2021-09-10 22:10:35 +02:00
committed by GitHub
parent 5a3ce51049
commit 40f61ae8c8
3 changed files with 36 additions and 26 deletions
@@ -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) }}"