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
16 lines
384 B
Django/Jinja
16 lines
384 B
Django/Jinja
{% for username, settings in nut_users.items() %}
|
|
[{{ username }}]
|
|
{% if settings.password|d(none) is not none %}
|
|
password = {{ settings.password | decrypt }}
|
|
{% endif %}
|
|
{% for action in settings.actions|d([]) %}
|
|
actions = {{ action }}
|
|
{% endfor %}
|
|
{% for instcmds in settings.instcmds|d([]) %}
|
|
instcmds = {{ instcmds }}
|
|
{% endfor %}
|
|
{% if not loop.last %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|