feat: install unofficial plugins
This commit is contained in:
parent
c11d156391
commit
c854d12c4e
3 changed files with 25 additions and 3 deletions
|
@ -5,6 +5,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- feat: install unofficial plugins
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- chore: use FQCN for module name
|
- chore: use FQCN for module name
|
||||||
|
|
|
@ -29,6 +29,8 @@ Install and configure Grafana
|
||||||
- name: grafana-piechart-panel
|
- name: grafana-piechart-panel
|
||||||
version: 1.3.6
|
version: 1.3.6
|
||||||
state: present
|
state: present
|
||||||
|
- name: sensu-sensugo-datasource
|
||||||
|
url: https://github.com/sensu/grafana-sensu-go-datasource/releases/download/1.0.2/sensu-sensugo-datasource-1.0.2.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
|
- gpg
|
||||||
|
- unzip
|
||||||
retries: 2
|
retries: 2
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
|
@ -50,12 +52,26 @@
|
||||||
notify: restart grafana
|
notify: restart grafana
|
||||||
tags: grafana
|
tags: grafana
|
||||||
|
|
||||||
- name: install plugins
|
- name: install official plugins
|
||||||
grafana_plugin:
|
community.grafana.grafana_plugin:
|
||||||
name: '{{ item.name }}'
|
name: '{{ item.name }}'
|
||||||
version: '{{ item.version|default("latest") }}'
|
version: '{{ item.version|default("latest") }}'
|
||||||
state: '{{ item.state|default("present") }}'
|
state: '{{ item.state|default("present") }}'
|
||||||
loop: '{{ grafana_plugins }}'
|
loop: '{{ grafana_plugins|selectattr("url", "undefined") }}'
|
||||||
|
loop_control:
|
||||||
|
label: '{{ item.name }}'
|
||||||
|
notify: restart grafana
|
||||||
|
tags: grafana
|
||||||
|
|
||||||
|
- name: install unofficial plugins
|
||||||
|
community.grafana.grafana_plugin:
|
||||||
|
name: '{{ item.name }}'
|
||||||
|
grafana_plugin_url: '{{ item.url }}'
|
||||||
|
version: '{{ item.version|default("latest") }}'
|
||||||
|
state: '{{ item.state|default("present") }}'
|
||||||
|
loop: '{{ grafana_plugins|selectattr("url", "defined") }}'
|
||||||
|
loop_control:
|
||||||
|
label: '{{ item.name }}'
|
||||||
notify: restart grafana
|
notify: restart grafana
|
||||||
tags: grafana
|
tags: grafana
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue