dashboard: Set ssl_server_port if it is supported

We cannot use the old fashioned config-key way, here. It was not
supported when the option was introduced (post 14.2.0). Since the option
is not always supported we can simply ignore the potential failure on
ceph clusters that do not support it.

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit e737a1f83e)
pull/3999/head
Boris Ranto 2019-04-04 19:51:16 +02:00 committed by Guillaume Abrioux
parent fda901fff9
commit 5a85be9502
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@
{{ mgr_prefix }} ceph config set mgr mgr/dashboard/server_port {{ dashboard_port }} || \
{{ mgr_prefix }} ceph config-key set mgr/dashboard/server_port {{ dashboard_port }}
- name: "set the dashboard SSL port ({{ dashboard_port }})"
command: "{{ mgr_prefix }} ceph config set mgr mgr/dashboard/ssl_server_port {{ dashboard_port }}" # Do not use the old fashioned config-key way ssl_server_port, it was not supported when this option was introduced
failed_when: false # Do not fail if the option does not exist, it only exists post-14.2.0
- name: disable mgr dashboard module (restart)
command: "{{ mgr_prefix }} ceph mgr module disable dashboard"
changed_when: false