ubuntu-unattended-upgrades/tasks/main.yml

25 lines
543 B
YAML
Raw Normal View History

2015-07-03 21:39:37 +00:00
---
- name: Install required packages for autoupdate
apt:
name: '{{ item }}'
update_cache: yes
2015-07-03 21:39:37 +00:00
with_items:
- unattended-upgrades
- update-notifier-common
- sendmail
- name: Enable automatic update / upgrade
copy:
content: |
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
dest: /etc/apt/apt.conf.d/20auto-upgrades
2015-07-03 21:39:37 +00:00
- name: Configure unattended upgrades
template:
src: templates/50unattended-upgrades
2015-07-03 21:39:37 +00:00
dest: /etc/apt/apt.conf.d/50unattended-upgrades
...