From 21973307275a218b40083e3cd6b2f4627b77042a Mon Sep 17 00:00:00 2001 From: Sergey Magidovich Date: Thu, 20 Sep 2018 16:09:25 +0300 Subject: [PATCH] Add check that kube-master, kube-node and etcd groups are not empty. --- .../kubernetes/preinstall/tasks/0020-verify-settings.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml index 2e2823623f5..84a80571d19 100644 --- a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml @@ -5,6 +5,15 @@ - ansible_version.full|version_compare('2.3.0', '>=') run_once: yes +- name: Stop if either kube-master, kube-node or etcd is empty + assert: + that: groups.get('{{ item }}') + with_items: + - kube-master + - kube-node + - etcd + run_once: true + - name: Stop if non systemd OS type assert: that: ansible_service_mgr == "systemd"