debian: enable unattended upgrades

This commit is contained in:
Timotej Lazar 2025-07-31 10:07:49 +02:00
parent c64a3772ef
commit 7ffb1e7699

View file

@ -96,6 +96,19 @@
enabled: yes
state: started
- name: Install automatic upgrade package
package:
name: unattended-upgrades
- name: Configure automatic upgrades
lineinfile:
path: /etc/apt/apt.conf.d/20auto-upgrades
create: yes
line: '{{ item }}'
loop:
- 'APT::Periodic::Update-Package-Lists "1";'
- 'APT::Periodic::Unattended-Upgrade "1";'
- name: Run SSH instance in management VRF
when: interfaces | selectattr('vrf') | selectattr('vrf.name', '==', 'mgmt')
block: