Prepare docker tests for AZP. (#1482)

Backport of important parts of https://github.com/ansible-collections/community.docker/pull/48 to stable-1.
This commit is contained in:
Felix Fontein 2020-12-15 21:04:09 +01:00 committed by GitHub
commit a16164cb72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 144 additions and 9 deletions

View file

@ -23,10 +23,10 @@
when: docker_py_version is version('1.10.0', '>=')
- set_fact:
subnet_ipv4_base: 192.168.{{ 64 + (192 | random) }}
subnet_ipv4_base: 10.{{ 16 + (240 | random) }}.{{ 16 + (240 | random) }}
subnet_ipv6_base: fdb6:feea:{{ '%0.4x:%0.4x' | format(65536 | random, 65536 | random) }}
# If netaddr would be installed on the controller, one could do:
# subnet_ipv4: "192.168.{{ 64 + (192 | random) }}.0/24"
# subnet_ipv4: "10.{{ 16 + (240 | random) }}.{{ 16 + (240 | random) }}.0/24"
# subnet_ipv6: "fdb6:feea:{{ '%0.4x:%0.4x' | format(65536 | random, 65536 | random) }}::/64"
- set_fact: