ansible/upgrade.yml: remove packages after reboot
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2debab9c58
commit
18cdeda02b
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: Update and upgrade apt packages
|
||||
gather_facts: false
|
||||
hosts: all
|
||||
|
@ -8,9 +9,10 @@
|
|||
upgrade: true
|
||||
update_cache: true
|
||||
cache_valid_time: 86400
|
||||
- name: Remove unused packages
|
||||
apt:
|
||||
autoremove: true
|
||||
register: packages
|
||||
- reboot:
|
||||
when: packages.changed
|
||||
- name: Remove unused packages
|
||||
apt:
|
||||
autoremove: true
|
||||
autoclean: true
|
||||
|
|
Loading…
Reference in New Issue