From 19125cda8816be3d934df7a2e9d3d9f4685dcff9 Mon Sep 17 00:00:00 2001 From: Kevin Coakley Date: Thu, 14 Feb 2019 09:20:34 -0800 Subject: [PATCH 1/3] Fixed ansible-lint issues [702] and [601] --- meta/main.yml | 3 ++- tasks/main.yml | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 3f1dacf..6733454 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -11,11 +11,12 @@ galaxy_info: - name: Ubuntu versions: - xenial + - bionic # # Below are all categories currently available. Just as with # the platforms above, uncomment those that apply to your role. # - categories: + galaxy_tags: - monitoring dependencies: [] # List your role dependencies here, one per line. diff --git a/tasks/main.yml b/tasks/main.yml index 05d417b..f847206 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,7 +11,7 @@ groups: "{{ prometheus_node_exporter_service_group }}" append: yes shell: /bin/bash - when: prometheus_node_exporter_manage_user == True + when: prometheus_node_exporter_manage_user # # Install Prometheus Node Exporter @@ -25,7 +25,7 @@ get_url: url: "{{ prometheus_node_exporter_download_url }}" dest: "/tmp/node_exporter-{{ prometheus_node_exporter_version }}.tar.gz" - when: prometheus_node_exporter_install_path.stat.exists == False + when: not prometheus_node_exporter_install_path.stat.exists - name: Extract Node Exporter into the install directory unarchive: @@ -34,7 +34,7 @@ copy: no owner: "{{ prometheus_node_exporter_service_username }}" group: "{{ prometheus_node_exporter_service_group }}" - when: prometheus_node_exporter_install_path.stat.exists == False + when: not prometheus_node_exporter_install_path.stat.exists - name: Create a symlink for /opt/node_exporter file: @@ -43,7 +43,7 @@ owner: "{{ prometheus_node_exporter_service_username }}" group: "{{ prometheus_node_exporter_service_group }}" state: link - when: prometheus_node_exporter_install_path.stat.exists == False + when: not prometheus_node_exporter_install_path.stat.exists - name: Copy the Node Exporter systemd service file template: From 2d415fd8f6307355b3ceb3c646c6fc56e7c7aef9 Mon Sep 17 00:00:00 2001 From: Kevin Coakley Date: Thu, 14 Feb 2019 09:21:17 -0800 Subject: [PATCH 2/3] Tested with Ubuntu 18.04 instead of 16.04 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 911b057..22ecea3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ansible-role-prometheus-node-exporter [![Build Status](https://travis-ci.org/kevincoakley/ansible-role-prometheus-node-exporter.svg?branch=master)](https://travis-ci.org/kevincoakley/ansible-role-prometheus-node-exporter) -Install Prometheus Node Exporter - https://github.com/prometheus/node_exporter . Tested with CentOS 7 and Ubuntu 16.04 +Install Prometheus Node Exporter - https://github.com/prometheus/node_exporter . Tested with CentOS 7 and Ubuntu 18.04 Use role release >= 0.15.0 on node_exporter versions >= 0.15.0. Use role release <= 0.14.0 on node_exporter versions <= 0.14.0 From 701aa6253d2b344ebe2d4842d4af50fbe2bfe073 Mon Sep 17 00:00:00 2001 From: Kevin Coakley Date: Thu, 14 Feb 2019 09:21:36 -0800 Subject: [PATCH 3/3] Set default version to 0.17.0 --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 7b1c529..812d03a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -prometheus_node_exporter_version: 0.16.0 +prometheus_node_exporter_version: 0.17.0 prometheus_node_exporter_download_url: https://github.com/prometheus/node_exporter/releases/download/v{{ prometheus_node_exporter_version }}/node_exporter-{{ prometheus_node_exporter_version }}.linux-amd64.tar.gz prometheus_node_exporter_manage_user: True prometheus_node_exporter_service_username: node-exp