mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 02:10:05 +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
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| - name: Resolve systemctl template source
 | |
|   set_fact:
 | |
|     system_service_template_src: >-
 | |
|       {{ lookup(
 | |
|            'first_found',
 | |
|            {
 | |
|              'files': [
 | |
|                'templates/systemctl@.service.j2',
 | |
|                'templates/systemctl.service.j2'
 | |
|              ],
 | |
|              'paths': [
 | |
|                system_service_role_dir,
 | |
|                role_path
 | |
|              ]
 | |
|            },
 | |
|            errors='strict'
 | |
|          ) }}
 | |
| 
 | |
| - name: Ensure a systemctl template was found
 | |
|   assert:
 | |
|     that: system_service_template_src | length > 0
 | |
|     fail_msg: >-
 | |
|       Could not resolve any systemctl template. Looked in:
 | |
|       {{ system_service_role_dir }}/templates/ and {{ role_path }}/templates/.
 | |
|   when: MODE_ASSERT | bool
 | |
| 
 | |
| - name: Flag whether @-template is used
 | |
|   set_fact:
 | |
|     system_service_uses_at: "{{ system_service_id.endswith('@') }}"
 | |
| 
 | |
| - name: "setup systemctl '{{ system_service_id }}'"
 | |
|   template:
 | |
|     src:  "{{ system_service_template_src }}"
 | |
|     dest: "{{ [ PATH_SYSTEM_SERVICE_DIR, system_service_id | get_service_name(SOFTWARE_NAME) ] | path_join }}"
 | |
|     owner: root
 | |
|     group: root
 | |
|     mode: '0644'
 | |
|   notify: "{{ 'reload system daemon' if system_service_uses_at else 'refresh systemctl service' }}"
 | |
| 
 | |
| - name: refresh systemctl service when SYS_SERVICE_ALL_ENABLE
 | |
|   block:
 | |
|   - name: reload system daemon
 | |
|     command: /bin/true
 | |
|     notify: reload system daemon
 | |
|   - name: refresh systemctl service
 | |
|     command: /bin/true
 | |
|     notify: refresh systemctl service
 | |
|     when: not system_service_uses_at
 | |
|   when: system_force_flush | bool
 | |
| 
 |