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

@@ -13,7 +13,7 @@
- name: Build docker
command:
cmd: docker compose build
chdir: "{{docker_repository_path}}"
chdir: "{{ docker_compose.directories.instance }}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600
@@ -21,7 +21,6 @@
- docker compose build
- docker compose up # This is just here because I didn't took the time to refactor
# @todo go over all docker compose up implementations and check where it makes sense to user docker compose build and where docker compose up
when: application_id != 'web-app-bigbluebutton' # @todo solve this on a different way, just a fast hack
- name: docker compose up
shell: docker-compose -p {{ application_id | get_entity_name }} up -d --force-recreate --remove-orphans

View File

@@ -4,9 +4,11 @@
- name: pull docker repository
git:
repo: "{{ docker_repository_address }}"
dest: "{{ docker_repository_path }}"
update: yes
repo: "{{ docker_repository_address }}"
dest: "{{ docker_repository_path }}"
depth: 1
update: yes
recursive: yes
notify:
- docker compose build
- docker compose up

View File

@@ -4,6 +4,11 @@
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)

View File

@@ -4,7 +4,7 @@
include_vars: "{{ docker_compose_variable_file }}"
- name: "reset (if enabled)"
include_tasks: reset.yml
include_tasks: 01_reset.yml
when: mode_reset | bool
# This could lead to problems in docker-compose directories which are based on a git repository
@@ -17,15 +17,16 @@
with_dict: "{{ docker_compose.directories }}"
- name: "Include routines to set up a git repository based installaion for '{{application_id}}'."
include_tasks: "01_repository.yml"
include_tasks: "02_repository.yml"
when: docker_pull_git_repository | bool
- name: "Include routines file management routines for '{{application_id}}'."
include_tasks: "02_files.yml"
include_tasks: "03_files.yml"
when: not docker_compose_skipp_file_creation | bool
- name: "Ensure that {{ docker_compose.directories.instance }} is up"
include_tasks: "03_ensure_up.yml"
include_tasks: "04_ensure_up.yml"
when: not docker_compose_skipp_file_creation | bool
- name: "flush database, docker and proxy for '{{ application_id }}'"
meta: flush_handlers