Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Don't return module error when mysql_connect fails (#64560) mysql_user expects an Exception when using check_implicit_admin. * Adds integration tests for mysql_user check_implicit_admin (#64560)
- Loading branch information
1 parent
f21e72d
commit 47aea84
Showing
5 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
test/integration/targets/mysql_user/tasks/issue-64560.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
|
||
- name: Set root password | ||
mysql_user: | ||
name: root | ||
password: '{{ root_password }}' | ||
login_user: root | ||
login_password: '{{ root_password }}' | ||
check_implicit_admin: yes | ||
login_unix_socket: '{{ mysql_socket }}' | ||
register: result | ||
|
||
- name: assert root password is changed | ||
assert: { that: "result.changed == true" } | ||
|
||
- name: Set root password again | ||
mysql_user: | ||
name: root | ||
password: '{{ root_password }}' | ||
login_user: root | ||
login_password: '{{ root_password }}' | ||
check_implicit_admin: yes | ||
login_unix_socket: '{{ mysql_socket }}' | ||
register: result | ||
|
||
- name: Assert root password is not changed | ||
assert: { that: "result.changed == false" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,3 +211,7 @@ | |
- import_tasks: issue-29511.yaml | ||
tags: | ||
- issue-29511 | ||
|
||
- import_tasks: issue-64560.yaml | ||
tags: | ||
- issue-64560 |