dashboard: append mgr modules to ceph_mgr_modules

when `dashboard_enabled` is `True`, let's append `dashboard` and
`prometheus` modules to `ceph_mgr_modules` so they are automatically
loaded.

Closes: #4026

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a2b6f44665)
pull/4169/head
Guillaume Abrioux 2019-05-22 16:12:16 +02:00 committed by Dimitri Savineau
parent 5c009d01b6
commit 28e1ce0d8c
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,9 @@
--- ---
- name: append dashboard modules to ceph_mgr_modules
set_fact:
ceph_mgr_modules: "{{ (ceph_mgr_modules + [ 'dashboard', 'prometheus' ]) | unique }}"
when: dashboard_enabled | bool
- name: wait for all mgr to be up - name: wait for all mgr to be up
shell: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} mgr dump -f json | python -c 'import sys, json; print(json.load(sys.stdin)[\"available\"])'" shell: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} mgr dump -f json | python -c 'import sys, json; print(json.load(sys.stdin)[\"available\"])'"
register: mgr_dump register: mgr_dump