Fix CI (docker_container tests fail because of missing ipaddress) (#218)

* Use stdlib ipaddress, resp. install when needed.

* Make sure facts on controller are available.
This commit is contained in:
Felix Fontein
2021-10-07 13:15:51 +02:00
committed by GitHub
parent 4070dab9a8
commit f4b1d34357
2 changed files with 15 additions and 2 deletions
@@ -4,6 +4,19 @@
# and should not be used as examples of how to write Ansible roles #
####################################################################
- name: Gather facts on controller
setup:
gather_subset: '!all'
delegate_to: localhost
delegate_facts: true
run_once: true
- name: Make sure ipaddress is available on controller
pip:
name: ipaddress
delegate_to: localhost
when: hostvars['localhost'].ansible_facts.python.version.major < 3
# Create random name prefix (for containers, networks, ...)
- name: Create random container name prefix
set_fact: