forked from hitachienergy/epiphany
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Grafana admin password in the upgrade mode (hitachienergy#2420)
- Loading branch information
Showing
4 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
ansible/playbooks/roles/grafana/tasks/upgrade/password_change.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Fail when grafana admin password isn't set | ||
fail: | ||
msg: "Please specify grafana admin password (grafana_security.admin_password)" | ||
when: | ||
- grafana_security.admin_password is undefined or grafana_security.admin_password | length == 0 | ||
|
||
# Grafana admin password change is only available through the grafana-cli | ||
- name: Change admin assword using grafana-cli | ||
shell: grafana-cli admin reset-admin-password "{{ grafana_security.admin_password }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters