blob: b0924d448e1cc061160357c7dc68046afd8bcae9 [file] [log] [blame]
---
role_actions:
- disable
- install
- setup
- postconf
- config_update
role_package: grafana
container_name: grafana-oss
owner: grafana
group: grafana
container_uid: 472
container_gid: 0
grafana_config_dir: /etc/grafana
grafana_lib_dir: /var/lib/grafana
grafana_log_dir: /var/log/grafana
grafana_container_tag: "9.2.6"
grafana_container_version: "{{ grafana_container_tag }}-1"
grafyaml_container: "quay.io/software-factory/grafyaml:0.0.9-1"
# Configurable directories https://grafana.com/docs/grafana/latest/administration/configure-docker/#default-paths
grafana_components:
- service: "grafana"
image: "quay.io/software-factory/{{ container_name }}:{{ grafana_container_version }}"
params: >-
--network host
--user {{ container_uid }}:{{ container_gid }}
--uidmap {{ container_uid }}:{{ grafana_uid | default(1000) }}:1
--gidmap 0:{{ grafana_gid | default(1000) }}:1
--uidmap 0:4000:471
--gidmap 1:4000:999
--env GF_INSTALL_PLUGINS={{ grafana_plugins }}
--volume {{ grafana_config_dir }}:{{ grafana_config_dir }}:z
--volume {{ grafana_lib_dir }}:{{ grafana_lib_dir }}:z
--volume {{ grafana_log_dir }}:{{ grafana_log_dir }}:z
--volume /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:/etc/ssl/certs/ca-certificates.crt
{% if sf_grafana_additional_params is defined %}
{{ sf_grafana_additional_params }}
{% endif %}
# Grafana Container Plugins Docs: https://grafana.com/docs/grafana/latest/installation/docker/#build-and-run-a-docker-image-with-pre-installed-plugins
# Grafan Plugins page: https://grafana.com/grafana/plugins/
grafana_plugins: "grafana-clock-panel"
grafana_repo_name: grafana
grafana_repo_desc: Grafana repository
grafana_repo_url: https://packages.grafana.com/oss/rpm
grafana_repo_gpgkey: https://packages.grafana.com/gpg.key
grafana_repo_gpgcheck: 1
grafana_database_type: mysql
grafana_mysql_host: mysql.example.com
grafana_mysql_port: 3306
grafana_mysql_db: grafana
grafana_mysql_user: grafana
grafana_mysql_password: CHANGE_ME
grafana_http_port: 3000
grafana_host: grafana.example.com
grafana_internal_url: "http://{{ grafana_host }}:{{ grafana_http_port }}"
grafana_internal_datasource_url: '{{ grafana_internal_url }}/api/datasources'
grafana_internal_apikey_url: '{{ grafana_internal_url }}/api/auth/keys'
grafana_server_root_url: "{{ gateway_url }}/grafana/"
# When using bool with ini_file, True or False should be between quotes for it's not an ansible bool but a string
# The result on the ini file is a bool
# https://docs.ansible.com/ansible/latest/modules/ini_file_module.html#parameter-value
grafana_users_allow_sign_up: 'False'
grafana_auth_anonymous_enabled: 'True'
grafana_auth_anonymous_org_role: Viewer
grafana_auth_basic_enabled: 'True'
grafana_auth_proxy_enabled: 'True'
grafana_auth_proxy_header_name: X-Forwarded-User
grafana_auth_proxy_header_property: username
grafana_auth_proxy_auto_sign_up: 'True'
grafana_admin_password: CHANGE_ME
influxdb_host: influxdb.example.com
telegraf_influxdb_user: telegraf
telegraf_influxdb_password: CHANGE_ME
service_name: grafana
service_real_name: grafana-server
grafyaml_metrics: /var/lib/software-factory/metrics
grafana_data_source:
isDefault: true
database: telegraf
name: influxdb
type: influxdb
user: '{{ telegraf_influxdb_user }}'
secureJsonData:
password: '{{ telegraf_influxdb_password }}'
url: 'https://{{ influxdb_host }}:8086'
access: proxy
basicAuth: false
grafyaml_apikey_data:
name: 'grafyaml'
role: 'Admin'
keycloak_default_realm: SF