Add exim-relay wiring for Healthchecks

This commit is contained in:
Slavi Pantaleev 2024-01-06 18:16:05 +02:00
parent 97336cb59a
commit 3842af27ed

View file

@ -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 #