mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
6e04a1dbdc
* First round of integration tests for docker_container. * Added regression test for #45700. * Work around dict order randomization.
23 lines
596 B
YAML
23 lines
596 B
YAML
---
|
|
- block:
|
|
- name: Create random container name prefix
|
|
set_fact:
|
|
cname_prefix: "{{ 'ansible-test-%0x' % ((2**32) | random) }}"
|
|
cnames: []
|
|
|
|
- debug:
|
|
msg: "Using container name prefix {{ cname_prefix }}"
|
|
|
|
- block:
|
|
- include_tasks: run-test.yml
|
|
with_fileglob:
|
|
- "tests/*.yml"
|
|
|
|
always:
|
|
- name: "Make sure all containers are removed"
|
|
docker_container:
|
|
name: "{{ item }}"
|
|
state: absent
|
|
stop_timeout: 1
|
|
with_items: "{{ cnames }}"
|
|
when: ansible_os_family != 'RedHat' or ansible_distribution_major_version != '6'
|