regluit/sysadmin/playbooks/unattended-upgrade.yml

16 lines
341 B
YAML

- name: unattended-upgrade
# by default, run only just
hosts: '{{target | default("just")}}'
tasks:
- name: apply upgrade
command: sudo unattended-upgrade
- name: check whether reboot needed
stat: path=/var/run/reboot-required
register: reboot_required
- debug: var=reboot_required.stat.exists