paulbsd-salt/states/dkron/install.sls

41 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
---
{%- from "dkron/map.jinja" import dkron with context %}
dkron-user:
user.present:
- name: {{ dkron.runuser }}
2023-02-10 13:54:20 +01:00
- shell: /bin/nologin
2020-07-10 00:58:55 +02:00
dkron-archive-extract:
archive.extracted:
2021-11-14 13:35:52 +01:00
- name: {{ dkron.release_dir }}/dkron-{{ dkron.version }}
2020-07-10 00:58:55 +02:00
- source: {{ dkron.mirror }}/v{{ dkron.version }}/dkron_{{ dkron.version }}_{{ dkron.os }}_{{ dkron.arch }}.tar.gz
- user: {{ dkron.runuser }}
2020-09-12 17:41:35 +02:00
- enforce_toplevel: false
- skip_verify: true
2020-07-10 00:58:55 +02:00
- archive_format: tar
2021-11-14 13:35:52 +01:00
- if_missing: {{ dkron.release_dir }}/dkron-{{ dkron.version }}
2021-01-24 19:02:28 +01:00
- watch_in:
- service: dkron-service
2020-07-10 00:58:55 +02:00
dkron-bin-symlink:
file.symlink:
- name: {{ dkron.install_dir }}/dkron
2021-11-14 13:35:52 +01:00
- target: {{ dkron.release_dir }}/dkron-{{ dkron.version }}
2020-07-10 00:58:55 +02:00
- user: {{ dkron.runuser }}
- force: true
2020-07-10 00:58:55 +02:00
- watch_in:
- service: dkron-service
dkron-data-dir:
file.directory:
- name: {{ dkron.config.get('data-dir') }}
- user: {{ dkron.runuser }}
- watch_in:
2021-11-14 13:35:52 +01:00
- service: dkron-service
dkron-cleanup:
software.cleanup:
- name: dkron
- path: {{ dkron.release_dir }}
2021-12-29 15:45:48 +01:00
- version: "{{ dkron.version }}"