mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
Renamed injection services
This commit is contained in:
16
roles/sys-srv-web-inj-desktop/tasks/01_deploy.yml
Normal file
16
roles/sys-srv-web-inj-desktop/tasks/01_deploy.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
- name: Deploy iframe-handler.js
|
||||
template:
|
||||
src: iframe-handler.js.j2
|
||||
dest: "{{ INJ_DESKTOP_JS_FILE_DESTINATION }}"
|
||||
owner: "{{ NGINX.USER }}"
|
||||
group: "{{ NGINX.USER }}"
|
||||
mode: '0644'
|
||||
|
||||
- name: Get stat for iframe-handler.js
|
||||
stat:
|
||||
path: "{{ INJ_DESKTOP_JS_FILE_DESTINATION }}"
|
||||
register: inj_port_ui_js_stat
|
||||
|
||||
- name: Set inj_port_ui_js_version
|
||||
set_fact:
|
||||
inj_port_ui_js_version: "{{ inj_port_ui_js_stat.stat.mtime }}"
|
24
roles/sys-srv-web-inj-desktop/tasks/main.yml
Normal file
24
roles/sys-srv-web-inj-desktop/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- block:
|
||||
- name: Include dependency 'srv-web-7-4-core'
|
||||
include_role:
|
||||
name: srv-web-7-4-core
|
||||
when: run_once_srv_web_7_4_core is not defined
|
||||
- include_tasks: 01_deploy.yml
|
||||
- include_tasks: utils/run_once.yml
|
||||
when: run_once_sys_srv_web_inj_desktop is not defined
|
||||
|
||||
# --- Build tiny inline initializer (CSP-hashed) ---
|
||||
- name: "Load iFrame init code for '{{ application_id }}'"
|
||||
set_fact:
|
||||
iframe_init_code: "{{ lookup('template','iframe-init_one_liner.js.j2') }}"
|
||||
|
||||
- name: "Collapse iFrame init code into one-liner for '{{ application_id }}'"
|
||||
set_fact:
|
||||
iframe_init_code_one_liner: "{{ iframe_init_code | to_one_liner }}"
|
||||
|
||||
- name: "Append iFrame init CSP hash for '{{ application_id }}'"
|
||||
set_fact:
|
||||
applications: "{{ applications | append_csp_hash(application_id, iframe_init_code_one_liner) }}"
|
||||
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||
changed_when: false
|
||||
|
Reference in New Issue
Block a user