Adjusted requires to follow packages or extracted methods

This commit is contained in:
Eric Renfro 2019-05-07 17:21:45 -04:00
parent 4534135a52
commit 4b31e677ca
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -20,7 +20,7 @@
- unless: test -f /opt/prometheus/{{ exporter }}/bin/{{ parameters.check }}
#}
{{ exporter }}-exporter-extract:
{{ exporter }}_exporter_extracted:
archive.extracted:
- name: /opt/prometheus/{{ exporter }}/bin
- source: {{ parameters.url }}
@ -60,7 +60,11 @@
- group: root
- mode: 644
- require:
{%- if parameters.get('packages', False) %}
- pkg: {{ exporter }}_exporter_packages
{%- else %}
- archive: {{ exporter }}_exporter_extracted
{%- endif %}
- watch_in:
- service: {{ exporter }}_exporter_service
{%- endif %}