35 lines
721 B
YAML
35 lines
721 B
YAML
|
---
|
||
|
- 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
|
||
|
...
|