mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-09 02:45:17 +00:00
- Introduce dynamic SYSTEMCTL_ALARM_COMPOSER_SUBSERVICES based on Mailu token and MODE_RESET - Prevent inclusion of sys-ctl-alm-email when disabled - Add system_service_is_template flag to avoid state-setting on template services - Update notifications to reload daemon for @ template units - Align msmtp execution conditions See: https://chatgpt.com/share/692c7a71-afcc-800f-8aba-6800a042ce3b
26 lines
1.0 KiB
YAML
26 lines
1.0 KiB
YAML
|
|
- name: "create {{ system_service_script_dir }}"
|
|
file:
|
|
path: "{{ system_service_script_dir }}"
|
|
state: directory
|
|
mode: "0755"
|
|
|
|
- name: "template or copy script"
|
|
block:
|
|
- name: "render template"
|
|
template:
|
|
src: "{{ system_service_script_src }}"
|
|
dest: "{{ [system_service_script_dir, (system_service_script_src | basename | regex_replace('\\.j2$', ''))] | path_join }}"
|
|
mode: "0755"
|
|
notify: "{{ 'reload system daemon' if system_service_is_template | bool else 'refresh systemctl service' }}"
|
|
when: system_service_script_src.endswith('.j2')
|
|
|
|
- name: "copy raw file"
|
|
copy:
|
|
src: "{{ system_service_script_src }}"
|
|
dest: "{{ [system_service_script_dir, (system_service_script_src | basename)] | path_join }}"
|
|
mode: "0755"
|
|
when: not system_service_script_src.endswith('.j2')
|
|
notify: "{{ 'reload system daemon' if system_service_is_template | bool else 'refresh systemctl service' }}"
|
|
when: system_service_copy_files | bool
|