Add limit for new password in gitlab_user (#33374)
Fixes: #29399 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
89b65e81d1
commit
dd6532b29a
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue