ansible-playbooks/ubuntu/roles/apt-maintenance/tasks/main.yml

22 lines
569 B
YAML
Raw Normal View History

2019-07-08 00:00:42 +00:00
---
# This task sets up unattended-upgrade's config
2019-07-08 00:00:42 +00:00
- name: Install unattended-upgrade and apt-listchanges
apt: name={{ packages }} state=latest update_cache=yes
vars:
packages:
- unattended-upgrades
- apt-listchanges
2019-07-13 03:13:40 +00:00
- name: Copy our 50unattended-upgrades
2019-07-08 00:00:42 +00:00
copy:
src: 50unattended-upgrades
dest: /etc/apt/apt.conf.d/50unattended-upgrades
2019-07-08 00:00:42 +00:00
- name: Ensure 20auto-upgrades has the correct values using debconf
debconf:
name: unattended-upgrades
question: unattended-upgrades/enable_auto_updates
vtype: boolean
value: true