aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/prometheus-bird-exporter
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-09-29 23:33:59 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2024-09-29 23:33:59 +0200
commitf4e65d26183b1133d919c415fec349f52fb4385f (patch)
treefeef3f368bf27d080108c998f1085cedae6bfdf2 /ansible/roles/prometheus-bird-exporter
parent0d13a5b4a2392200e78c8e15aa59044ec18eea16 (diff)
downloadinfra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.gz
infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.bz2
infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.xz
infra-f4e65d26183b1133d919c415fec349f52fb4385f.zip
lhn2pi
Diffstat (limited to 'ansible/roles/prometheus-bird-exporter')
-rw-r--r--ansible/roles/prometheus-bird-exporter/handlers/main.yml5
-rw-r--r--ansible/roles/prometheus-bird-exporter/tasks/main.yml18
2 files changed, 23 insertions, 0 deletions
diff --git a/ansible/roles/prometheus-bird-exporter/handlers/main.yml b/ansible/roles/prometheus-bird-exporter/handlers/main.yml
new file mode 100644
index 0000000..f4f9381
--- /dev/null
+++ b/ansible/roles/prometheus-bird-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-bird-exporter/tasks/main.yml b/ansible/roles/prometheus-bird-exporter/tasks/main.yml
new file mode 100644
index 0000000..6d8b999
--- /dev/null
+++ b/ansible/roles/prometheus-bird-exporter/tasks/main.yml
@@ -0,0 +1,18 @@
+- become: yes
+ package:
+ name: "{{ items }}"
+ state: present
+ vars:
+ items:
+ - prometheus-bird-exporter
+- name: /etc/default/prometheus-bird-exporter
+ become: yes
+ copy:
+ dest: /etc/default/prometheus-bird-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="-bird.v2 -format.new"
+ notify: restart