|
|
|
@ -79,8 +79,23 @@
|
|
|
|
|
|
|
|
|
|
- include: remove_user.yml user_name={{user_name_2}} user_password={{ user_password_1 }}
|
|
|
|
|
|
|
|
|
|
- name: Create user with password1234 using hash. (expect changed=true)
|
|
|
|
|
mysql_user: name=jmainguy password='*D65798AAC0E5C6DF3F320F8A30E026E7EBD73A95' encrypted=yes
|
|
|
|
|
register: encrypt_result
|
|
|
|
|
|
|
|
|
|
- name: Check that the module made a change
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- "encrypt_result.changed == True"
|
|
|
|
|
|
|
|
|
|
- name: See if the password needs to be updated. (expect changed=false)
|
|
|
|
|
mysql_user: name=jmainguy password='password1234'
|
|
|
|
|
register: plain_result
|
|
|
|
|
|
|
|
|
|
- name: Check that the module did not change the password
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- "plain_result.changed == False"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove user (cleanup)
|
|
|
|
|
mysql_user: name=jmainguy state=absent
|
|
|
|
|