From 0e75d72e3eb009b91e19626ab3d12b2a4f2e6d29 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Wed, 21 Aug 2019 19:37:12 -0400 Subject: [PATCH] k8s: check for nodes to be ready in playbooks We don't need to check if the cluster is ready in CI, it should happen inside the library. Change-Id: I6d600d49bde919852a8161b5409ad8ea9efa0147 --- ansible/site.yaml | 8 ++++++++ playbooks/run.yaml | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ansible/site.yaml b/ansible/site.yaml index 468b7a3..2f7aa7c 100644 --- a/ansible/site.yaml +++ b/ansible/site.yaml @@ -169,3 +169,11 @@ changed_when: false shell: | kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml + + - name: Wait for all nodes to get ready + run_once: true + shell: kubectl get nodes + register: _kubectl_get_nodes + retries: 30 + delay: 3 + until: '"NotReady" not in _kubectl_get_nodes.stdout' \ No newline at end of file diff --git a/playbooks/run.yaml b/playbooks/run.yaml index c51ad7c..9eb0338 100644 --- a/playbooks/run.yaml +++ b/playbooks/run.yaml @@ -23,13 +23,6 @@ - hosts: masters[0] tasks: - - name: Wait for all nodes to get ready - shell: kubectl get nodes - register: _kubectl_get_nodes - retries: 30 - delay: 3 - until: '"NotReady" not in _kubectl_get_nodes.stdout' - - name: Download sonobuoy become: true unarchive: