Optimized snipe-it und bbb

This commit is contained in:
2025-07-21 01:40:42 +02:00
parent 6e2e3e45a7
commit 5343536d27
17 changed files with 102 additions and 121 deletions

View File

@@ -0,0 +1,18 @@
- name: "Check if any container is running in {{ docker_compose.directories.instance }}"
command: docker compose ps -q --filter status=running
args:
chdir: "{{ docker_compose.directories.instance }}"
register: docker_ps
changed_when: (docker_ps.stdout | trim) == ""
# The failed when catches the condition when an docker compose file will be dynamicly build after the file routine
failed_when: >
docker_ps.rc != 0
and
'no configuration file provided: not found' not in (docker_ps.stderr | default(''))
when: >
not (
docker_compose_template.changed | default(false)
or
env_template.changed | default(false)
)
notify: docker compose up