Allow the installation of Grafana plugins
Change-Id: I6eab0435fb169ed12c880af01ba1e76a06268825
This commit is contained in:
parent
308f9e4f0e
commit
22c462b504
2 changed files with 23 additions and 0 deletions
12
README.rst
12
README.rst
|
@ -155,6 +155,18 @@ Server with theme overrides
|
|||
css_override:
|
||||
source: salt://path.to.theme
|
||||
|
||||
Server with two additionals plugins. It requires to have access to the Internet.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
grafana:
|
||||
server:
|
||||
enabled: true
|
||||
plugins:
|
||||
grafana-piechart-panel:
|
||||
enabled: true
|
||||
grafana-example-app:
|
||||
enabled: true
|
||||
|
||||
Collector setup
|
||||
---------------
|
||||
|
|
|
@ -79,4 +79,15 @@ grafana_service:
|
|||
- watch:
|
||||
- file: /etc/grafana/grafana.ini
|
||||
|
||||
{%- for plugin_name, plugin in server.get('plugins', {}).iteritems() %}
|
||||
{%- if plugin.get('enabled', False) %}
|
||||
install_{{ plugin_name }}:
|
||||
cmd.run:
|
||||
- name: grafana-cli plugins install {{ plugin_name }}
|
||||
- unless: grafana-cli plugins list-versions {{ plugin_name }}
|
||||
- watch_in:
|
||||
- service: grafana_service
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in a new issue