paulbsd-salt/states/dkron/install.sls
2020-07-10 00:58:55 +02:00

30 lines
907 B
Plaintext

---
{%- from "dkron/map.jinja" import dkron with context %}
dkron-user:
user.present:
- name: {{ dkron.runuser }}
dkron-archive-extract:
archive.extracted:
- name: {{ dkron.release_dir }}/dkron_{{ dkron.version }}
- source: {{ dkron.mirror }}/v{{ dkron.version }}/dkron_{{ dkron.version }}_{{ dkron.os }}_{{ dkron.arch }}.tar.gz
- user: {{ dkron.runuser }}
- enforce_toplevel: False
- skip_verify: True
- archive_format: tar
- if_missing: {{ dkron.release_dir }}/dkron_{{ dkron.version }}
dkron-bin-symlink:
file.symlink:
- name: {{ dkron.install_dir }}/dkron
- target: {{ dkron.release_dir }}/dkron_{{ dkron.version }}
- user: {{ dkron.runuser }}
- watch_in:
- service: dkron-service
dkron-data-dir:
file.directory:
- name: {{ dkron.config.get('data-dir') }}
- user: {{ dkron.runuser }}
- watch_in:
- service: dkron-service