From 3842af27ed38af1dafeecaa72377e4d00405e02d Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 6 Jan 2024 18:16:05 +0200 Subject: [PATCH] Add exim-relay wiring for Healthchecks --- templates/group_vars_mash_servers | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/templates/group_vars_mash_servers b/templates/group_vars_mash_servers index 0b7dbf9..1bbfa17 100644 --- a/templates/group_vars_mash_servers +++ b/templates/group_vars_mash_servers @@ -1891,18 +1891,23 @@ healthchecks_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_ healthchecks_uid: "{{ mash_playbook_uid }}" healthchecks_gid: "{{ mash_playbook_gid }}" -healthchecks_systemd_required_services_list: | +healthchecks_systemd_required_systemd_services_list_auto: | {{ - (['docker.service']) - + ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and healthchecks_database_hostname == devture_postgres_identifier else []) }} -healthchecks_container_additional_networks: | +healthchecks_systemd_wanted_systemd_services_list_auto: | + {{ + ([(exim_relay_identifier | default('mash-exim-relay')) ~ '.service'] if (exim_relay_enabled | default(false) and healthchecks_environment_variable_email_host == exim_relay_identifier | default('mash-exim-relay')) else []) + }} + +healthchecks_container_additional_networks_auto: | {{ ([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else []) + ([devture_postgres_container_network] if devture_postgres_enabled and healthchecks_database_hostname == devture_postgres_identifier and healthchecks_container_network != devture_postgres_container_network else []) + + + ([exim_relay_container_network | default('mash-exim-relay')] if (exim_relay_enabled | default(false) and healthchecks_environment_variable_email_host == exim_relay_identifier | default('mash-exim-relay') and healthchecks_container_network != exim_relay_container_network) else []) }} healthchecks_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}" @@ -1915,6 +1920,14 @@ healthchecks_database_password: "{{ '%s' | format(mash_playbook_generic_secret_k healthchecks_environment_variable_secret_key: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'healthchecks', rounds=655555) | to_uuid }}" +# role-specific:exim_relay +healthchecks_environment_variable_default_from_email: "{{ exim_relay_sender_address if exim_relay_enabled else '' }}" +healthchecks_environment_variable_email_host: "{{ exim_relay_identifier if exim_relay_enabled else '' }}" +healthchecks_environment_variable_email_port: "{{ 8025 if exim_relay_enabled else '587' }}" +healthchecks_environment_variable_email_use_tls: "{{ false if exim_relay_enabled else true }}" +healthchecks_environment_variable_email_use_verification: "{{ false if exim_relay_enabled else true }}" +# /role-specific:exim_relay + ######################################################################## # # # /healthchecks #