Skip to content

Commit

Permalink
Add support for configuring feature_toggles in grafana role (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
gardar authored May 15, 2024
2 parents 1fd392d + 5ec88ee commit 17a6e71
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `grafana_snapshots` | {} | [snapshots](http://docs.grafana.org/installation/configuration/#snapshots) configuration section |
| `grafana_image_storage` | {} | [image storage](http://docs.grafana.org/installation/configuration/#external-image-storage) configuration section |
| `grafana_date_formats` | {} | [date formats](http://docs.grafana.org/installation/configuration/#date_formats) configuration section |
| `grafana_feature_toggles` | {} | [feature toggles](http://docs.grafana.org/installation/configuration/#feature_toggles) configuration section |
| `grafana_dashboards` | [] | List of dashboards which should be imported |
| `grafana_dashboards_dir` | "dashboards" | Path to a local directory containing dashboards files in `json` format |
| `grafana_datasources` | [] | List of datasources which should be configured |
Expand Down
6 changes: 6 additions & 0 deletions roles/grafana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ grafana_date_formats: {}
# use_browser_locale: true
# default_timezone: "browser"

# Feature toggles
# List of feature toggles: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/#feature-toggles
grafana_feature_toggles: {}
# autoMigrateOldPanels: true
# regressionTransformation: true

#######
# Plugins from https://grafana.com/plugins
grafana_plugins: []
Expand Down
8 changes: 8 additions & 0 deletions roles/grafana/templates/grafana.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ provider = {{ grafana_image_storage.provider }}
{% endfor %}
{% endif %}

{% if grafana_feature_toggles != {} %}
# Feature toggles
[feature_toggles]
{% for k,v in grafana_feature_toggles.items() %}
{{ k }} = {{ v }}
{% endfor %}
{% endif %}

# Oauth_Keycloack
{% if grafana_auth_generic_oauth != {} %}
[auth.generic_oauth]
Expand Down

0 comments on commit 17a6e71

Please sign in to comment.