From e422b5be8703fa853d0df1c15275de66c21b0141 Mon Sep 17 00:00:00 2001 From: till Date: Fri, 22 Feb 2019 17:24:04 +0100 Subject: [PATCH] Fix: linter --- tasks/install.yml | 4 ++-- tasks/main.yml | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 7ac205c3..ff9fd3f0 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -31,7 +31,7 @@ until: _download_binary is succeeded retries: 5 delay: 2 - delegate_to: "{{ node_exporter_delegation | default(inventory_hostname) }}" + delegate_to: "{{ node_exporter_delegation | default(inventory_hostname) }}" check_mode: false - name: Unpack node_exporter binary @@ -40,7 +40,7 @@ src: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz" dest: "/tmp" creates: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter" - delegate_to: "{{ node_exporter_delegation | default(inventory_hostname) }}" + delegate_to: "{{ node_exporter_delegation | default(inventory_hostname) }}" check_mode: false - name: Create /usr/local/bin diff --git a/tasks/main.yml b/tasks/main.yml index 57399547..22bfaf47 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,7 +16,10 @@ - node_exporter_configure - node_exporter_run -- command: "/usr/local/bin/node_exporter --version &>/dev/stdout|grep 'version {{ node_exporter_version}}'|awk '{print $3}'" +- name: Gather currently installed node_exporter version (if any) + command: "/usr/local/bin/node_exporter --version &>/dev/stdout|grep 'version {{ node_exporter_version }}'|awk '{print $3}'" + args: + warn: no register: node_exporter_current_version - import_tasks: install.yml