Michael Grote
87ecbf6353
Reviewed-on: #637 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
26 lines
679 B
YAML
26 lines
679 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'))
|
|
|
|
- name: Info
|
|
ansible.builtin.debug:
|
|
msg: Pool auf pbs.mgrote.net mounten!
|
|
when: (upgrade.changed and inventory_hostname == 'pbs.mgrote.net')
|