From 306ce823582b117ec24a47d4f06035ad497f51f4 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 11 Feb 2020 11:44:28 -0500 Subject: [PATCH] ceph-validate: fail if no mgr host is present We already stop the upgrade playbook (rolling_update.yml) if there's no mgr node present so we should also do the same for initial deployment. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1788644 Signed-off-by: Dimitri Savineau --- roles/ceph-validate/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/ceph-validate/tasks/main.yml b/roles/ceph-validate/tasks/main.yml index b9c8434d1..f0d063c4f 100644 --- a/roles/ceph-validate/tasks/main.yml +++ b/roles/ceph-validate/tasks/main.yml @@ -158,6 +158,13 @@ - osd_objectstore == 'filestore' - osd_group_name in group_names +- name: fail if no mgr host is present in the inventory + fail: + msg: "Please add a mgr host to your inventory." + when: + - groups.get(mon_group_name, []) | length > 0 + - groups.get(mgr_group_name, []) | length == 0 + - name: include check_system.yml include_tasks: check_system.yml