Add condition on dashboard installer phase

Even if dashboard feature is disabled then the installer status will
still report dashboard, grafana and node-exporter roles timing.

INSTALLER STATUS **********************************
Install Ceph Monitor           : Complete (0:01:21)
Install Ceph Manager           : Complete (0:00:49)
Install Ceph Dashboard         : Complete (0:00:00)
Install Ceph Grafana           : Complete (0:00:02)

When need to set the dashboard_enabled condition on those installer
phase pre/post tasks.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 0604275c11)
pull/4183/head
Dimitri Savineau 2019-06-28 14:14:53 -04:00 committed by mergify[bot]
parent 381358f439
commit 8bc613ccdf
2 changed files with 10 additions and 0 deletions

View File

@ -527,6 +527,7 @@
installer_phase_ceph_grafana:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
tasks:
- block:
@ -561,6 +562,7 @@
installer_phase_ceph_grafana:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
- hosts: '{{ groups["mgrs"][0] | default(groups["mons"][0]) | default(omit) }}'
become: true
@ -572,6 +574,7 @@
installer_phase_ceph_dashboard:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
tasks:
- block:
@ -590,3 +593,4 @@
installer_phase_ceph_dashboard:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool

View File

@ -491,6 +491,7 @@
installer_phase_ceph_node_exporter:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
tasks:
- block:
@ -514,6 +515,7 @@
installer_phase_ceph_node_exporter:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
- hosts: '{{ groups["grafana-server"][0] | default(groups["mgrs"][0]) | default(groups["mons"][0]) | default(omit) }}'
become: true
@ -525,6 +527,7 @@
installer_phase_ceph_grafana:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
tasks:
- block:
@ -555,6 +558,7 @@
installer_phase_ceph_grafana:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
- hosts: '{{ groups["mgrs"][0] | default(groups["mons"][0]) | default(omit) }}'
become: true
@ -566,6 +570,7 @@
installer_phase_ceph_dashboard:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool
tasks:
- block:
@ -584,3 +589,4 @@
installer_phase_ceph_dashboard:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
when: dashboard_enabled | bool