paulbsd-salt/states/vector/install.sls
Paul 00fea3d79d
All checks were successful
continuous-integration/drone/push Build is passing
updated vector state
2024-11-30 18:59:15 +01:00

42 lines
1.2 KiB
Plaintext

---
{%- from "vector/map.jinja" import vector with context %}
vector-group:
group.present:
- name: {{ vector.group.name }}
- gid: {{ vector.group.id }}
vector-user:
user.present:
- name: {{ vector.user.name }}
- uid: {{ vector.user.id }}
- gid: {{ vector.group.id }}
- shell: /bin/nologin
vector-archive-extract:
archive.extracted:
- name: {{ vector.release_dir }}/vector-{{ vector.version }}
- source: {{ vector.mirror }}/v{{ vector.version }}/vector-{{ vector.version }}-{{ vector.arch }}-unknown-{{ vector.os }}-{{ vector.variant }}.tar.gz
- skip_verify: true
- enforce_toplevel: false
- options: >
--strip 2
- if_missing: {{ vector.release_dir }}/vector-{{ vector.version }}/bin/vector
- watch_in:
- service: vector-service
vector-binary-symlink:
file.symlink:
- name: /usr/local/bin/vector
- target: {{ vector.release_dir }}/vector-{{ vector.version }}/bin/vector
- force: true
- require:
- archive: vector-archive-extract
- watch_in:
- service: vector-service
vector-cleanup:
software.cleanup:
- name: vector
- path: {{ vector.release_dir }}
- version: "{{ vector.version }}"