diff --git a/files/dnf-automatic.conf b/files/dnf-automatic.conf deleted file mode 100644 index 6d7548e..0000000 --- a/files/dnf-automatic.conf +++ /dev/null @@ -1,47 +0,0 @@ -[commands] - -upgrade_type = default -# Whether updates should be downloaded when they are available. Note -# that updates_messages must also be yes for updates to be downloaded. -download_updates = false - -# Whether updates should be applied when they are available. Note -# that both update_messages and download_updates must also be yes for -# the update to be applied -apply_updates = false - -# Maximum amout of time to randomly sleep, in minutes. The program -# will sleep for a random amount of time between 0 and random_sleep -# minutes before running. This is useful for e.g. staggering the -# times that multiple systems will access update servers. If -# random_sleep is 0 or negative, the program will run immediately. -random_sleep = 30 - -reboot = never - - -[emitters] -# Name to use for this system in messages that are emitted. If -# system_name is None, the hostname will be used. -system_name = None - -# How to send messages. Valid options are stdio and email. If -# emit_via includes stdio, messages will be sent to stdout; this is useful -# to have cron send the messages. If emit_via includes email, this -# program will send email itself according to the configured options. -# If emit_via is None or left blank, no messages will be sent. -emit_via = stdio - - -[groups] -# List of groups to update -group_list = None - -# The types of group packages to install -group_package_types = mandatory, default - -[base] -# This section overrides dnf.conf - -debuglevel = 2 - diff --git a/files/notify_updates b/files/notify_updates index ca35760..a7a3160 100755 --- a/files/notify_updates +++ b/files/notify_updates @@ -26,7 +26,7 @@ if [ -z "${STATELESS_INSTANCE}" ]; then echo 'STATELESS_INSTANCE should be set to 0 or 1' >&1 fi -updates="$(/usr/sbin/dnf-automatic /etc/dnf/automatic.conf)" +updates="$(/usr/bin/dnf check-update | tail -n +2 )" if [[ -n "${updates}" ]]; then /usr/local/bin/send_datadog_event.py "${updates}" fi diff --git a/tasks/main.yml b/tasks/main.yml index d20bcda..aa41da6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,12 +18,6 @@ dest: /usr/local/bin/ mode: "0755" -- name: Config file - ansible.builtin.copy: - src: dnf-automatic.conf - dest: /etc/dnf/automatic.conf - mode: "0644" - - name: Send datadog event ansible.builtin.copy: src: send_datadog_event.py