paulbsd-salt/states/qrz/install.sls
Paul 2fd7a06640
All checks were successful
continuous-integration/drone/push Build is passing
updated qrz state
2024-09-06 17:19:41 +02:00

55 lines
1.3 KiB
Plaintext

---
{%- from "qrz/map.jinja" import qrz with context %}
qrz-archive-extract:
archive.extracted:
- name: {{ qrz.release_dir }}/qrz-{{ qrz.version }}
- source: {{ qrz.mirror }}/{{ qrz.version }}/qrz-{{ qrz.version }}-{{ qrz.os }}-{{ qrz.arch }}.tar.gz
- skip_verify: true
- enforce_toplevel: false
- if_missing: {{ qrz.release_dir }}/qrz-{{ qrz.version }}
- watch_in:
- service: qrz-service
qrz-binary-symlink:
file.symlink:
- name: {{ qrz.install_dir }}/qrz
- target: {{ qrz.release_dir }}/qrz-{{ qrz.version }}
- force: true
- require:
- archive: qrz-archive-extract
- watch_in:
- service: qrz-service
qrz-group:
group.present:
- name: {{ qrz.group.name }}
- gid: {{ qrz.group.gid }}
- watch_in:
- service: qrz-service
qrz-user:
user.present:
- name:{{ qrz.user.name }}
- uid: {{ qrz.user.uid }}
- gid: {{ qrz.group.gid }}
- shell: /sbin/nologin
- allow_uid_change: true
- allow_gid_change: true
- home: /var/lib/qrz
- watch_in:
- service: qrz-service
qrz-directory:
file.directory:
- name: /var/lib/qrz
- user: {{ qrz.user.name }}
- group: {{ qrz.group.name }}
- watch_in:
- service: qrz-service
qrz-cleanup:
software.cleanup:
- name: qrz
- path: {{ qrz.release_dir }}
- version: "{{ qrz.version }}"