nut: Encrypt upsd user passwords with age

Switching from Ansible Vault to age.

I've changed the `upsd.users` template somewhat in order to handle the
`password` property separately.  Now, items in the `nut_users` list
are objects with properties instead of lists of objects with properties.
The latter was done to support repeating options (`actions` and
`instcmds`), but that is more appropriately handled with lists of
values.

This value is encrypted with the following public key:

    age1c6swn9tm0502jd3e0yszfd4qd7lgx2nd9uk0hruuckhx7zpn3utqhau7mz
This commit is contained in:
2024-01-09 17:25:42 -06:00
parent fefa8f6a23
commit 8b7b7b677d
3 changed files with 20 additions and 13 deletions

View File

@@ -1,6 +1,14 @@
nut_users:
homeassistant:
- password: '{{ vault_nut_user_passwords.homeassistant }}'
password: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxZUZleGt3emxXdDFtcEtN
Wll3K0hrS2c2M1oyMWh2VlBnMER0bkZOb1VVCnU3aTI2eVJoV1dKNWxEd0VnbVNa
NlMxVWRuZWpNbTJRVUhWR2w3bUlwaEUKLS0tIGZLcGNQRy9LNUF1Y0JzZEZGdXBn
bUJjYlBSSEYwRUpwemlMZ0xCZnpTS2cKUFke27YDeTME9OBgEcQdbJ3jsDZS43km
tK61kLMcexq3lXQb30gx4fzMuYa0MXFygawscTnxTrOrXUd36Iga4A==
-----END AGE ENCRYPTED FILE-----
nut_ups:
apc1500:
- driver: usbhid-ups
@@ -18,6 +26,7 @@ nut_ups:
- product: .*1300G.*
- pollonly: enabled
- pollinterval: 1
collectd_nut_ups: >-
{{
["localhost"]