infra-nimbus/ansible/upgrade.yml
Jakub Sokołowski 1f4483748b
ansible/upgrade: add missing become=true
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-04-24 08:59:55 +02:00

20 lines
409 B
YAML

---
- name: Update and upgrade apt packages
gather_facts: false
become: true
hosts: all
serial: 1
tasks:
- name: Upgrade packages
apt:
upgrade: true
update_cache: true
cache_valid_time: 86400 # One day
register: packages
- reboot:
when: packages.changed
- name: Remove unused packages
apt:
autoremove: true
autoclean: true