feat: add cluster-rollout-reboot playbook
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
3 files changed
+43
-3
No files matched your search
@@ -3,6 +3,7 @@ version: "3"
|
||||
|
||||
env:
|
||||
ANSIBLE_CONFIG: "{{.PROJECT_DIR}}/ansible.cfg"
|
||||
K8S_AUTH_KUBECONFIG: "{{.PROJECT_DIR}}/kubeconfig"
|
||||
|
||||
vars:
|
||||
ANSIBLE_PLAYBOOK_DIR: "{{.ANSIBLE_DIR}}/playbooks"
|
||||
@@ -41,7 +42,7 @@ tasks:
|
||||
interactive: true
|
||||
cmds:
|
||||
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-nuke.yml
|
||||
- task: reboot
|
||||
- task: force-reboot
|
||||
|
||||
ping:
|
||||
desc: Ping all the hosts
|
||||
@@ -55,13 +56,19 @@ tasks:
|
||||
cmds:
|
||||
- ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --one-line -a 'uptime'
|
||||
|
||||
reboot:
|
||||
rollout-reboot:
|
||||
desc: Rollout a reboot across all the k8s nodes
|
||||
dir: "{{.ANSIBLE_DIR}}"
|
||||
cmds:
|
||||
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-rollout-reboot.yml
|
||||
|
||||
force-reboot:
|
||||
desc: Reboot all the k8s nodes
|
||||
dir: "{{.ANSIBLE_DIR}}"
|
||||
cmds:
|
||||
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-reboot.yml
|
||||
|
||||
poweroff:
|
||||
force-poweroff:
|
||||
desc: Shutdown all the k8s nodes
|
||||
dir: "{{.ANSIBLE_DIR}}"
|
||||
cmds:
|
||||
|
||||
Reference in new issue
Block a user