27 lines
762 B
YAML
27 lines
762 B
YAML
- name: Install apcupsd
|
|
apt:
|
|
name: apcupsd
|
|
|
|
- name: download apcupsd_exporter
|
|
get_url:
|
|
url: https://git.janky.solutions/api/packages/JankySolutions/generic/infra-apcupsd_exporter/4c09b127c353cd57e6bc369f510fe516a0f65c0d/apcupsd_exporter
|
|
checksum: sha256:b17cc67d8ea9c6f1494b581a57a2315e33abf6dfb8edf2e1c14a50a0fb85e768
|
|
dest: /usr/local/bin/apcupsd_exporter
|
|
mode: "0755"
|
|
notify:
|
|
- restart apcupsd_exporter
|
|
|
|
- name: install apcupsd_exporter service
|
|
template:
|
|
src: apcupsd_exporter.service
|
|
dest: /etc/systemd/system/apcupsd_exporter.service
|
|
notify:
|
|
- systemctl daemon-reload
|
|
- restart apcupsd_exporter
|
|
|
|
- meta: flush_handlers
|
|
|
|
- name: enable apcupsd_exporter
|
|
service:
|
|
name: apcupsd_exporter
|
|
enabled: true
|