Fix user plugin changes in check mode (#596)

* Fix user plugin changes in check mode

* Add auth plugin tests

* Undo local changes

* Improve task names

* Fix query

* Changes

* Add check

* Add check

* Add check

* Add one more check

* Add one more check

* Fix typo

* Change parameter

* Testing

* Remove tests

* Add tests

* Test first stteps

* Readd tests

* Test without check mode

* Test with check mode

* Test with check mode

* Testing

* Testing

* Add missing tests

* Changes for ansible-lint complaints

* Fix condition

* Update changelogs/fragments/596-fix-check-changes.yaml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* refactor

* Add more tests

* Fix newpass var

* Remove extra test

---------

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
Fran 2024-08-30 11:15:16 +02:00 committed by GitHub
parent 87be61ccf3
commit 0de9685cf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 175 additions and 68 deletions

View file

@ -411,7 +411,8 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
else:
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s", (user, host, plugin)
cursor.execute(*query_with_args)
if not module.check_mode:
cursor.execute(*query_with_args)
password_changed = True
changed = True