github.com/jlmeeker/kismatic@v1.10.1-0.20180612190640-57f9005a1f1a/ansible/roles/heapster/tasks/validate.yaml (about) 1 - name: wait until the influxdb pods are ready 2 command: kubectl --kubeconfig {{ kubernetes_kubeconfig.kubectl }} get deployment heapster-influxdb -n kube-system -o jsonpath='{.status.availableReplicas}' 3 register: readyReplicas 4 until: readyReplicas.stdout|int == 1 5 retries: 24 6 delay: 10 7 failed_when: false # We don't want this task to actually fail (We catch the failure with a custom msg in the next task) 8 9 - name: fail if the influxdb pod is not ready 10 fail: 11 msg: "Timed out waiting for the influxdb pods to be in the ready state." 12 when: readyReplicas.stdout|int != 1 13 14 - name: wait until the heapster pods are ready 15 command: kubectl --kubeconfig {{ kubernetes_kubeconfig.kubectl }} get deployment heapster -n kube-system -o jsonpath='{.status.availableReplicas}' 16 register: readyReplicas 17 until: readyReplicas.stdout|int == {{ heapster.options.heapster.replicas }} 18 retries: 24 19 delay: 10 20 failed_when: false # We don't want this task to actually fail (We catch the failure with a custom msg in the next task) 21 22 - name: fail if the heapster pod is not ready 23 fail: 24 msg: "Timed out waiting for the heapster pods to be in the ready state." 25 when: readyReplicas.stdout|int != {{ heapster.options.heapster.replicas }}