2020-07-10 00:58:55 +02:00
|
|
|
---
|
|
|
|
{%- from "influxdb/map.jinja" import influxdb with context %}
|
|
|
|
influxdb-group:
|
|
|
|
group.present:
|
|
|
|
- name: influxdb
|
|
|
|
- gid: {{ influxdb.group.gid }}
|
|
|
|
- watch_in:
|
|
|
|
- service: influxdb-service
|
|
|
|
|
|
|
|
influxdb-user:
|
|
|
|
user.present:
|
|
|
|
- name: influxdb
|
|
|
|
- uid: {{ influxdb.user.uid }}
|
|
|
|
- gid: {{ influxdb.group.gid }}
|
2020-09-12 17:41:35 +02:00
|
|
|
- allow_uid_change: true
|
|
|
|
- allow_gid_change: true
|
2020-07-10 00:58:55 +02:00
|
|
|
- home: /var/lib/influxdb
|
|
|
|
- watch_in:
|
|
|
|
- service: influxdb-service
|
|
|
|
|
|
|
|
influxdb-archive-extract:
|
|
|
|
archive.extracted:
|
|
|
|
- name: {{ influxdb.release_dir }}/influxdb-{{ influxdb.version }}
|
|
|
|
- source: {{ influxdb.mirror }}/influxdb-{{ influxdb.version }}_{{ influxdb.os }}_{{ influxdb.arch }}.tar.gz
|
2020-09-12 17:41:35 +02:00
|
|
|
- skip_verify: true
|
2020-07-10 00:58:55 +02:00
|
|
|
- archive_format: tar
|
|
|
|
- options: --strip 4
|
2020-09-12 17:41:35 +02:00
|
|
|
- enforce_toplevel: false
|
2020-07-10 00:58:55 +02:00
|
|
|
- if_missing: {{ influxdb.release_dir }}/influxdb-{{ influxdb.version }}/influxd
|
|
|
|
- watch_in:
|
|
|
|
- service: influxdb-service
|
|
|
|
|
|
|
|
influxdb-bin-symlink:
|
|
|
|
file.symlink:
|
|
|
|
- name: {{ influxdb.install_dir }}/influxdb
|
|
|
|
- target: {{ influxdb.release_dir }}/influxdb-{{ influxdb.version }}
|
|
|
|
|
|
|
|
influxdb-data-dir:
|
|
|
|
file.directory:
|
|
|
|
- name: {{ influxdb.data_dir }}
|
|
|
|
- user: {{ influxdb.user.uid }}
|
|
|
|
- group: {{ influxdb.group.gid }}
|
|
|
|
- watch_in:
|
|
|
|
- service: influxdb-service
|
|
|
|
|
2022-07-27 23:49:30 +02:00
|
|
|
{%- for bin in influxdb.binaries %}
|
2020-07-10 00:58:55 +02:00
|
|
|
influxdb-{{ bin }}-symlink:
|
|
|
|
file.symlink:
|
|
|
|
- name: /usr/local/sbin/{{ bin }}
|
2021-01-24 19:01:47 +01:00
|
|
|
- target: {{ influxdb.install_dir }}/influxdb/{{ bin }}
|
2020-07-10 00:58:55 +02:00
|
|
|
{%- endfor %}
|
2021-12-29 15:45:48 +01:00
|
|
|
|
|
|
|
influxdb-cleanup:
|
|
|
|
software.cleanup:
|
|
|
|
- name: influxdb
|
|
|
|
- path: {{ influxdb.release_dir }}
|
|
|
|
- version: "{{ influxdb.version }}"
|