Add grafana admin password management
Change-Id: Ia706ca4d756ee26b0876bced24d6d961a64cb4ee Closes-Bug: PROD-17909
This commit is contained in:
parent
1dc8d94353
commit
0bd35ea2f3
3 changed files with 24 additions and 0 deletions
|
@ -111,4 +111,7 @@ grafana_client_dashboard_{{ dashboard_name }}:
|
|||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
include:
|
||||
- grafana.client.user
|
||||
|
||||
{%- endif %}
|
||||
|
|
18
grafana/client/user.sls
Normal file
18
grafana/client/user.sls
Normal file
|
@ -0,0 +1,18 @@
|
|||
{%- from "grafana/map.jinja" import client with context %}
|
||||
|
||||
grafana_admin_user_{{ client.server.user }}_present:
|
||||
grafana4_user.present:
|
||||
- name: {{ client.server.user }}
|
||||
- password: {{ client.server.password }}
|
||||
- email: "{{ client.server.user }}@localhost"
|
||||
- fullname: {{ client.server.user }}
|
||||
- is_admin: true
|
||||
|
||||
grafana_admin_user_{{ client.server.user }}_update_password:
|
||||
module.run:
|
||||
- name: grafana4.update_user_password
|
||||
- userid: {{ client.server.user_id }}
|
||||
- kwargs:
|
||||
password: {{ client.server.password }}
|
||||
- require:
|
||||
- grafana4_user: grafana_admin_user_{{ client.server.user }}_present
|
|
@ -54,6 +54,9 @@ Debian:
|
|||
server:
|
||||
host: 127.0.0.1
|
||||
port: 3000
|
||||
user: admin
|
||||
password: admin
|
||||
user_id: 1
|
||||
remote_data:
|
||||
engine: none
|
||||
datasource: {}
|
||||
|
|
Loading…
Reference in a new issue