EOX GitLab Instance
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ansible-public
grafana role
Commits
8ce3aa4f
Commit
8ce3aa4f
authored
Jul 14, 2022
by
Karl Grube
Browse files
used files for certificate values instead of saving directly in
provisioning file
parent
2d7debfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
tasks/all.yml
View file @
8ce3aa4f
...
...
@@ -34,16 +34,6 @@
dest
:
/etc/nginx/sites-enabled/grafana
notify
:
reload nginx
-
name
:
slurp tls_client_cert
slurp
:
path
:
/etc/ssl/grafana_client/{{fqdn}}.crt
register
:
tls_client_cert_data
tags
:
provisioning
-
name
:
slurp tls_client_key
slurp
:
path
:
/etc/ssl/grafana_client/{{fqdn}}.key
register
:
tls_client_key_data
tags
:
provisioning
-
name
:
prometheus template
template
:
src
:
prometheus_datasource.yaml.j2
...
...
templates/prometheus_datasource.yaml.j2
View file @
8ce3aa4f
...
...
@@ -3,14 +3,11 @@ datasources:
- name: {{prometheus_server}}
type: prometheus
url: https://{{prometheus_server}}
editable:
tru
e
editable:
fals
e
secureJsonData:
tlsCACert: |
{{(lookup('file',root_ca_crt))|regex_replace('\n','\n ',)}}
tlsClientCert: |
{{(tls_client_cert_data['content'] |b64decode)|regex_replace('\n','\n ',)}}
tlsClientKey: |
{{(tls_client_key_data['content'] |b64decode)|regex_replace('\n','\n ',)}}
tlsCACert: $__file{/etc/ssl/grafana_client/root.ca.crt}
tlsClientCert: $__file{/etc/ssl/grafana_client/{{fqdn}}.crt}
tlsClientKey: $__file{/etc/ssl/grafana_client/{{fqdn}}.key}
jsonData:
tlsAuth: true
tlsAuthWithCACert: true
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment