Added smartctl_exporter for aya01 and fix for grafana
Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
18
roles/smart_exporter/tasks/get_version.yml
Normal file
18
roles/smart_exporter/tasks/get_version.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Determine latest GitHub release (local)
|
||||
delegate_to: localhost
|
||||
uri:
|
||||
url: "https://api.github.com/repos/prometheus-community/smartctl_exporter/releases/{{ smart_exporter.version }}"
|
||||
body_format: json
|
||||
register: _github_release
|
||||
until: _github_release.status == 200
|
||||
retries: 3
|
||||
|
||||
- name: Set smart_exporter_version
|
||||
set_fact:
|
||||
smart_exporter_version: "{{ _github_release.json.tag_name
|
||||
| regex_replace('^v?([0-9\\.]+)$', '\\1') }}"
|
||||
|
||||
- name: Set smart_exporter_download_url
|
||||
set_fact:
|
||||
smart_exporter_download_url: "https://github.com/prometheus-community/smartctl_exporter/releases/download/v{{ smart_exporter_version }}/smartctl_exporter-{{ smart_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
Reference in New Issue
Block a user