From c22a0b4fe3fbfbc20b3d70da8499bf460b93328d Mon Sep 17 00:00:00 2001 From: xpk Date: Wed, 4 Aug 2021 17:15:14 +0800 Subject: [PATCH] initial commit --- README.md | 1 + tasks/main.yml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 README.md create mode 100644 tasks/main.yml diff --git a/README.md b/README.md new file mode 100644 index 0000000..a81c4ba --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Ansible role to install and enable dnf-automatic on EL8 diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..5e4f52c --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,19 @@ + - name: Install dnf-automatic package + dnf: + name: dnf-automatic + state: present + + - name: Update config file + lineinfile: + backup: true + path: /etc/dnf/automatic.conf + line: "apply_updates = yes" + regexp: "^apply_updates.*" + state: present + + - name: Enable service + service: + name: dnf-automatic.timer + enabled: yes + state: started +