This commit adds a task to make sure user set a custom password for
`grafana_admin_password` and `dashboard_admin_password` variables.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1795509
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit
99328545de07d94c4a2bdd67c6ac8bc9280f23c5)
#dashboard_protocol: http
#dashboard_port: 8443
#dashboard_admin_user: admin
+# 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_crt: ''
#node_exporter_container_image: "prom/node-exporter:v0.17.0"
#node_exporter_port: 9100
#grafana_admin_user: admin
+# This variable must be set with a strong custom password when dashboard_enabled is True
#grafana_admin_password: admin
# We only need this for SSL (https) connections
#grafana_crt: ''
#dashboard_protocol: http
#dashboard_port: 8443
#dashboard_admin_user: admin
+# 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_crt: ''
node_exporter_container_image: registry.redhat.io/openshift4/ose-prometheus-node-exporter:v4.1
#node_exporter_port: 9100
#grafana_admin_user: admin
+# This variable must be set with a strong custom password when dashboard_enabled is True
#grafana_admin_password: admin
# We only need this for SSL (https) connections
#grafana_crt: ''
dashboard_protocol: http
dashboard_port: 8443
dashboard_admin_user: admin
-dashboard_admin_password: p@ssw0rd
+# 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_crt: ''
dashboard_key: ''
node_exporter_container_image: "prom/node-exporter:v0.17.0"
node_exporter_port: 9100
grafana_admin_user: admin
-grafana_admin_password: admin
+# This variable must be set with a strong custom password when dashboard_enabled is True
+#grafana_admin_password: admin
# We only need this for SSL (https) connections
grafana_crt: ''
grafana_key: ''
fail:
msg: "you must add at least one node in the [grafana-server] hosts group"
when: groups[grafana_server_group_name] | length < 1
+
+ - name: fail when dashboard_admin_password and/or grafana_admin_password are not set
+ fail:
+ msg: "you must set dashboard_admin_password and grafana_admin_password."
+ when:
+ - dashboard_admin_password is undefined
+ or grafana_admin_password is undefined
when: dashboard_enabled | bool
- name: validate container registry credentials