feat: add cluster-rollout-reboot playbook

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2023-01-09 13:41:01 -05:00
1 parent 2acbbefd15
commit 0e4bf5d499
3 files changed
+43 -3

No files matched your search

@@ -0,0 +1,32 @@
---
- name: Cluster Rollout Reboot
hosts:
- master
- worker
become: true
gather_facts: true
any_errors_fatal: true
serial: 1
pre_tasks:
- name: Pausing for 5 seconds...
ansible.builtin.pause:
seconds: 5
tasks:
- name: Draining node (this might take awhile)
kubernetes.core.k8s_drain:
state: drain
name: "{{ inventory_hostname }}"
delete_options:
delete_emptydir_data: true
ignore_daemonsets: true
force: true
terminate_grace_period: 900
notify: Reboot
- name: Uncordoning node
kubernetes.core.k8s_drain:
state: uncordon
name: "{{ inventory_hostname }}"
handlers:
- name: Reboot
ansible.builtin.reboot: