mirror of https://github.com/ansible/ansible.git
Fix password lookup rewrites file when using encrypt (#79431)
* Remove unused mock from test_password_already_created_encrypt The _get_paths mock is never used in the test_password_already_created_encrypt test case. * Add test to assert the password file is not rewritten If the password file already contains the salt and the hasing algorithm does not use the ident parameter, the password lookup should not write to the password file. * Fix "changed" if using "encrypt" in password lookup When using the "encrypt" parameter to the password lookup without the ident parameter, the password file was always marked as "changed". This caused the file to be rewritten with the same content. This is fixed by only marking the file as changed, if an "ident" value needs to be added to the file. Fixes #79430. Add changelog entrypull/56508/merge
parent
3936b5c471
commit
c33a782a9c
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Fixes the password lookup to not rewrite files if they are not changed when using the "encrypt" parameter (#79430).
|
Loading…
Reference in New Issue