Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
Update: node_exporter version check
Browse files Browse the repository at this point in the history
 - gather remote version
 - skip/avoid install when we are already up to date
  • Loading branch information
till committed Feb 22, 2019
1 parent bdde90a commit 6215b81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
- node_exporter_configure
- node_exporter_run

- command: "/usr/local/bin/node_exporter --version &>/dev/stdout|grep 'version {{ node_exporter_version}}'|awk '{print $3}'"
register: node_exporter_current_version

- import_tasks: install.yml
become: true
when: node_exporter_current_version != node_exporter_version
tags:
- node_exporter_install

Expand Down

0 comments on commit 6215b81

Please sign in to comment.