Skip to content

Commit fd44061

Browse files
authored
Update README.md
1 parent b162465 commit fd44061

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,24 @@ ansible nginx -m service -a "name=nginx state=stopped"
132132
autoclean: yes
133133
```
134134
135+
#### Playbook: List Kubernetes Cluster Nodes
136+
137+
```yml
138+
- name: Kubernetes Cluster Health Check
139+
hosts: k8s
140+
become: true
141+
gather_facts: false
142+
tasks:
143+
- name: Checking the Kubernetes Nodes
144+
shell:
145+
kubectl get nodes
146+
register: results
147+
148+
- name: Print the Kubernetes Nodes
149+
debug:
150+
msg: "{{ results.stdout.split('\n') }}"
151+
```
152+
135153
#### Sample Playbooks
136154
137155
```yaml

0 commit comments

Comments
 (0)