diff --git a/roles/unattended-upgrades/templates/apticron.conf.j2 b/roles/unattended-upgrades/templates/apticron.conf.j2 index 5f46c60..df4f258 100644 --- a/roles/unattended-upgrades/templates/apticron.conf.j2 +++ b/roles/unattended-upgrades/templates/apticron.conf.j2 @@ -1,6 +1,6 @@ # {{ ansible_managed }} -{% if unattended_upgrades_apticron_email is defined %} +{% if unattended_upgrades_apticron_email %} EMAIL="{{ unattended_upgrades_apticron_email | default('root') }}" SYSTEM="{{ ansible_hostname }}" {% endif %} diff --git a/roles/unattended-upgrades/templates/unattended-upgrades.j2 b/roles/unattended-upgrades/templates/unattended-upgrades.j2 index 5b3d73e..58a1f69 100644 --- a/roles/unattended-upgrades/templates/unattended-upgrades.j2 +++ b/roles/unattended-upgrades/templates/unattended-upgrades.j2 @@ -26,7 +26,7 @@ Unattended-Upgrade::MinimalSteps "{{ unattended_upgrades_minimal_steps | lower } {% if unattended_upgrades_install_on_shutdown is defined %} Unattended-Upgrade::InstallOnShutdown "{{ unattended_upgrades_install_on_shutdown | lower }}"; {% endif %} -{% if unattended_upgrades_mail is defined %} +{% if unattended_upgrades_mail %} Unattended-Upgrade::Mail "{{ unattended_upgrades_mail }}"; {% endif %} {% if unattended_upgrades_mail_only_on_error is defined %}