mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-10 11:26:24 +00:00
Solved CDN and Logout deployment bugs existing due to 2.18->2.20 update
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
# General
|
# General
|
||||||
application_id: "svc-prx-openresty"
|
application_id: "svc-prx-openresty"
|
||||||
|
|
||||||
# Deactivate Database for openresty
|
# Deactivate Database for openresty
|
||||||
database_type: ""
|
database_type: ""
|
||||||
|
|
||||||
# Openresty
|
# Openresty
|
||||||
OPENRESTY_IMAGE: "openresty/openresty"
|
OPENRESTY_IMAGE: "openresty/openresty"
|
||||||
OPENRESTY_VERSION: "alpine"
|
OPENRESTY_VERSION: "alpine"
|
||||||
OPENRESTY_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.openresty.name') }}"
|
OPENRESTY_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.openresty.name') }}"
|
||||||
|
|||||||
@@ -13,30 +13,30 @@
|
|||||||
- application_id != 'web-app-matomo'
|
- application_id != 'web-app-matomo'
|
||||||
- run_once_web_app_matomo is not defined
|
- run_once_web_app_matomo is not defined
|
||||||
|
|
||||||
- name: "Setup web-app-matomo"
|
- name: "Load Matomo (Once)"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-app-matomo
|
|
||||||
public: false
|
|
||||||
when:
|
when:
|
||||||
- matomo_reachability is defined
|
- matomo_reachability is defined
|
||||||
- (matomo_reachability.status | default(0) | int) != 200
|
- (matomo_reachability.status | default(0) | int) != 200
|
||||||
|
vars:
|
||||||
|
load_app_id: 'web-app-matomo'
|
||||||
|
|
||||||
# Matomo can't use this dependencies - At least not on the initial setup run
|
# Matomo can't use this dependencies - At least not on the initial setup run
|
||||||
- when:
|
- when:
|
||||||
- application_id != 'web-app-matomo'
|
- application_id != 'web-app-matomo'
|
||||||
block:
|
block:
|
||||||
- name: "Load CDN for '{{ domain }}'"
|
- name: "Load CDN (Once)"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-cdn
|
|
||||||
public: false
|
|
||||||
when:
|
when:
|
||||||
- application_id != 'web-svc-cdn'
|
- application_id != 'web-svc-cdn'
|
||||||
- run_once_web_svc_cdn is not defined
|
- run_once_web_svc_cdn is not defined
|
||||||
|
vars:
|
||||||
|
load_app_id: 'web-svc-cdn'
|
||||||
|
|
||||||
- name: Load Logout for '{{ domain }}'
|
- name: "Load Logout (Once)"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-logout
|
|
||||||
public: false
|
|
||||||
when:
|
when:
|
||||||
- run_once_web_svc_logout is not defined
|
- run_once_web_svc_logout is not defined
|
||||||
- application_id != 'web-svc-logout'
|
- application_id != 'web-svc-logout'
|
||||||
|
vars:
|
||||||
|
load_app_id: 'web-svc-logout'
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
- include_tasks: "{{ [ playbook_dir, 'tasks/utils/load_handlers.yml' ] | path_join }}"
|
||||||
|
vars:
|
||||||
|
handler_role_name: "svc-prx-openresty"
|
||||||
|
|
||||||
- name: Front bootstrap
|
- name: Front bootstrap
|
||||||
include_role:
|
include_role:
|
||||||
name: sys-stk-front-base
|
name: sys-stk-front-base
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# run_once_sys_stk_front_proxy: deactivated
|
# run_once_sys_stk_front_proxy: deactivated
|
||||||
|
|
||||||
- name: "Load Proxy procedures if Proxy is enabled"
|
- name: "Load Proxy procedures if Proxy is enabled"
|
||||||
include_tasks: "01_base.yml"
|
include_tasks: "01_core.yml"
|
||||||
when: SYS_STK_FRONT_PROXY_ENABLED | bool
|
when: SYS_STK_FRONT_PROXY_ENABLED | bool
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
- name: "Load Mailu before MSMTP config, to guaranty that server is up"
|
- name: "Load Mailu before MSMTP config, to guaranty that server is up"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-app-mailu
|
vars:
|
||||||
public: false
|
load_app_id: web-app-mailu
|
||||||
|
|
||||||
- name: "Reset compose handlers after Mailu include for MSMTP"
|
- name: "Reset compose handlers after Mailu include for MSMTP"
|
||||||
include_tasks: "{{ [ playbook_dir, 'tasks/utils/load_handlers.yml' ] | path_join }}"
|
include_tasks: "{{ [ playbook_dir, 'tasks/utils/load_handlers.yml' ] | path_join }}"
|
||||||
|
|||||||
@@ -18,23 +18,24 @@
|
|||||||
- svc-prx-openresty
|
- svc-prx-openresty
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: handler_role_name
|
loop_var: handler_role_name
|
||||||
|
vars:
|
||||||
|
application_id: svc-prx-openresty # Required to use correct config path at handlers
|
||||||
|
|
||||||
- name: "Include tasks to create directories"
|
- name: "Include tasks to create directories"
|
||||||
include_tasks: 04_directories.yml
|
include_tasks: 04_directories.yml
|
||||||
|
|
||||||
- name: create nginx config file
|
- name: Create NGINX Base Config
|
||||||
template:
|
template:
|
||||||
src: nginx.conf.j2
|
src: nginx.conf.j2
|
||||||
dest: "{{ NGINX.FILES.CONFIGURATION }}"
|
dest: "{{ NGINX.FILES.CONFIGURATION }}"
|
||||||
notify: restart openresty
|
notify: restart openresty
|
||||||
|
|
||||||
- name: Include openresty
|
- name: Include OpenResty (Once)
|
||||||
# Outside of run_once block is necessary for handler loading
|
# Outside of run_once block is necessary for handler loading
|
||||||
# Otherwise the when: condition from the block is added to the handlers
|
# Otherwise the when: condition from the block is added to the handlers
|
||||||
# Inside openresty their is a validation that it doesn't run multiple times
|
# Inside openresty their is a validation that it doesn't run multiple times
|
||||||
include_role:
|
include_role:
|
||||||
name: svc-prx-openresty
|
name: svc-prx-openresty
|
||||||
|
|
||||||
# Explicit set to guaranty that application_id will not be overwritten.
|
# Explicit set to guaranty that application_id will not be overwritten.
|
||||||
# Should be anyhow the default case
|
# Should be anyhow the default case
|
||||||
public: false
|
public: false
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
- name: create docker-compose.yml for bigbluebutton
|
- name: "create docker-compose.yml for bigbluebutton"
|
||||||
command:
|
command:
|
||||||
cmd: bash ./scripts/generate-compose
|
cmd: bash ./scripts/generate-compose
|
||||||
chdir: "{{ docker_repository_path }}"
|
chdir: "{{ docker_repository_path }}"
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
- name: "Load Coturn Role for '{{ application_id }}'"
|
- name: "Load Coturn Role for '{{ application_id }}'"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-coturn
|
vars:
|
||||||
|
load_app_id: web-svc-coturn
|
||||||
when:
|
when:
|
||||||
- run_once_web_svc_coturn is not defined
|
- run_once_web_svc_coturn is not defined
|
||||||
- not BBB_COTURN_ENABLED
|
- not BBB_COTURN_ENABLED
|
||||||
|
|
||||||
- name: "Install Collabora Dependency"
|
- name: "Install Collabora Dependency"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-collabora
|
vars:
|
||||||
|
load_app_id: web-svc-collabora
|
||||||
when:
|
when:
|
||||||
- run_once_web_svc_collabora is not defined
|
- run_once_web_svc_collabora is not defined
|
||||||
- not BBB_COLLABORA_ENABLED
|
- not BBB_COLLABORA_ENABLED
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
- name: "Load brand logos role for '{{ application_id }}'"
|
- name: "Load brand logos role for '{{ application_id }}'"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-simpleicons
|
vars:
|
||||||
|
load_app_id: web-svc-simpleicons
|
||||||
when:
|
when:
|
||||||
- run_once_web_svc_simpleicons is not defined
|
- run_once_web_svc_simpleicons is not defined
|
||||||
- DESKTOP_SIMPLEICONS_ENABLED | bool
|
- DESKTOP_SIMPLEICONS_ENABLED | bool
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
- name: "Install OnlyOffice dependency (Document Server)"
|
- name: "Install OnlyOffice dependency (Document Server)"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-onlyoffice
|
vars:
|
||||||
|
load_app_id: web-svc-onlyoffice
|
||||||
when: run_once_web_svc_onlyoffice is not defined
|
when: run_once_web_svc_onlyoffice is not defined
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
- name: "Install Collabora Dependency"
|
- name: "Install Collabora Dependency"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-collabora
|
vars:
|
||||||
|
load_app_id: web-svc-collabora
|
||||||
when: run_once_web_svc_collabora is not defined
|
when: run_once_web_svc_collabora is not defined
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
- name: "Load Coturn Role for '{{ application_id }}'"
|
- name: "Load Coturn Role for '{{ application_id }}'"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-svc-coturn
|
vars:
|
||||||
|
load_app_id: web-svc-coturn
|
||||||
when:
|
when:
|
||||||
- run_once_web_svc_coturn is not defined
|
- run_once_web_svc_coturn is not defined
|
||||||
- NEXTCLOUD_HPB_TURN_STANDALONE_ENABLED | bool
|
- NEXTCLOUD_HPB_TURN_STANDALONE_ENABLED | bool
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
- name: "Include web-app-discourse"
|
- name: "Include web-app-discourse"
|
||||||
include_role:
|
include_tasks: "utils/load_app.yml"
|
||||||
name: web-app-discourse
|
vars:
|
||||||
|
load_app_id: web-app-discourse
|
||||||
|
|
||||||
- name: Wait for Discourse API
|
- name: Wait for Discourse API
|
||||||
wait_for:
|
wait_for:
|
||||||
|
|||||||
9
tasks/utils/load_app.yml
Normal file
9
tasks/utils/load_app.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# Load with load app id
|
||||||
|
- name: "Load Application: '{{ load_app_id }}'"
|
||||||
|
include_role:
|
||||||
|
name: "{{ application_id }}"
|
||||||
|
public: false
|
||||||
|
vars:
|
||||||
|
application_id: "{{ load_app_id }}"
|
||||||
|
domain: "{{ domains | get_domain(load_app_id) }}"
|
||||||
@@ -2,4 +2,6 @@
|
|||||||
import_role:
|
import_role:
|
||||||
name: "{{ handler_role_name }}"
|
name: "{{ handler_role_name }}"
|
||||||
tasks_from: "none.yml"
|
tasks_from: "none.yml"
|
||||||
handlers_from: main
|
handlers_from: "main"
|
||||||
|
vars:
|
||||||
|
application_id: "{{ handler_role_name }}"
|
||||||
Reference in New Issue
Block a user