-
Notifications
You must be signed in to change notification settings - Fork 1
/
unattended-upgrades.yml
44 lines (44 loc) · 1.42 KB
/
unattended-upgrades.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
- name: Configure unattended-upgrades
become: true
ansible.builtin.copy:
src: apt.conf.d/50unattended-upgrades
dest: /etc/apt/apt.conf.d/50unattended-upgrades
owner: root
group: root
mode: '0644'
- name: Enable unattended-upgrades Update Package Lists
become: true
ansible.builtin.lineinfile:
path: /etc/apt/apt.conf.d/20auto-upgrades
search_string: 'APT::Periodic::Update-Package-Lists "1";'
line: 'APT::Periodic::Update-Package-Lists "1";'
owner: root
group: root
mode: '0644'
- name: Enable unattended-upgrades
become: true
ansible.builtin.lineinfile:
path: /etc/apt/apt.conf.d/20auto-upgrades
search_string: 'APT::Periodic::Unattended-Upgrade "1";'
line: 'APT::Periodic::Unattended-Upgrade "1";'
owner: root
group: root
mode: '0644'
- name: Enable unattended-upgrades Download Upgradeable Packages
become: true
ansible.builtin.lineinfile:
path: /etc/apt/apt.conf.d/20auto-upgrades
search_string: 'APT::Periodic::Download-Upgradeable-Packages "1";'
line: 'APT::Periodic::Download-Upgradeable-Packages "1";'
owner: root
group: root
mode: '0644'
- name: Enable unattended-upgrades Autoclean Interval
become: true
ansible.builtin.lineinfile:
path: /etc/apt/apt.conf.d/20auto-upgrades
search_string: 'APT::Periodic::AutocleanInterval "7";'
line: 'APT::Periodic::AutocleanInterval "7";'
owner: root
group: root
mode: '0644'