paulbsd-salt/states/syncthing/install.sls
Paul Lecuq 1a38f6afa5
All checks were successful
continuous-integration/drone/push Build is passing
fix in deployment process for some soft
2023-06-23 08:57:12 +02:00

28 lines
1.0 KiB
Plaintext

---
{%- from "syncthing/map.jinja" import syncthing with context %}
syncthing-archive-extract:
archive.extracted:
- name: {{ syncthing.release_dir }}/syncthing-{{ syncthing.version }}
- source: {{ syncthing.mirror }}/v{{ syncthing.version }}/syncthing-{{ syncthing.os }}-{{ syncthing.arch }}-v{{ syncthing.version }}.tar.gz
- enforce_toplevel: false
- skip_verify: true
- archive_format: tar
- options: --transform 's/syncthing-{{ syncthing.os }}-{{ syncthing.arch }}-v{{ syncthing.version }}/syncthing-{{ syncthing.version }}/g' --strip 1
- if_missing: {{ syncthing.release_dir }}/syncthing-{{ syncthing.version }}
- watch_in:
- service: syncthing-service
syncthing-bin-symlink:
file.symlink:
- name: {{ syncthing.install_dir }}/syncthing
- target: {{ syncthing.release_dir }}/syncthing-{{ syncthing.version }}
- force: true
- watch_in:
- service: syncthing-service
syncthing-cleanup:
software.cleanup:
- name: syncthing
- path: {{ syncthing.release_dir }}
- version: "{{ syncthing.version }}"