diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2024-09-29 23:33:59 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2024-09-29 23:33:59 +0200 |
commit | f4e65d26183b1133d919c415fec349f52fb4385f (patch) | |
tree | feef3f368bf27d080108c998f1085cedae6bfdf2 /ansible/roles/prometheus-node-exporter | |
parent | 0d13a5b4a2392200e78c8e15aa59044ec18eea16 (diff) | |
download | infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.gz infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.bz2 infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.xz infra-f4e65d26183b1133d919c415fec349f52fb4385f.zip |
lhn2pi
Diffstat (limited to 'ansible/roles/prometheus-node-exporter')
-rw-r--r-- | ansible/roles/prometheus-node-exporter/handlers/main.yml | 5 | ||||
-rw-r--r-- | ansible/roles/prometheus-node-exporter/tasks/main.yml | 18 |
2 files changed, 23 insertions, 0 deletions
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 |