Run unattended-upgrades for all repos/origins
Per default unattended-upgrades is configured to only update/upgrade packages from official Debian and Debian Security repos. This change removes all limitations.
This commit is contained in:
parent
649ecca785
commit
2fdfbaf1f0
2 changed files with 16 additions and 1 deletions
6
files/50unattended-upgrades
Normal file
6
files/50unattended-upgrades
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Unattended-Upgrade::Origins-Pattern {
|
||||
"origin=*";
|
||||
};
|
||||
|
||||
Unattended-Upgrade::Package-Blacklist {
|
||||
};
|
||||
|
|
@ -7,12 +7,21 @@
|
|||
tags:
|
||||
- update
|
||||
|
||||
- name: setup unattended updates
|
||||
- name: install unattended-upgrades
|
||||
apt:
|
||||
name: unattended-upgrades
|
||||
purge: yes
|
||||
state: "{% if update.unattended %}present{% else %}absent{% endif %}"
|
||||
|
||||
- name: configure unattended-upgrades
|
||||
ansible.builtin.copy:
|
||||
src: "50unattended-upgrades"
|
||||
dest: "/etc/apt/apt.conf.d/50unattended-upgrades"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: update.unattended
|
||||
|
||||
- name: clean
|
||||
command: apt-get clean
|
||||
changed_when: False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue