]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-infra: open dashboard port on monitor
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 16 Dec 2019 15:48:26 +0000 (10:48 -0500)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 8 Jan 2020 21:15:09 +0000 (16:15 -0500)
When there's no mgr group defined in the ansible inventory then the
mgrs are deployed implicitly on the mons nodes.
If the dashboard is enabled then we need to open the dashboard port on
the node that is running the ceph mgr process (mgr or mon).
The current code only allow to open that port on the mgr nodes when they
are present explicitly in the inventory but not implicitly.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1783520
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 4535985188dcc656ff4da60318dc07b44eabf3a6)

roles/ceph-infra/tasks/configure_firewall.yml

index 92778098a45743af41729eacf9348651de4bebde..6b021986d06373fad449be2a46934be93673c40d 100644 (file)
     when:
       - dashboard_enabled | bool
       - mgr_group_name is defined
-      - mgr_group_name in group_names
+      - (groups.get(mgr_group_name,[]) | length > 0 and mgr_group_name in group_names) or
+        (groups.get(mgr_group_name,[]) | length == 0 and mon_group_name in group_names)
 
   - block:
       - name: open grafana port