mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	Introduce sys-svc-cdn (cdn_paths/cdn_urls/cdn_dirs) and ensure CDN directories + latest symlink. Rename sys-srv-web-inj-* → sys-front-inj-*; update includes/templates; serve shared/per-app CSS & JS via CDN. Add lookup_plugins/local_mtime_qs.py for mtime-based cache busting; split CSS into default.css/bootstrap.css + optional per-app style.css. CSP: use style-src-elem; drop unsafe-inline for styles. Services: fix SYS_SERVICE_ALL_ENABLED bool and controlled flush. BREAKING CHANGE: role names changed; replace includes and references accordingly. Conversation: https://chatgpt.com/share/68b55494-9ec4-800f-b559-44707029141d
		
			
				
	
	
		
			25 lines
		
	
	
		
			885 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			885 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| - block:
 | |
|     - include_tasks: 01_core.yml
 | |
|     - include_tasks: utils/run_once.yml
 | |
|   when: run_once_sys_front_inj_css is not defined
 | |
| 
 | |
| - name: "Resolve optional app style.css source for '{{ application_id }}'"
 | |
|   vars:
 | |
|     app_role_dir: "{{ playbook_dir }}/roles/{{ application_id }}"
 | |
|     _app_style_src: >-
 | |
|       {{ lookup('first_found', {
 | |
|            'files': ['templates/style.css.j2','files/style.css'],
 | |
|            'paths': [app_role_dir]
 | |
|          }, errors='ignore') | default('', true) }}
 | |
|   set_fact:
 | |
|     app_style_src: "{{ _app_style_src }}"
 | |
|     app_style_present: "{{ _app_style_src | length > 0 }}"
 | |
| 
 | |
| - name: "Deploy per-app '{{ app_style_src }}' to '{{ css_app_dst }}'"
 | |
|   when: app_style_present
 | |
|   copy:
 | |
|     content:  "{{ lookup('template', app_style_src) }}"
 | |
|     dest:     "{{ css_app_dst }}"
 | |
|     owner:    "{{ NGINX.USER }}"
 | |
|     group:    "{{ NGINX.USER }}"
 | |
|     mode:     '0644' |