mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
596 B
YAML
24 lines
596 B
YAML
6 years ago
|
---
|
||
|
- 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'
|