Is there any existing ansible module I can use for the following. I can wait for kubectl get nodes
STATUS
\=Ready
?
$ kubectl get nodes NAME STATUS ROLES AGE VERSION master1 NotReady master 42s v1.8.4
I didn't know any existing module for this. you can do something like this.
---
- hosts: localhost
gather_facts: no
tasks:
- name: Wait for nodes to be ready
shell: "/usr/bin/kubectl get nodes"
register: nodes
until:
- '" Ready " in nodes.stdout'
retries: 6
delay: 2