From 093a44b59cc94cef0d167d1959e8ee500425efbb Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 4 Dec 2025 04:17:24 +0100 Subject: [PATCH] General optimations --- roles/sys-stk-back-stateful/tasks/main.yml | 3 ++- roles/sys-stk-front-proxy/tasks/main.yml | 6 +++--- roles/sys-svc-docker/handlers/main.yml | 2 +- roles/sys-svc-webserver-core/tasks/01_core.yml | 12 +++++++----- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/roles/sys-stk-back-stateful/tasks/main.yml b/roles/sys-stk-back-stateful/tasks/main.yml index 3aa70e02..a922789f 100644 --- a/roles/sys-stk-back-stateful/tasks/main.yml +++ b/roles/sys-stk-back-stateful/tasks/main.yml @@ -2,7 +2,8 @@ - name: "For '{{ application_id }}': Set database_application_id (Needed due to lazzy loading issue)" set_fact: - database_application_id: "{{ application_id }}" + database_application_id: "{{ application_id }}" + database_application_type: "{{ database_type }}" - name: "For '{{ application_id }}': Load database variables" include_vars: "{{ item }}" diff --git a/roles/sys-stk-front-proxy/tasks/main.yml b/roles/sys-stk-front-proxy/tasks/main.yml index 9e804cc1..cab56a10 100644 --- a/roles/sys-stk-front-proxy/tasks/main.yml +++ b/roles/sys-stk-front-proxy/tasks/main.yml @@ -1,6 +1,6 @@ # run_once_sys_stk_front_proxy: deactivated -- name: Front bootstrap +- name: Bootstrap Frontend Nase include_role: name: sys-stk-front-base @@ -8,7 +8,7 @@ include_role: name: sys-util-csp-cert -- name: "Copy nginx config to '{{ front_proxy_domain_conf_dst }}'" +- name: "Copy NGINX ('{{ domain }}') config to '{{ front_proxy_domain_conf_dst }}'" template: src: "{{ item }}" dest: "{{ front_proxy_domain_conf_dst }}" @@ -28,7 +28,7 @@ failed_when: false changed_when: false - - name: Restart nginx if site is down + - name: Restart NGINX if site is down command: cmd: "true" notify: restart openresty diff --git a/roles/sys-svc-docker/handlers/main.yml b/roles/sys-svc-docker/handlers/main.yml index 78b8d686..15e298a3 100644 --- a/roles/sys-svc-docker/handlers/main.yml +++ b/roles/sys-svc-docker/handlers/main.yml @@ -1,5 +1,5 @@ --- -- name: docker restart +- name: Ensure Docker daemon is running on host ansible.builtin.service: name: docker.service state: restarted diff --git a/roles/sys-svc-webserver-core/tasks/01_core.yml b/roles/sys-svc-webserver-core/tasks/01_core.yml index a3b1bfab..23c8327f 100644 --- a/roles/sys-svc-webserver-core/tasks/01_core.yml +++ b/roles/sys-svc-webserver-core/tasks/01_core.yml @@ -14,17 +14,21 @@ - name: "Include tasks to create directories" include_tasks: 04_directories.yml -- name: Include OpenResty (Once) +- name: Load OpenResty include_tasks: "utils/load_app.yml" vars: - load_app_id: svc-prx-openresty + load_app_id: svc-prx-openresty + docker_compose_flush_handlers: false # Prevent deploy until initial Config is created -- name: Create NGINX Base Config +- name: Deploy OpenResty NGINX Base Configuration template: src: nginx.conf.j2 dest: "{{ NGINX.FILES.CONFIGURATION }}" notify: restart openresty +- name: Flush OpenResty Base Setup + meta: flush_handlers + - name: Include health dependencies include_role: name: "{{ item }}" @@ -32,6 +36,4 @@ - sys-ctl-hlth-webserver - sys-ctl-hlth-csp -- meta: flush_handlers - - include_tasks: utils/once/flag.yml