2019-04-29 07:08:11 -07:00
|
|
|
---
|
|
|
|
- name: add distribution-specific variables
|
|
|
|
include_vars: "{{ ansible_distribution }}.yml"
|
|
|
|
|
|
|
|
- name: add Debian Wheezy workaround
|
|
|
|
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
|
|
|
|
when: (ansible_distribution == "Debian") and (ansible_distribution_release == "wheezy")
|
|
|
|
|
|
|
|
- name: install unattended-upgrades
|
2019-05-02 07:42:47 -07:00
|
|
|
become: true
|
2019-04-29 07:08:11 -07:00
|
|
|
apt:
|
|
|
|
pkg: unattended-upgrades
|
|
|
|
state: present
|
|
|
|
cache_valid_time: "{{unattended_cache_valid_time}}"
|
|
|
|
update_cache: yes
|
|
|
|
|
|
|
|
- name: install reboot dependencies
|
|
|
|
include: reboot.yml
|
|
|
|
when: unattended_automatic_reboot
|
|
|
|
|
|
|
|
- name: create APT auto-upgrades configuration
|
2019-05-02 07:42:47 -07:00
|
|
|
become: true
|
2019-04-29 07:08:11 -07:00
|
|
|
template:
|
|
|
|
src: auto-upgrades.j2
|
|
|
|
dest: /etc/apt/apt.conf.d/20auto-upgrades
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
- name: create unattended-upgrades configuration
|
2019-05-02 07:42:47 -07:00
|
|
|
become: true
|
2019-04-29 07:08:11 -07:00
|
|
|
template:
|
|
|
|
src: unattended-upgrades.j2
|
|
|
|
dest: /etc/apt/apt.conf.d/50unattended-upgrades
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|