Initial commit
This commit is contained in:
parent
46a6f7d3ec
commit
49ba7cd121
40 changed files with 1121 additions and 0 deletions
50
roles/base/tasks/redhat_automatic_updates.yml
Normal file
50
roles/base/tasks/redhat_automatic_updates.yml
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
# file: roles/base/tasks/redhat_automatic_updates.yml
|
||||
|
||||
- name: Install dnf-automatic package
|
||||
package:
|
||||
name: dnf-automatic
|
||||
state: present
|
||||
|
||||
- name: Install yum-utils package for needs restarting
|
||||
package:
|
||||
name: yum-utils
|
||||
state: present
|
||||
when: ansible_distribution_major_version == 7
|
||||
|
||||
- name: Deploy dnf-automatic configuration file
|
||||
template:
|
||||
src: automatic.conf.j2
|
||||
dest: /etc/dnf/automatic.conf
|
||||
|
||||
- name: Create dnf-automatic-install.timer directory
|
||||
file:
|
||||
path: /etc/systemd/system/dnf-automatic-install.timer.d
|
||||
recurse: yes
|
||||
state: directory
|
||||
|
||||
- name: Deploy dnf-automatic install timer override
|
||||
template:
|
||||
src: dnf-automatic-install.timer.j2
|
||||
dest: /etc/systemd/system/dnf-automatic-install.timer.d/time.conf
|
||||
become: yes
|
||||
notify: Daemon Reload
|
||||
|
||||
- name: Start and enable systemd timer for dnf-automatic
|
||||
service:
|
||||
name: dnf-automatic-install.timer
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Create dnf-automatic-install.service directory
|
||||
file:
|
||||
path: /etc/systemd/system/dnf-automatic-install.service.d
|
||||
recurse: yes
|
||||
state: directory
|
||||
|
||||
- name: Deploy dnf-automatic install service override
|
||||
template:
|
||||
src: "dnf-automatic-install.service-{{ ansible_distribution_major_version }}.j2"
|
||||
dest: /etc/systemd/system/dnf-automatic-install.service.d/override.conf
|
||||
become: yes
|
||||
notify: Daemon Reload
|
Loading…
Add table
Add a link
Reference in a new issue