feat: add update-all-hosts playbook

This commit is contained in:
Simon Cornet 2026-05-01 15:30:50 +02:00
commit 91522f4360

34
update-all-hosts.yaml Normal file
View file

@ -0,0 +1,34 @@
---
# update all hosts except proxmox and semaphore
- name: "update hosts"
hosts: "all,!proxmox,!semaphore01.siempie.internal"
become: true
serial: 1
tasks:
# install updates
- name: "install updates"
tags: "update"
ansible.builtin.import_tasks: "tasks/update.yaml"
# initiate reboot
- name: "initiate reboot"
tags: "reboot"
ansible.builtin.import_tasks: "tasks/reboot.yaml"
# notify operator about excluded hosts
- name: "notify operator"
hosts: "localhost"
gather_facts: false
become: false
tasks:
# notify operator about excluded hosts
- name: "remind operator about excluded hosts"
ansible.builtin.debug:
msg:
- "The following hosts were NOT updated and need manual attention:"
- " - Proxmox hosts"
- " - semaphore01.siempie.internal"