0
0
vps-set-up-playbook/roles/unattended-upgrades/tasks/main.yaml

27 lines
622 B
YAML
Raw Normal View History

2023-11-13 11:47:39 +08:00
- 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