paulbsd-salt/states/grafana/archive/install.sls

52 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import grafana with context %}
{%- from tplroot ~ "/jinja/macros.jinja" import format_kwargs with context %}
{%- if grafana.pkg.use_upstream_archive %}
grafana-group:
user.present:
- name: {{ grafana.service.group }}
- system: True
grafana-user:
user.present:
- name: {{ grafana.service.user }}
- system: True
- groups:
- {{ grafana.service.group }}
grafana-package-archive-install-file-directory:
file.directory:
- name: {{ grafana.pkg.archive.name }}
2021-09-25 16:12:02 +02:00
- user: {{ grafana.service.user }}
- group: {{ grafana.service.group }}
2020-07-10 00:58:55 +02:00
- mode: 755
- makedirs: True
- require_in:
- archive: grafana-package-archive-install-archive-extracted
- recurse:
- user
- group
- mode
grafana-package-archive-install-archive-extracted:
archive.extracted:
{{- format_kwargs(grafana.pkg.archive) }}
- retry:
attempts: 3
until: True
interval: 60
splay: 10
2021-09-25 16:12:02 +02:00
- user: {{ grafana.service.user }}
- group: {{ grafana.service.group }}
2020-07-10 00:58:55 +02:00
- recurse:
- user
- group
{%- endif %}