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:
|
tags:
|
||||||
- update
|
- update
|
||||||
|
|
||||||
- name: setup unattended updates
|
- name: install unattended-upgrades
|
||||||
apt:
|
apt:
|
||||||
name: unattended-upgrades
|
name: unattended-upgrades
|
||||||
purge: yes
|
purge: yes
|
||||||
state: "{% if update.unattended %}present{% else %}absent{% endif %}"
|
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
|
- name: clean
|
||||||
command: apt-get clean
|
command: apt-get clean
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue