This repository was archived by the owner on Mar 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 24
24
- name : Download node_exporter binary to local folder
25
25
become : false
26
26
get_url :
27
- url : " https://github.com/prometheus/node_exporter/releases/download/v{{ node_exporter_version }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.tar.gz"
28
- dest : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.tar.gz"
27
+ url : " https://github.com/prometheus/node_exporter/releases/download/v{{ node_exporter_version }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
28
+ dest : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
29
29
checksum : " sha256:{{ node_exporter_checksum }}"
30
30
register : _download_binary
31
31
until : _download_binary is succeeded
37
37
- name : Unpack node_exporter binary
38
38
become : false
39
39
unarchive :
40
- src : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.tar.gz"
40
+ src : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
41
41
dest : " /tmp"
42
- creates : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}/node_exporter"
42
+ creates : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter"
43
43
delegate_to : localhost
44
44
check_mode : false
45
45
51
51
52
52
- name : Propagate node_exporter binaries
53
53
copy :
54
- src : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}/node_exporter"
54
+ src : " /tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter"
55
55
dest : " /usr/local/bin/node_exporter"
56
56
mode : 0750
57
57
owner : " {{ node_exporter_system_user }}"
Original file line number Diff line number Diff line change 20
20
_checksums : " {{ lookup('url', 'https://github.com/prometheus/node_exporter/releases/download/v' + node_exporter_version + '/sha256sums.txt', wantlist=True) | list }}"
21
21
run_once : true
22
22
23
- - name : " Get checksum for {{ go_arch_map[ansible_architecture] | default(ansible_architecture) }} architecture"
23
+ - name : " Get checksum for {{ go_arch }} architecture"
24
24
set_fact :
25
25
node_exporter_checksum : " {{ item.split(' ')[0] }}"
26
26
with_items : " {{ _checksums }}"
27
- when : " ('linux-' + (go_arch_map[ansible_architecture] | default(ansible_architecture)) + '.tar.gz') in item"
27
+ when : " ('linux-' + go_arch + '.tar.gz') in item"
Original file line number Diff line number Diff line change @@ -6,5 +6,7 @@ go_arch_map:
6
6
armv7l : ' armv7'
7
7
armv6l : ' armv6'
8
8
9
+ go_arch : " {{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
10
+
9
11
node_exporter_system_group : " node-exp"
10
12
node_exporter_system_user : " {{ node_exporter_system_group }}"
You can’t perform that action at this time.
0 commit comments