2023-05-11 15:09:52 +02:00
|
|
|
---
|
|
|
|
- name: Determine latest GitHub release (local)
|
|
|
|
delegate_to: localhost
|
|
|
|
uri:
|
2023-07-12 00:02:17 +02:00
|
|
|
url: "https://api.github.com/repos/prometheus/node_exporter/releases/{{ node_exporter.version }}"
|
2023-05-11 15:09:52 +02:00
|
|
|
body_format: json
|
|
|
|
register: _github_release
|
|
|
|
until: _github_release.status == 200
|
|
|
|
retries: 3
|
|
|
|
|
|
|
|
- name: Set node_exporter_version
|
|
|
|
set_fact:
|
|
|
|
node_exporter_version: "{{ _github_release.json.tag_name
|
|
|
|
| regex_replace('^v?([0-9\\.]+)$', '\\1') }}"
|
|
|
|
|
2023-07-12 00:02:17 +02:00
|
|
|
- name: Set node_exporter.download_url
|
2023-05-11 15:09:52 +02:00
|
|
|
set_fact:
|
|
|
|
node_exporter_download_url: "https://github.com/prometheus/node_exporter/releases/download/v{{ node_exporter_version }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|