diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-09-19 14:51:56 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-09-19 14:51:56 +0200 |
| commit | 60f9e792540cd3d56fb0329bf30fb4eb9ad9cf64 (patch) | |
| tree | b79d9f5044441bd2a27ae922e2e87c6b52043000 /roles/grafana/meta | |
| parent | 0460ecb3cfefc67a79d46d6d8f56676d77c9f507 (diff) | |
Add Grafana role
Diffstat (limited to 'roles/grafana/meta')
| -rw-r--r-- | roles/grafana/meta/argument_specs.yml | 84 | ||||
| -rw-r--r-- | roles/grafana/meta/main.yml | 18 |
2 files changed, 102 insertions, 0 deletions
diff --git a/roles/grafana/meta/argument_specs.yml b/roles/grafana/meta/argument_specs.yml new file mode 100644 index 00000000..1baa0e14 --- /dev/null +++ b/roles/grafana/meta/argument_specs.yml @@ -0,0 +1,84 @@ +--- +argument_specs: + main: + short_description: "Install and configure Grafana with datasources and dashboards" + description: "Install and configure Grafana monitoring system with Prometheus datasources and community dashboards" + options: + grafana_port: + description: "Port for Grafana web interface" + type: "int" + default: 3000 + grafana_admin_user: + description: "Grafana admin username" + type: "str" + default: "admin" + grafana_admin_password: + description: "Grafana admin password" + type: "str" + default: "changeme" + grafana_database_type: + description: "Database type for Grafana" + type: "str" + default: "sqlite3" + choices: + - "sqlite3" + - "mysql" + - "postgres" + grafana_datasources: + description: "List of datasources to provision" + type: "list" + elements: "dict" + default: [] + options: + name: + description: "Name of the datasource" + type: "str" + required: true + uid: + description: "Unique identifier for the datasource to be used in dashboard configurations" + type: "str" + required: true + type: + description: "Type of datasource" + type: "str" + default: "prometheus" + url: + description: "URL of the datasource" + type: "str" + required: true + default: + description: "Whether this is the default datasource" + type: "bool" + default: false + grafana_dashboards: + description: "List of community dashboards to download and provision" + type: "list" + elements: "dict" + default: [] + options: + id: + description: "Grafana.com dashboard ID" + type: "int" + required: true + revision: + description: "Dashboard revision number" + type: "int" + required: true + name: + description: "Local name for the dashboard file" + type: "str" + required: true + datasource_mappings: + description: "List of datasource variable mappings for the dashboard" + type: "list" + elements: "dict" + default: [] + options: + key: + description: "Original datasource reference to replace" + type: "str" + required: true + value: + description: "Target datasource UID to use" + type: "str" + required: true diff --git a/roles/grafana/meta/main.yml b/roles/grafana/meta/main.yml new file mode 100644 index 00000000..d67d948d --- /dev/null +++ b/roles/grafana/meta/main.yml @@ -0,0 +1,18 @@ +--- +dependencies: [] +galaxy_info: + author: "a14m" + description: "Install Grafana for monitoring" + company: "kartoffeln.work GmbH." + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" + - name: "Ubuntu" + versions: + - "noble" + - name: "Debian" + versions: + - "bookworm" |
