commit 1bc303f2447ca038d7d9ea6d76815b7fab841d9f
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Jun 5 17:40:21 2020 +0200
dnf automatic for EL
roles/dnf-automatic/tasks/main.yml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/roles/dnf-automatic/tasks/main.yml b/roles/dnf-automatic/tasks/main.yml
index 11245f3..f9b4592 100644
--- a/roles/dnf-automatic/tasks/main.yml
+++ b/roles/dnf-automatic/tasks/main.yml
@@ -33,13 +33,13 @@
command: systemctl is-active dnf-automatic.timer
register: automaticative
check_mode: no
- changed_when: 1 != 1
+ changed_when: automaticative.rc != 0
ignore_errors: true
when: ansible_distribution_major_version|int < 8
- name: start dnf-automatic.timer if it is not active
command: systemctl start dnf-automatic.timer
- when: automaticative is failed and ansible_distribution_major_version|int < 8
+ when: automaticative is defined and ansible_distribution_major_version|int < 8
- name: enable and start dnf-automatic f26+
command: systemctl enable dnf-automatic-install.timer
Show replies by date