diff --git a/update-all-hosts.yaml b/update-all-hosts.yaml new file mode 100644 index 0000000..d2da682 --- /dev/null +++ b/update-all-hosts.yaml @@ -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"