role service-grafana: set admin password during installation
This commit is contained in:
parent
222b4e5197
commit
d785c62eab
4 changed files with 9 additions and 4 deletions
|
@ -18,8 +18,8 @@
|
|||
state: present
|
||||
|
||||
- name: copy grafana.ini
|
||||
copy:
|
||||
src: grafana.ini
|
||||
template:
|
||||
src: grafana.ini.j2
|
||||
dest: /etc/grafana/grafana.ini
|
||||
owner: root
|
||||
group: grafana
|
||||
|
|
|
@ -23,6 +23,8 @@ reporting_enabled = false
|
|||
|
||||
[security]
|
||||
|
||||
admin_user = admin
|
||||
admin_password = {{ lookup('passwordstore', 'grafana/admin') }};
|
||||
login_remember_days = 7
|
||||
|
||||
[snapshots]
|
|
@ -1,7 +1,7 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name stats.{{ http_domain_internal }} stats.{{ http_domain_external }};
|
||||
server_name {{ grafana_url_internal }} {{ grafana_url_external }};
|
||||
|
||||
include /etc/nginx/snippets/redirect-to-ssl.conf;
|
||||
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
||||
|
@ -10,7 +10,7 @@ server {
|
|||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name stats.{{ http_domain_internal }} stats.{{ http_domain_external }};
|
||||
server_name {{ grafana_url_internal }} {{ grafana_url_external }};
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/privkey.pem;
|
||||
|
|
3
roles/service-grafana/vars/main.yml
Normal file
3
roles/service-grafana/vars/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
grafana_url_external: "{{ http_grafana_prefix }}.{{ http_domain_external }}"
|
||||
grafana_url_internal: "{{ http_grafana_prefix }}.{{ http_domain_internal }}"
|
Loading…
Reference in a new issue