2024-08-06 13:57:53 +00:00
|
|
|
---
|
2024-10-18 11:07:34 +00:00
|
|
|
- name: Common preflight
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: prometheus.prometheus._common
|
|
|
|
tasks_from: preflight.yml
|
2024-10-29 13:01:58 +00:00
|
|
|
vars:
|
|
|
|
_common_web_listen_address: "{{ influxdb_exporter_web_listen_address }}"
|
|
|
|
|
2024-10-18 13:12:07 +00:00
|
|
|
tags:
|
|
|
|
- influxdb_exporter
|
|
|
|
- preflight
|
|
|
|
- influxdb_exporter_preflight
|
2024-10-18 11:07:34 +00:00
|
|
|
|
2024-08-06 13:57:53 +00:00
|
|
|
- name: Assert usage of systemd as an init system
|
|
|
|
ansible.builtin.assert:
|
|
|
|
that: ansible_service_mgr == 'systemd'
|
|
|
|
msg: "This role only works with systemd"
|
2024-10-18 13:12:07 +00:00
|
|
|
tags:
|
|
|
|
- influxdb_exporter
|
|
|
|
- preflight
|
|
|
|
- influxdb_exporter_preflight
|
2024-08-06 13:57:53 +00:00
|
|
|
|
|
|
|
- name: Discover latest version
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
influxdb_exporter_version: "{{ (lookup('url', 'https://api.github.com/repos/{{ _influxdb_exporter_repo }}/releases/latest', headers=_influxdb_exporter_github_api_headers,
|
|
|
|
split_lines=False) | from_json).get('tag_name') | replace('v', '') }}"
|
|
|
|
run_once: true
|
|
|
|
until: influxdb_exporter_version is version('0.0.0', '>=')
|
|
|
|
retries: 10
|
|
|
|
when:
|
|
|
|
- influxdb_exporter_version == "latest"
|
2024-10-18 13:12:07 +00:00
|
|
|
tags:
|
|
|
|
- influxdb_exporter
|
|
|
|
- install
|
|
|
|
- influxdb_exporter_install
|
|
|
|
- download
|
|
|
|
- influxdb_exporter_download
|