Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nut user configuration does not support AnsibleVaultEncryptedUnicode passwords #409

Open
tedski opened this issue Aug 14, 2024 · 0 comments

Comments

@tedski
Copy link

tedski commented Aug 14, 2024

The upsd.users template checks each user option type and if it's a non-string iterable, it creates a multi-line repeat of the option. If a user password is encrypted with ansible vault, it is iterable, but not type string, therefore causing the password to be split out into many "password=" lines with each containing a single character. This is because the type of the password string is AnsibleVaultEncryptedUnicode, not string.

My proposed fix is to test if option name is password and always treat that as a single string since upsd.users does not support multiple passwords for a user anyway. Anything given to the template as a password key should be a single string.

If that solution is amenable, I can have a PR ready in a few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant