mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-15 08:30:46 +02:00
16 lines
749 B
YAML
16 lines
749 B
YAML
---
|
|
# This is necessary to flush the handlers before the when is set, because otherwise the when will be attached to the handlers
|
|
|
|
- name: "Ensure that {{ docker_compose.directories.instance }} is up"
|
|
# This is a little hack to guaranty that the docker containers are allways up
|
|
# It isn't the cleanest solution to have it here but it should fullfill their purpose
|
|
include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/04_ensure_up.yml"
|
|
when:
|
|
- docker_compose is defined
|
|
- (application_id | get_entity_name) == (docker_compose.directories.instance | basename)
|
|
|
|
- meta: flush_handlers
|
|
|
|
- name: Set “run-once” fact for role {{ role_name }}
|
|
set_fact:
|
|
"{{ 'run_once_' + (role_name | lower | replace('-', '_')) }}": true |