Skip to content

Commit

Permalink
add grafana_plugins_ops to defaults and docs (#251)
Browse files Browse the repository at this point in the history
Co-authored-by: Ishan Jain <51803183+ishanjainn@users.noreply.github.com>
  • Loading branch information
weakcamel and ishanjainn authored Oct 19, 2024
1 parent efbbbd1 commit 65b6f63
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions roles/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `grafana_datasources` | [] | List of datasources which should be configured |
| `grafana_environment` | {} | Optional Environment param for Grafana installation, useful ie for setting http_proxy |
| `grafana_plugins` | [] | List of Grafana plugins which should be installed |
| `grafana_plugins_ops` | {} | [plugins](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#plugins-1) configuration section |
| `grafana_alert_notifications` | [] | List of alert notification channels to be created, updated, or deleted |

Data source example:
Expand Down
7 changes: 6 additions & 1 deletion roles/grafana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,15 @@ grafana_feature_toggles: {}
# regressionTransformation: true

#######
# Plugins from https://grafana.com/plugins
# Plugins to install from https://grafana.com/plugins
grafana_plugins: []
# - raintank-worldping-app

#######
# Configuration of plugins ([plugin] section of grafana.ini]
grafana_plugins_ops: {}
# allow_loading_unsigned_plugins: alexanderzobnin-zabbix-datasource

# Dashboards from https://grafana.com/dashboards
grafana_dashboards: []
# - dashboard_id: '4271'
Expand Down
2 changes: 1 addition & 1 deletion roles/grafana/templates/grafana.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ root_url = {{ grafana_url }}
{% endfor %}

# Plugins
{% if grafana_plugins_ops is defined %}
{% if grafana_plugins_ops != {} %}
[plugins]
{% for k,v in grafana_plugins_ops.items() %}
{{ k }} = {{ v }}
Expand Down

0 comments on commit 65b6f63

Please sign in to comment.