Add ability to configure date format in grafana server role

This commit is contained in:
RomainMou 2023-06-09 15:59:35 +02:00
parent 126c45e646
commit cf671711e1
3 changed files with 20 additions and 0 deletions

View File

@ -54,6 +54,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `grafana_tracing` | {} | [tracing](http://docs.grafana.org/installation/configuration/#tracing) configuration section |
| `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_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 |

View File

@ -198,6 +198,17 @@ grafana_image_storage: {}
# bucket:
# path:
# Date format
grafana_date_formats: {}
# full_date: "DD-MM-YYYY HH:mm:ss"
# interval_second: "HH:mm:ss"
# interval_minute: "HH:mm"
# interval_hour: "DD/MM HH:mm"
# interval_day: "DD/MM"
# interval_month: "MM-YYYY"
# interval_year: "YYYY"
# use_browser_locale: true
# default_timezone: "browser"
#######
# Plugins from https://grafana.com/plugins

View File

@ -195,3 +195,11 @@ provider = {{ grafana_image_storage.provider }}
{{ k }} = {{ v }}
{% endfor %}
{% endif %}
# Date formats
{% if grafana_date_formats != {} %}
[date_formats]
{% for k,v in grafana_date_formats.items() %}
{{ k }} = {{ v }}
{% endfor %}
{% endif %}