26 lines
610 B
YAML
Executable File
26 lines
610 B
YAML
Executable File
---
|
|
- name: Shuts down K8s services on nodes and master
|
|
hosts: kubernetes
|
|
become: yes
|
|
gather_facts: yes
|
|
roles:
|
|
- common
|
|
tasks:
|
|
|
|
- name: Collect cluster status
|
|
ansible.builtin.shell: |
|
|
kubectl get nodes
|
|
kubectl get namespaces
|
|
kubectl get pods -A
|
|
kubectl get pv
|
|
kubectl get pvc -A
|
|
kubectl get secrets -A
|
|
kubectl get ingress -A
|
|
when: ('kube_masters' in group_names)
|
|
|
|
|
|
# - name: Rebooting...
|
|
# ansible.builtin.reboot:
|
|
# reboot_timeout: 180
|
|
# msg: Reboot issued by Ansible
|
|
# test_command: whoami |