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-bird-exporter/handlers/main.yml | 5 +++++ ansible/roles/prometheus-bird-exporter/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ansible/roles/prometheus-bird-exporter/handlers/main.yml create mode 100644 ansible/roles/prometheus-bird-exporter/tasks/main.yml (limited to 'ansible/roles/prometheus-bird-exporter') 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 -- cgit v1.2.3