mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-29 16:11:26 -07:00
Update module documentation
This commit is contained in:
parent
800d9a553b
commit
9a303ac55a
2 changed files with 138 additions and 2 deletions
|
@ -40,7 +40,118 @@
|
|||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Create user with account locking with password lock time below range
|
||||
mysql_user:
|
||||
<<: *mysql_params
|
||||
name: '{{ user_name_1 }}'
|
||||
password: '{{ user_password_1 }}'
|
||||
account_locking:
|
||||
PASSWORD_LOCK_TIME: -1
|
||||
FAILED_LOGIN_ATTEMPTS: 3
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg == "Account locking values are out of the valid range (0-32767)"
|
||||
when: version_string is version('8.0.19', '>=') and version_string is version('10', '<')
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
when: version_string is version('8.0.19', '<') or version_string is version('10', '>=')
|
||||
|
||||
- name: Create user with account locking with password lock time above range
|
||||
mysql_user:
|
||||
<<: *mysql_params
|
||||
name: '{{ user_name_1 }}'
|
||||
password: '{{ user_password_1 }}'
|
||||
account_locking:
|
||||
PASSWORD_LOCK_TIME: 32768
|
||||
FAILED_LOGIN_ATTEMPTS: 3
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg == "Account locking values are out of the valid range (0-32767)"
|
||||
when: version_string is version('8.0.19', '>=') and version_string is version('10', '<')
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
when: version_string is version('8.0.19', '<') or version_string is version('10', '>=')
|
||||
|
||||
- name: Create user with account locking with failed login attempts below range
|
||||
mysql_user:
|
||||
<<: *mysql_params
|
||||
name: '{{ user_name_1 }}'
|
||||
password: '{{ user_password_1 }}'
|
||||
account_locking:
|
||||
PASSWORD_LOCK_TIME: 2
|
||||
FAILED_LOGIN_ATTEMPTS: -1
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg == "Account locking values are out of the valid range (0-32767)"
|
||||
when: version_string is version('8.0.19', '>=') and version_string is version('10', '<')
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
when: version_string is version('8.0.19', '<') or version_string is version('10', '>=')
|
||||
|
||||
- name: Create user with account locking with failed login attempts above range
|
||||
mysql_user:
|
||||
<<: *mysql_params
|
||||
name: '{{ user_name_1 }}'
|
||||
password: '{{ user_password_1 }}'
|
||||
account_locking:
|
||||
PASSWORD_LOCK_TIME: 2
|
||||
FAILED_LOGIN_ATTEMPTS: 32768
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg == "Account locking values are out of the valid range (0-32767)"
|
||||
when: version_string is version('8.0.19', '>=') and version_string is version('10', '<')
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
when: version_string is version('8.0.19', '<') or version_string is version('10', '>=')
|
||||
|
||||
- name: Create user with account locking with invalid password lock time
|
||||
mysql_user:
|
||||
<<: *mysql_params
|
||||
name: '{{ user_name_1 }}'
|
||||
password: '{{ user_password_1 }}'
|
||||
account_locking:
|
||||
PASSWORD_LOCK_TIME: INVALID
|
||||
FAILED_LOGIN_ATTEMPTS: 3
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg == "PASSWORD_LOCK_TIME must be an integer between 0 and 32767 or 'UNBOUNDED'"
|
||||
when: version_string is version('8.0.19', '>=') and version_string is version('10', '<')
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
when: version_string is version('8.0.19', '<') or version_string is version('10', '>=')
|
||||
|
||||
- include: assert_no_user.yml user_name={{ user_name_1 }}
|
||||
when: version_string is version('8.0.19', '>=') and version_string is version('10', '<')
|
||||
|
||||
- name: Create user with account locking
|
||||
mysql_user:
|
||||
|
@ -56,6 +167,11 @@
|
|||
that:
|
||||
- result is changed
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
when: version_string is version('8.0.19', '<') or version_string is version('10', '>=')
|
||||
|
||||
- include: assert_user.yml user_name={{ user_name_1 }}
|
||||
|
||||
- block:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue