diff options
author | yjun <xy.0520@hotmail.com> | 2018-08-30 19:04:45 -0800 |
---|---|---|
committer | yjun <xy.0520@hotmail.com> | 2018-09-13 18:41:31 -0800 |
commit | 189726667231bcc652f0074c5998d064718162d5 (patch) | |
tree | 53c153b341b4cff7870f33445bdcb456cd96a913 /deploy | |
parent | adb0f6b01771e8f017fc33d4dc91f6fc4fe9066c (diff) |
Add kubespray to perform the result check
Change-Id: I61f4d97e68e137d4cadfad1dd260c69788946c47
Signed-off-by: yjun <xy.0520@hotmail.com>
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml index 0e253129..338f2574 100644 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml @@ -282,3 +282,16 @@ kube-controller-manager.manifest.j2", -e "@extra-vars.yml" -b -v 2>&1 | tee kargo.log tags: - ansible + +- name: read the ansible log file + shell: "cat /opt/kargo_k8s/kargo.log | tail -n 1000" + register: setup_kargo_result + +- fail: + msg: "some task failed when setup kargo." + when: setup_kargo_result.stdout.find('failed=1') != -1 + +- fail: + msg: "some host are unreachable." + when: setup_kargo_result.stdout.find('unreachable=1') != -1 + run_once: true |