nut: Add playbook for NUT

NUT runs on *serial0.pyrocufflink.blue* and monitors the two UPSes on
the server rack.
This commit is contained in:
2021-10-31 14:28:27 -05:00
parent ff7c58ae71
commit c882ac45e7
4 changed files with 48 additions and 0 deletions

28
group_vars/nut/main.yml Normal file
View File

@@ -0,0 +1,28 @@
nut_users:
homeassistant:
- password: '{{ vault_nut_user_passwords.homeassistant }}'
nut_ups:
apc1500:
- driver: usbhid-ups
- port: auto
- desc: Back-UPS XS 1500G
- vendorid: 051d
- product: .*1500G.*
- pollonly: enabled
- pollinterval: 1
apc1300:
- driver: usbhid-ups
- port: auto
- desc: Back-UPS XS 1300G
- vendorid: 051d
- product: .*1300G.*
- pollonly: enabled
- pollinterval: 1
collectd_nut_ups: >-
{{
["localhost"]
| product(nut_ups.keys())
| map("reverse")
| map("join", "@")
| list
}}