ansible/roles/prometheus_keepalived/tasks/main.yml

35 lines
721 B
YAML
Raw Normal View History

2023-04-04 01:27:26 +02:00
---
- name: Install dependencies
apt:
name:
- python3-prometheus-client
- python3-dbus-next
- name: Install prometheus-keepalived
copy:
src: prometheus-keepalived
dest: /usr/local/bin/prometheus-keepalived
mode: u=rwx,g=rx,o=rx
owner: root
group: root
- name: Configure prometheus-keepalived timer
template:
src: "{{ item }}.j2"
dest: "/etc/systemd/system/{{ item }}"
mode: u=rw,g=r,o=r
owner: root
group: root
loop:
- prometheus-keepalived.service
- prometheus-keepalived.timer
notify:
- Run daemon-reload
- name: Enable prometheus-keepalived timer
systemd:
name: prometheus-keepalived.timer
enabled: true
state: started
...