mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 13:21:25 -07:00
mysql_user: fix overriding user passowrd to the same (#609)
* mysql_user: fix overriding user passowrd to the same * add changelog
This commit is contained in:
parent
74ba307777
commit
5e23f01a76
3 changed files with 23 additions and 13 deletions
|
@ -46,18 +46,17 @@
|
|||
register: user_password_old
|
||||
when: user_password_old_create is failed
|
||||
|
||||
# FIXME: not sure why this is failing, but it looks like it should expect changed=true
|
||||
#- name: update user2 state=present with same password (expect changed=false)
|
||||
# mysql_user:
|
||||
# name: '{{ user_name_2 }}'
|
||||
# password: '{{ user_password_2 }}'
|
||||
# priv: '*.*:ALL'
|
||||
# state: present
|
||||
# login_unix_socket: '{{ mysql_socket }}'
|
||||
# register: result
|
||||
#
|
||||
#- name: assert output user2 was not updated
|
||||
# assert: { that: "result.changed == false" }
|
||||
- name: update user2 state=present with same password (expect changed=false)
|
||||
mysql_user:
|
||||
name: '{{ user_name_2 }}'
|
||||
password: '{{ user_password_2 }}'
|
||||
priv: '*.*:ALL'
|
||||
state: present
|
||||
login_unix_socket: '{{ mysql_socket }}'
|
||||
register: result
|
||||
|
||||
- name: assert output user2 was not updated
|
||||
assert: { that: "result.changed == false" }
|
||||
|
||||
- include: assert_user.yml user_name={{user_name_2}} priv='ALL PRIVILEGES'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue