mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-08 10:26:35 +00:00
Refactored mail-related roles to support running Infinito.Nexus on nodes without a dedicated mail server: - Introduced sys-svc-mail as central mail orchestration role. - Split msmtp handling into sys-svc-mail-msmtp. - Added sys-svc-mail-smtp to provide a localhost-only Postfix relay when Mailu is not present. - Updated alert/health roles to use the new mail orchestration. - Avoid installing postfix inside containers via IS_CONTAINER guard. - Adjusted WordPress role to use the new msmtp template path. This allows lightweight deployments (e.g. Raspberry Pi, robots, edge nodes) to send mail via localhost without requiring a full Mailu stack. ChatGPT discussion: https://chatgpt.com/share/6931edf1-cb98-800f-9e3c-a62d69ccb223
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
- include_tasks: utils/once/flag.yml
|
|
|
|
- name: "Include dependent services for '{{ system_service_id }}'"
|
|
include_role:
|
|
name: '{{ item }}'
|
|
loop: '{{ SYSTEMCTL_ALARM_COMPOSER_SUBSERVICES }}'
|
|
vars:
|
|
system_service_timer_enabled: false
|
|
system_service_copy_files: true
|
|
system_service_tpl_exec_start: "{{ system_service_script_exec }} %I"
|
|
system_service_tpl_on_failure: ""
|
|
system_service_force_linear_sync: false
|
|
|
|
- name: "Include core service for '{{ system_service_id }}'"
|
|
include_role:
|
|
name: sys-service
|
|
vars:
|
|
system_service_timer_enabled: false
|
|
system_service_copy_files: true
|
|
system_service_tpl_exec_start: "{{ system_service_script_exec }} %I"
|
|
system_service_tpl_on_failure: "" # No on failure needed, because it's anyhow the default on failure procedure
|
|
system_service_force_linear_sync: false
|
|
|
|
- name: Assert '{{ system_service_id }}'
|
|
block:
|
|
|
|
- name: Escape instance name for systemctl call
|
|
ansible.builtin.command:
|
|
argv:
|
|
- systemd-escape
|
|
- "{{ SYSTEMCTL_ALARM_COMPOSER_DUMMY_MESSAGE }}"
|
|
register: escaped_name
|
|
changed_when: false
|
|
|
|
- name: Start '{{ system_service_id }}' instance
|
|
ansible.builtin.systemd:
|
|
name: "{{ system_service_id | get_service_name(SOFTWARE_NAME, False) ~ escaped_name.stdout }}.service"
|
|
state: started
|
|
when:
|
|
- MODE_ASSERT | bool
|
|
- not( IS_CONTAINER | bool )
|