ansible/upgrade.yml: update to version from template

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-05-20 20:15:34 +02:00
parent 68f370d447
commit dcbc5f03c3
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
1 changed files with 7 additions and 3 deletions

View File

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