diff options
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles')
3 files changed, 31 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh b/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh index 62e79b3b..db44246a 100644 --- a/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh +++ b/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2016-2018 compass4nfv and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + #!/bin/bash count=`ss -tnl | grep 6443 | wc -l` diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py b/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py index 2ffb4cae..8f836011 100755 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py @@ -1,3 +1,12 @@ +##############################################################################
+# Copyright (c) 2016-2018 compass4nfv and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
import yaml
import sys
import os
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 |