26 lines
682 B
YAML
26 lines
682 B
YAML
- name: Install packages
|
|
apt:
|
|
name:
|
|
- unattended-upgrades
|
|
- apt-listchanges
|
|
state: latest
|
|
install_recommends: false
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
|
|
|
- name: Copy unattended-upgrades configuration files in place.
|
|
template:
|
|
src: "{{ item }}.j2"
|
|
dest: "/etc/apt/apt.conf.d/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
with_items:
|
|
- 20auto-upgrades
|
|
- 50unattended-upgrades
|
|
|
|
- name: Enable unattended-upgrades service
|
|
service:
|
|
name: unattended-upgrades
|
|
enabled: true
|
|
state: started |