Bootstrap grafana.plugin role

This commit is contained in:
Wilfried OLLIVIER 2019-07-10 17:12:12 +02:00
commit 733967175f
8 changed files with 92 additions and 0 deletions

13
LICENCE Normal file
View File

@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2019 Wilfried OLLIVIER <wollivier@fdn.fr>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

33
README.md Normal file
View File

@ -0,0 +1,33 @@
galaxy-grafana.ds.influx
========================
Add an InfluxDB datasource to Grafana
Requirements
------------
An InfluxDB service up and running
Role Variables
--------------
Dependencies
------------
None
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- role: galaxy-grafana
Run tests
---------
Ensure galaxy-vagrant is up
ansible-playbook -i tests/inventory tests/test.yml

4
defaults/main.yml Normal file
View File

@ -0,0 +1,4 @@
---
plugin_name: raintank-worldping-app
plugin_version: latest

6
handlers/main.yml Normal file
View File

@ -0,0 +1,6 @@
---
- name: restart grafana
systemd:
name: grafana-server
state: restarted

21
meta/main.yml Normal file
View File

@ -0,0 +1,21 @@
galaxy_info:
author: Wilfried OLLIVIER
description: Galaxy role to add plugin to a Grafana instance
company: none
license: WTFPL
min_ansible_version: 2.4
platforms:
- name: Debian
versions:
- Stretch
- Buster
galaxy_tags:
- grafana
- plugins
- debian
dependencies: []

9
tasks/main.yml Normal file
View File

@ -0,0 +1,9 @@
---
# Needs restart to be found in plugins menu
- name: Add Grafana plugin
grafana_plugin:
name: "{{ plugin_name }}"
version: "{{ plugin_version }}"
state: present
notify: restart grafana

1
tests/inventory Normal file
View File

@ -0,0 +1 @@
galaxy-vagrant.example.com

5
tests/test.yml Normal file
View File

@ -0,0 +1,5 @@
---
- hosts: galaxy-vagrant.example.com
remote_user: root
roles:
- role: ../galaxy-grafana.plugin