mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Finished bbb implementation
This commit is contained in:
@@ -1,12 +1,4 @@
|
||||
---
|
||||
- name: rebuild docker repository
|
||||
command:
|
||||
cmd: docker compose build
|
||||
chdir: "{{docker_repository_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
||||
- name: Validate Docker Compose configuration
|
||||
command:
|
||||
cmd: docker compose -f {{ docker_compose.files.docker_compose }} config --quiet
|
||||
@@ -18,8 +10,21 @@
|
||||
- docker compose up
|
||||
- docker compose restart
|
||||
|
||||
- name: Build docker
|
||||
command:
|
||||
cmd: docker compose build
|
||||
chdir: "{{docker_repository_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
listen:
|
||||
- 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 --build
|
||||
shell: docker-compose -p {{ application_id | get_entity_name }} up -d --force-recreate --remove-orphans
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
executable: /bin/bash
|
||||
|
@@ -8,6 +8,6 @@
|
||||
dest: "{{ docker_repository_path }}"
|
||||
update: yes
|
||||
notify:
|
||||
- docker compose build
|
||||
- docker compose up
|
||||
- rebuild docker repository
|
||||
become: true
|
@@ -31,14 +31,4 @@
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{ docker_compose.files.docker_compose }}"
|
||||
notify: docker compose up
|
||||
register: docker_compose_template
|
||||
|
||||
- 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) == ""
|
||||
notify: docker compose up
|
||||
when: not (docker_compose_template.changed or env_template.changed)
|
||||
ignore_errors: true
|
||||
register: docker_compose_template
|
13
roles/docker-compose/tasks/03_ensure_up.yml
Normal file
13
roles/docker-compose/tasks/03_ensure_up.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
- 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) == ""
|
||||
when: >
|
||||
not (
|
||||
docker_compose_template.changed | default(false)
|
||||
or
|
||||
env_template.changed | default(false)
|
||||
)
|
||||
notify: docker compose up
|
@@ -17,13 +17,16 @@
|
||||
with_dict: "{{ docker_compose.directories }}"
|
||||
|
||||
- name: "Include routines to set up a git repository based installaion for '{{application_id}}'."
|
||||
include_tasks: "repository.yml"
|
||||
include_tasks: "01_repository.yml"
|
||||
when: docker_pull_git_repository | bool
|
||||
|
||||
- name: "Include routines file management routines for '{{application_id}}'."
|
||||
include_tasks: "files.yml"
|
||||
include_tasks: "02_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"
|
||||
|
||||
- name: "flush database, docker and proxy for '{{ application_id }}'"
|
||||
meta: flush_handlers
|
||||
when: docker_compose_flush_handlers | bool
|
||||
|
Reference in New Issue
Block a user