feat: add update-all-hosts playbook
This commit is contained in:
parent
d3cefe2058
commit
91522f4360
1 changed files with 34 additions and 0 deletions
34
update-all-hosts.yaml
Normal file
34
update-all-hosts.yaml
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue