mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add limit for new password in gitlab_user (#33374)
Fixes: #29399 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -62,6 +62,7 @@ options:
|
||||
password:
|
||||
description:
|
||||
- The password of the user.
|
||||
- GitLab server enforces minimum password length to 8, set this value with 8 or more characters.
|
||||
required: true
|
||||
email:
|
||||
description:
|
||||
@@ -302,6 +303,9 @@ def main():
|
||||
state = module.params['state']
|
||||
confirm = module.params['confirm']
|
||||
|
||||
if len(user_password) < 8:
|
||||
module.fail_json(msg="New user's 'password' should contain more than 8 characters.")
|
||||
|
||||
# We need both login_user and login_password or login_token, otherwise we fail.
|
||||
if login_user is not None and login_password is not None:
|
||||
use_credentials = True
|
||||
|
||||
Reference in New Issue
Block a user