Update module documentation

This commit is contained in:
Jorge-Rodriguez 2020-11-29 22:02:53 +02:00
commit 9a303ac55a
No known key found for this signature in database
GPG key ID: 43153D1EFD8F7D90
2 changed files with 138 additions and 2 deletions

View file

@ -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: