Skip to content

Commit

Permalink
[FIX] remove hardcoded version values
Browse files Browse the repository at this point in the history
  The version of the node exporter is controlled using a variable - node_exporter_version
  unfortunatelly some of the tasks were not using the variable but instead having
  hardcoded version strings.

  This commit removes the hardcoded version strings to ensure changing the version using the variable
  works as expected
  • Loading branch information
Svetlin Kalendzhiev committed Jan 27, 2021
1 parent 7a57b75 commit 0592af6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- name: "Move node-exporter to the /usr/local/bin/node-exporter"
copy:
remote_src: true
src: "/tmp/node_exporter-0.14.0.linux-{{ node_exporter_arch }}/node_exporter"
src: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ node_exporter_arch }}/node_exporter"
dest: "/usr/local/bin/node_exporter"
owner: "root"
group: "root"
Expand All @@ -39,6 +39,6 @@
state: "absent"
with_items:
- "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ node_exporter_arch }}.tar.gz"
- "/tmp/node_exporter-0.14.0.linux-{{ node_exporter_arch }}/"
- "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ node_exporter_arch }}/"
when: bin.stat.exists == False or
bin.stat.checksum != node_exporter_checksum_binary

0 comments on commit 0592af6

Please sign in to comment.