Restructured Handler Logic

This commit is contained in:
2025-12-04 02:37:12 +01:00
parent fbeed5793f
commit 5c67c42911
14 changed files with 73 additions and 98 deletions

View File

@@ -11,31 +11,20 @@
- name: "Load variables from {{ DOCKER_VARS_FILE }} for {{ role_name }}/{{ application_id }}"
include_vars: "{{ DOCKER_VARS_FILE }}"
- name: "Load docker compose & openresty handlers"
include_tasks: utils/load_handlers.yml
loop:
- docker-compose
- svc-prx-openresty
loop_control:
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"
include_tasks: 04_directories.yml
- name: Include OpenResty (Once)
include_tasks: "utils/load_app.yml"
vars:
load_app_id: svc-prx-openresty
- name: Create NGINX Base Config
template:
src: nginx.conf.j2
dest: "{{ NGINX.FILES.CONFIGURATION }}"
notify: restart openresty
- name: Include OpenResty (Once)
include_tasks: "utils/load_app.yml"
vars:
load_app_id: svc-prx-openresty
when: run_once_svc_prx_openresty is not defined
- name: Include health dependencies
include_role:
name: "{{ item }}"

View File

@@ -1,3 +1,9 @@
---
- include_tasks: 01_core.yml
when: run_once_sys_svc_webserver_core is not defined
- name: "Provide OpenResty Handlers for Webserver"
include_tasks: utils/load_handlers.yml
vars:
handler_role_name: svc-prx-openresty
when: run_once_sys_svc_webserver_core is defined