From 70db6dda33724b8ea91c436c4c4172872f7c00db Mon Sep 17 00:00:00 2001 From: exploide Date: Sun, 21 Apr 2024 16:58:45 +0200 Subject: [PATCH] added some more configuration variables and changed some defaults to conform to dnf docs --- README.md | 10 +++++++--- defaults/main.yml | 10 +++++++--- templates/automatic.conf.j2 | 8 ++++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 32fa363..5096aec 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,21 @@ In particular, the following variables (including their default values) are used ```yaml dnf_automatic_apply_updates: true dnf_automatic_download_updates: true +dnf_automatic_network_online_timeout: 60 +dnf_automatic_random_sleep: 0 dnf_automatic_upgrade_type: security -dnf_automatic_random_sleep: 300 dnf_automatic_emit_via: stdio dnf_automatic_system_name: "{{ ansible_nodename }}" +dnf_automatic_send_error_messages: false dnf_automatic_command_format: cat dnf_automatic_stdin_format: "{body}" -dnf_automatic_email_command_format: "mail -s {subject} -r {email_from} {email_to}" +dnf_automatic_email_command_format: "mail -Ssendwait -s {subject} -r {email_from} {email_to}" dnf_automatic_email_stdin_format: "{body}" dnf_automatic_email_from: root -dnf_automatic_email_to: root dnf_automatic_email_host: localhost +dnf_automatic_email_port: 25 +dnf_automatic_email_tls: "no" +dnf_automatic_email_to: root dnf_automatic_base_overrides: {} ``` diff --git a/defaults/main.yml b/defaults/main.yml index b786e8d..310b856 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,13 +7,15 @@ dnf_automatic_apply_updates: true dnf_automatic_download_updates: true +dnf_automatic_network_online_timeout: 60 +dnf_automatic_random_sleep: 0 dnf_automatic_upgrade_type: security -dnf_automatic_random_sleep: 300 # [emitters] dnf_automatic_emit_via: stdio dnf_automatic_system_name: "{{ ansible_nodename }}" +dnf_automatic_send_error_messages: false # [command] @@ -22,14 +24,16 @@ dnf_automatic_stdin_format: "{body}" # [command_email] -dnf_automatic_email_command_format: "mail -s {subject} -r {email_from} {email_to}" +dnf_automatic_email_command_format: "mail -Ssendwait -s {subject} -r {email_from} {email_to}" dnf_automatic_email_stdin_format: "{body}" # [email] dnf_automatic_email_from: root -dnf_automatic_email_to: root dnf_automatic_email_host: localhost +dnf_automatic_email_port: 25 +dnf_automatic_email_tls: "no" +dnf_automatic_email_to: root # [base] diff --git a/templates/automatic.conf.j2 b/templates/automatic.conf.j2 index 41f261e..7ffc354 100644 --- a/templates/automatic.conf.j2 +++ b/templates/automatic.conf.j2 @@ -7,13 +7,15 @@ apply_updates = {{ dnf_automatic_apply_updates }} download_updates = {{ dnf_automatic_download_updates }} -upgrade_type = {{ dnf_automatic_upgrade_type }} +network_online_timeout = {{ dnf_automatic_network_online_timeout }} random_sleep = {{ dnf_automatic_random_sleep }} +upgrade_type = {{ dnf_automatic_upgrade_type }} [emitters] emit_via = {{ dnf_automatic_emit_via }} system_name = {{ dnf_automatic_system_name }} +send_error_messages = {{ dnf_automatic_send_error_messages }} [command] @@ -30,8 +32,10 @@ email_to = {{ dnf_automatic_email_to }} [email] email_from = {{ dnf_automatic_email_from }} -email_to = {{ dnf_automatic_email_to }} email_host = {{ dnf_automatic_email_host }} +email_port = {{ dnf_automatic_email_port }} +email_tls = {{ dnf_automatic_email_tls }} +email_to = {{ dnf_automatic_email_to }} [base]