mirror of https://github.com/ansible/ansible.git
* 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)pull/65594/head
parent
f21e72d55a
commit
47aea84924
@ -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" }
|
Loading…
Reference in New Issue