mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-12 19:07:24 +00:00
Add EE support, support GHA in current_container_facts (#336)
* Try adding EE support. * Use GHA instead of AZP for EE tests. * Update changelog fragment, extend tests. * Disable current_container_facts test. * Increase verbosity. * 2.9 compatibility. * Use docker instead of podman for building EE and running tests in it. * Output some more information (helpful for debugging). * Fix GHA handling for current_container_facts. * Try to fix permissions.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
---
|
||||
# Create random name prefix (for containers, networks, ...)
|
||||
- name: Create random container name prefix
|
||||
set_fact:
|
||||
cname_prefix: "{{ 'ansible-docker-test-%0x' % ((2**32) | random) }}"
|
||||
|
||||
- name: Create project and container names
|
||||
set_fact:
|
||||
pname: "{{ cname_prefix }}"
|
||||
cname: "{{ cname_prefix }}-hi"
|
||||
|
||||
- name: Define service
|
||||
set_fact:
|
||||
test_service: |
|
||||
version: '3'
|
||||
services:
|
||||
{{ cname }}:
|
||||
image: "{{ docker_test_image_alpine }}"
|
||||
command: '/bin/sh -c "sleep 10m"'
|
||||
stop_grace_period: 1s
|
||||
|
||||
- name: Present
|
||||
community.docker.docker_compose:
|
||||
project_name: "{{ pname }}"
|
||||
state: present
|
||||
remove_orphans: true
|
||||
definition: "{{ test_service | from_yaml }}"
|
||||
|
||||
- name: Absent
|
||||
community.docker.docker_compose:
|
||||
project_name: "{{ pname }}"
|
||||
state: absent
|
||||
remove_orphans: true
|
||||
definition: "{{ test_service | from_yaml }}"
|
||||
Reference in New Issue
Block a user