]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-validate: fail if no mgr host is present
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 11 Feb 2020 16:44:28 +0000 (11:44 -0500)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 11 Feb 2020 18:27:10 +0000 (13:27 -0500)
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 <dsavinea@redhat.com>
roles/ceph-validate/tasks/main.yml

index b9c8434d1deda16fc42bb097db1be07df387d28c..f0d063c4fe5e632bdde1b98844c22b147d61b4cf 100644 (file)
     - 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