mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 18:29:21 +00:00 
			
		
		
		
	refactor(sys-ctl-alm-compose, sys-timer-cln-bkps):
- update alarm compose unit to run email/telegram notifiers independently via multiple ExecStart lines - ensure cleanup backup dependencies are included before timer setup with handler flush conversation: https://chatgpt.com/share/68a43429-c0cc-800f-9cc9-9a5ae258dc50
This commit is contained in:
		| @@ -1,8 +1,10 @@ | ||||
| [Unit] | ||||
| Description=Notifier for %i | ||||
| Description={{ SOFTWARE_NAME }} - Alarm Notifier for %i | ||||
|  | ||||
| [Service] | ||||
| Type=oneshot | ||||
| ExecStart=/usr/bin/systemctl start {{ SYS_SERVICE_ON_FAILURE_EMAIL }} {{ SYS_SERVICE_ON_FAILURE_TELEGRAM }} | ||||
| {% for alarm_service in [ SYS_SERVICE_ON_FAILURE_EMAIL, SYS_SERVICE_ON_FAILURE_TELEGRAM ] %} | ||||
| ExecStart=/usr/bin/systemctl start {{ alarm_service }} | ||||
| {% endfor %} | ||||
| User=root | ||||
| Group=systemd-journal | ||||
|   | ||||
| @@ -1,3 +1,11 @@ | ||||
| - name: Include dependencies | ||||
|   include_role: | ||||
|     name: '{{ item }}' | ||||
|   loop: | ||||
|     - sys-ctl-cln-bkps | ||||
|   vars: | ||||
|     flush_handlers: true | ||||
|  | ||||
| - name: set systemctl_timer_service to sys-ctl-cln-backups | ||||
|   set_fact: | ||||
|     systemctl_timer_service: "sys-ctl-cln-backups" | ||||
| @@ -7,9 +15,3 @@ | ||||
|     name: sys-timer | ||||
|   vars: | ||||
|     systemctl_on_calendar: "{{ SYS_SCHEDULE_CLEANUP_BACKUPS }}" | ||||
|  | ||||
| - name: Include dependencies | ||||
|   include_role: | ||||
|     name: '{{ item }}' | ||||
|   loop: | ||||
|   - sys-ctl-cln-bkps | ||||
		Reference in New Issue
	
	Block a user