This commit allows one to set the role for the admin user as read-only.
This can be controlled via the dashboard_admin_user_ro variable but the
default value is false for backward compatibility.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1810176
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit
fb69f6990ce0bf4c9cd4caf9ce7a29e15ab07cfd)
#dashboard_protocol: http
#dashboard_port: 8443
#dashboard_admin_user: admin
+#dashboard_admin_user_ro: false
# This variable must be set with a strong custom password when dashboard_enabled is True
#dashboard_admin_password: p@ssw0rd
# We only need this for SSL (https) connections
#dashboard_protocol: http
#dashboard_port: 8443
#dashboard_admin_user: admin
+#dashboard_admin_user_ro: false
# This variable must be set with a strong custom password when dashboard_enabled is True
#dashboard_admin_password: p@ssw0rd
# We only need this for SSL (https) connections
if {{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard ac-user-show {{ dashboard_admin_user | quote }}; then
{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard ac-user-set-password {{ dashboard_admin_user | quote }} {{ dashboard_admin_password | quote }}
else
- {{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard ac-user-create {{ dashboard_admin_user | quote }} {{ dashboard_admin_password | quote }} administrator
+ {{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard ac-user-create {{ dashboard_admin_user | quote }} {{ dashboard_admin_password | quote }} {{ 'read-only' if dashboard_admin_user_ro | bool else 'administrator' }}
fi
retries: 6
delay: 5
dashboard_protocol: http
dashboard_port: 8443
dashboard_admin_user: admin
+dashboard_admin_user_ro: false
# This variable must be set with a strong custom password when dashboard_enabled is True
#dashboard_admin_password: p@ssw0rd
# We only need this for SSL (https) connections
handler_health_mon_check_delay: 10
handler_health_osd_check_delay: 10
dashboard_admin_password: $sX!cD$rYU6qR^B!
+dashboard_admin_user_ro: true
grafana_admin_password: +xFRe+RES@7vg24n
\ No newline at end of file
handler_health_mon_check_delay: 10
handler_health_osd_check_delay: 10
dashboard_admin_password: $sX!cD$rYU6qR^B!
+dashboard_admin_user_ro: true
grafana_admin_password: +xFRe+RES@7vg24n
\ No newline at end of file