16379: Sets grafana's admin user password through the CLI.
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / states / grafana_admin_user.sls
diff --git a/tools/salt-install/config_examples/multi_host/aws/states/grafana_admin_user.sls b/tools/salt-install/config_examples/multi_host/aws/states/grafana_admin_user.sls
new file mode 100644 (file)
index 0000000..6ccc8db
--- /dev/null
@@ -0,0 +1,13 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+{%- set grafana_server = salt['pillar.get']('grafana', {}) %}
+
+{%- if grafana_server %}
+extra_grafana_admin_user:
+  cmd.run:
+    - name: grafana-cli admin reset-admin-password {{ grafana_server.config.security.admin_password }}
+    - require:
+      - service: grafana-service-running-service-running
+{%- endif %}
\ No newline at end of file