From 6065471faac26db8c55c6df51b65ff40e1508371 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Wed, 5 Jul 2023 21:55:26 +0200 Subject: [PATCH] Add node_explorer to laptop --- inventory/hosts.yml | 2 ++ main.yml | 6 +++++- roles/node_explorer/tasks/install.yml | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/inventory/hosts.yml b/inventory/hosts.yml index 8dd7cee..f4fb439 100644 --- a/inventory/hosts.yml +++ b/inventory/hosts.yml @@ -10,6 +10,8 @@ all: ansible_host: 192.168.50.3 home-assistant: ansible_host: 192.168.60.100 + laptop.lan: + ansible_host: 192.168.50.29 prusa: ansible_host: 192.168.50.6 node-01.lan: diff --git a/main.yml b/main.yml index 34b8ee0..ead3995 100644 --- a/main.yml +++ b/main.yml @@ -34,4 +34,8 @@ - hosts: node-01.lan roles: - - network \ No newline at end of file + - network + +- hosts: laptop.lan + roles: + - node_explorer \ No newline at end of file diff --git a/roles/node_explorer/tasks/install.yml b/roles/node_explorer/tasks/install.yml index f091c0c..0d6d335 100644 --- a/roles/node_explorer/tasks/install.yml +++ b/roles/node_explorer/tasks/install.yml @@ -12,6 +12,14 @@ remote_src: yes mode: 0755 +- name: Download node-explorer + when: ansible_architecture == "x86_64" + unarchive: + src: https://github.com/prometheus/node_exporter/releases/download/v{{version}}/node_exporter-{{version}}.linux-amd64.tar.gz + dest: /tmp/node_exporter + remote_src: yes + mode: 0755 + - name: Download node-explorer when: ansible_architecture == "armv7l" unarchive: