paulbsd-salt/states/lego/install.sls

20 lines
784 B
Plaintext
Raw Normal View History

2020-10-01 23:06:47 +02:00
---
{%- from "lego/map.jinja" import lego with context %}
{%- if not salt['file.file_exists']( lego.install_dir +"/lego-" + lego.version) %}
lego-archive-extract:
archive.extracted:
- name: {{ lego.release_dir }}/lego-{{ lego.version }}-{{ lego.os }}-{{ lego.arch }}
- source: {{ lego.mirror }}/{{ lego.version }}/lego_{{ lego.version }}_{{ lego.os }}_{{ lego.arch }}.tar.gz
- skip_verify: true
- enforce_toplevel: false
- if_missing: {{ lego.release_dir }}/lego-{{ lego.version }}-{{ lego.os }}-{{ lego.arch }}
lego-binary-symlink:
file.symlink:
- name: /usr/local/bin/lego
- target: {{ lego.release_dir }}/lego-{{ lego.version }}-{{ lego.os }}-{{ lego.arch }}/lego
- force: true
- require:
- archive: lego-archive-extract
{%- endif %}