commit c22a0b4fe3fbfbc20b3d70da8499bf460b93328d Author: xpk Date: Wed Aug 4 17:15:14 2021 +0800 initial commit 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 +