1
0
Fork 0
mirror of synced 2024-10-15 08:29:02 -04:00
formula-grafana/server.sls
2014-02-25 09:40:21 +01:00

43 lines
792 B
Text

{%- if pillar.grafana.server.enabled %}
include:
- git
- nodejs
/srv/grafana:
file:
- directory
- mode: 755
- makedirs: true
{% if pillar.grafana.server.source.type == 'git' %}
grafana_repository:
git.latest:
- name: {{ pillar.grafana.server.source.address }}
- rev: {{ pillar.grafana.server.source.rev }}
- target: /srv/grafana/site
- require:
- file: /srv/grafana
- pkg: git_packages
grafana_install:
cmd.run:
- names:
- npm install
- npm install -g grunt-cli
- grunt build
- cwd: /srv/grafana/site
- unless: test -e /srv/grafana/site/node_modules
- require:
- git: grafana_repository
{% endif %}
/srv/grafana/site/src/config.js:
file:
- managed
- source: salt://grafana/conf/config.js
- template: jinja
{%- endif %}