Added direct extraction support for prometheus exporters
This commit is contained in:
parent
f945e6091b
commit
bbd428bb7f
1 changed files with 23 additions and 0 deletions
|
@ -5,6 +5,29 @@
|
|||
{{ exporter }}_exporter_packages:
|
||||
pkg.installed:
|
||||
- names: {{ parameters.packages }}
|
||||
{%- else %}
|
||||
{{ exporter }}-exporter-bin-dir:
|
||||
file.directory:
|
||||
- name: /opt/prometheus/{{ exporter }}/bin
|
||||
- makedirs: True
|
||||
|
||||
{#
|
||||
{{ exporter }}-exporter-download:
|
||||
file.managed:
|
||||
- name: /tmp/prometheus_{{ exporter }}_{{ grains.osarch }}.tar.gz
|
||||
- source: {{ parameters.url }}
|
||||
- source_hash: {{ parameters.url_hash }}
|
||||
- unless: test -f /opt/prometheus/{{ exporter }}/bin/{{ parameters.check }}
|
||||
#}
|
||||
|
||||
{{ exporter }}-exporter-extract:
|
||||
archive.extracted:
|
||||
- name: /opt/prometheus/{{ exporter }}/bin
|
||||
- source: {{ parameters.url }}
|
||||
- source_hash: {{ parameters.url_hash }}
|
||||
- user: root
|
||||
- group: root
|
||||
- if_missing: /opt/prometheus/{{ exporter }}/bin/{{ parameters.check }}
|
||||
{%- endif %}
|
||||
|
||||
{{ exporter }}_exporter_service:
|
||||
|
|
Loading…
Reference in a new issue