You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units/plugins
Gaudenz Steinlin c33a782a9c
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 entry
2 years ago
..
action mention acl in permissions errors (#79209) 2 years ago
become better handling of sudo flag replacement (#76389) 3 years ago
cache Use unittest.mock instead of mock. (#77883) 3 years ago
callback Use unittest.mock instead of mock. (#77883) 3 years ago
connection Use unittest.mock instead of mock. (#77883) 3 years ago
filter Require Jinja2 3.0.0 (#75881) 3 years ago
inventory Use unittest.mock instead of mock. (#77883) 3 years ago
loader_fixtures Clean up unit test boilerplate. 4 years ago
lookup Fix password lookup rewrites file when using encrypt (#79431) 2 years ago
shell powershell - fix nested CLIXML parser (#71412) 4 years ago
strategy Move handler processing into new PlayIterator state (#77955) 2 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
test_plugins.py add ansible_name/ansible_aliases attrs to plugin objects (#78700) 2 years ago