From f4e65d26183b1133d919c415fec349f52fb4385f Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 29 Sep 2024 23:33:59 +0200 Subject: lhn2pi --- .../roles/prometheus-node-exporter/handlers/main.yml | 5 +++++ ansible/roles/prometheus-node-exporter/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ansible/roles/prometheus-node-exporter/handlers/main.yml create mode 100644 ansible/roles/prometheus-node-exporter/tasks/main.yml (limited to 'ansible/roles/prometheus-node-exporter') diff --git a/ansible/roles/prometheus-node-exporter/handlers/main.yml b/ansible/roles/prometheus-node-exporter/handlers/main.yml new file mode 100644 index 0000000..f4f9381 --- /dev/null +++ b/ansible/roles/prometheus-node-exporter/handlers/main.yml @@ -0,0 +1,5 @@ +- name: restart + become: yes + systemd: + name: prometheus-bird-exporter + state: restarted diff --git a/ansible/roles/prometheus-node-exporter/tasks/main.yml b/ansible/roles/prometheus-node-exporter/tasks/main.yml new file mode 100644 index 0000000..e7c6d18 --- /dev/null +++ b/ansible/roles/prometheus-node-exporter/tasks/main.yml @@ -0,0 +1,18 @@ +- become: yes + package: + name: "{{ items }}" + state: present + vars: + items: + - prometheus-node-exporter +- name: /etc/default/prometheus-node-exporter + become: yes + copy: + dest: /etc/default/prometheus-node-exporter + content: | + # Set the command-line arguments to pass to the server. + # Due to shell escaping, to pass backslashes for regexes, you need to double + # them (\\d for \d). If running under systemd, you need to double them again + # (\\\\d to mean \d), and escape newlines too. + ARGS="" + notify: restart -- cgit v1.2.3