diff --git a/roles/grafana/README.md b/roles/grafana/README.md index c5aa738f..8ea8797d 100644 --- a/roles/grafana/README.md +++ b/roles/grafana/README.md @@ -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 | diff --git a/roles/grafana/defaults/main.yml b/roles/grafana/defaults/main.yml index 3c640973..64319f37 100644 --- a/roles/grafana/defaults/main.yml +++ b/roles/grafana/defaults/main.yml @@ -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: [] diff --git a/roles/grafana/templates/grafana.ini.j2 b/roles/grafana/templates/grafana.ini.j2 index a18af8be..2392c86e 100644 --- a/roles/grafana/templates/grafana.ini.j2 +++ b/roles/grafana/templates/grafana.ini.j2 @@ -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]