THE HUGE REFACTORING CALENDER WEEK 33; Optimized Matrix and during this updated variables, and implemented better reset and cleanup mode handling, also solved some initial setup bugs

This commit is contained in:
2025-08-15 15:15:48 +02:00
parent 0228014d34
commit 022800425d
271 changed files with 1098 additions and 916 deletions

View File

@@ -5,4 +5,4 @@
- run_once_srv_web_7_4_core is not defined
- name: "deploy the logout.js"
include_tasks: "deploy.yml"
include_tasks: "02_deploy.yml"

View File

@@ -0,0 +1,16 @@
- name: Deploy logout.js
template:
src: logout.js.j2
dest: "{{ INJ_LOGOUT_JS_DESTINATION }}"
owner: "{{ NGINX.USER }}"
group: "{{ NGINX.USER }}"
mode: '0644'
- name: Get stat for logout.js
stat:
path: "{{ INJ_LOGOUT_JS_DESTINATION }}"
register: INJ_LOGOUT_JS_STAT
- name: Set INJ_LOGOUT_JS_VERSION
set_fact:
INJ_LOGOUT_JS_VERSION: "{{ INJ_LOGOUT_JS_STAT.stat.mtime }}"

View File

@@ -1,16 +0,0 @@
- name: Deploy logout.js
template:
src: logout.js.j2
dest: "{{ inj_logout_js_destination }}"
owner: "{{ nginx.user }}"
group: "{{ nginx.user }}"
mode: '0644'
- name: Get stat for logout.js
stat:
path: "{{ inj_logout_js_destination }}"
register: inj_logout_js_stat
- name: Set inj_logout_js_version
set_fact:
inj_logout_js_version: "{{ inj_logout_js_stat.stat.mtime }}"

View File

@@ -8,11 +8,11 @@
set_fact:
logout_code: "{{ lookup('template', 'logout_one_liner.js.j2') }}"
- name: "Collapse logout code into one-liner for '{{application_id}}'"
- name: "Collapse logout code into one-liner for '{{ application_id }}'"
set_fact:
logout_code_one_liner: "{{ logout_code | to_one_liner }}"
- name: "Append logout CSP hash for '{{application_id}}'"
- name: "Append logout CSP hash for '{{ application_id }}'"
set_fact:
applications: "{{ applications | append_csp_hash(application_id, logout_code_one_liner) }}"
changed_when: false

View File

@@ -1 +1 @@
<script src="{{ domains | get_url('web-svc-cdn', WEB_PROTOCOL) }}/logout.js?{{ inj_logout_js_version }}"></script>
<script src="{{ domains | get_url('web-svc-cdn', WEB_PROTOCOL) }}/{{ INJ_LOGOUT_JS_FILE_NAME }}?{{ INJ_LOGOUT_JS_VERSION }}"></script>

View File

@@ -1,2 +1,2 @@
inj_logout_file_name: "logout.js"
inj_logout_js_destination: "{{ [ nginx.directories.data.cdn, inj_logout_file_name ] | path_join }}"
INJ_LOGOUT_JS_FILE_NAME: "logout.js"
INJ_LOGOUT_JS_DESTINATION: "{{ [ NGINX.DIRECTORIES.DATA.CDN, INJ_LOGOUT_JS_FILE_NAME ] | path_join }}"