Added naruto

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
TuDatTr
2023-07-12 00:02:17 +02:00
parent c2b68f7f64
commit ef207c5d64
20 changed files with 282 additions and 167 deletions

View File

@@ -2,7 +2,7 @@
- name: Determine latest GitHub release (local)
delegate_to: localhost
uri:
url: "https://api.github.com/repos/prometheus/node_exporter/releases/{{ node_exporter_version }}"
url: "https://api.github.com/repos/prometheus/node_exporter/releases/{{ node_exporter.version }}"
body_format: json
register: _github_release
until: _github_release.status == 200
@@ -13,6 +13,6 @@
node_exporter_version: "{{ _github_release.json.tag_name
| regex_replace('^v?([0-9\\.]+)$', '\\1') }}"
- name: Set node_exporter_download_url
- name: Set node_exporter.download_url
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"

View File

@@ -9,7 +9,7 @@
- name: Move node_exporter into path
copy:
src: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter"
dest: "{{ node_exporter_bin_path }}"
dest: "{{ node_exporter.bin_path }}"
mode: 755
remote_src: true
become: true

View File

@@ -4,7 +4,7 @@ Description=NodeExporter
[Service]
TimeoutStartSec=0
User=node_exporter
ExecStart={{ node_exporter_bin_path }} --web.listen-address={{ host.ip }}:{{ node_exporter_port }} {{ node_exporter_options }}
ExecStart={{ node_exporter.bin_path }} --web.listen-address={{ host.ip }}:{{ node_exporter.port }} {{ node_exporter.options }}
[Install]
WantedBy=multi-user.target