Michael Grote
33faf8b188
Reviewed-on: #631 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
22 lines
513 B
YAML
22 lines
513 B
YAML
---
|
|
- hosts: all
|
|
become: true
|
|
tasks:
|
|
- name: update apt cache
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
|
|
- name: update installed packages
|
|
ansible.builtin.package:
|
|
upgrade: dist
|
|
register: upgrade
|
|
|
|
- name: apt autoremove
|
|
ansible.builtin.apt:
|
|
autoremove: true
|
|
clean: yes
|
|
|
|
- name: reboot
|
|
ansible.builtin.reboot:
|
|
when: (upgrade.changed and (inventory_hostname != 'pve5.mgrote.net' and inventory_hostname != 'ansible2.mgrote.net'))
|