mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
[PR #7486/4a74f46e backport][stable-8] refactor(gitlab modules): remove duplicate gitlab package check (#7516)
refactor(gitlab modules): remove duplicate gitlab package check (#7486)
(cherry picked from commit 4a74f46e56)
Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>
This commit is contained in:
@@ -234,7 +234,7 @@ from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
||||
auth_argument_spec, find_group, gitlab_authentication, gitlab, ensure_gitlab_package
|
||||
auth_argument_spec, find_group, gitlab_authentication, gitlab
|
||||
)
|
||||
|
||||
|
||||
@@ -616,7 +616,9 @@ def main():
|
||||
('state', 'present', ['name', 'email']),
|
||||
)
|
||||
)
|
||||
ensure_gitlab_package(module)
|
||||
|
||||
# check prerequisites and connect to gitlab server
|
||||
gitlab_instance = gitlab_authentication(module)
|
||||
|
||||
user_name = module.params['name']
|
||||
state = module.params['state']
|
||||
@@ -635,8 +637,6 @@ def main():
|
||||
user_identities = module.params['identities']
|
||||
overwrite_identities = module.params['overwrite_identities']
|
||||
|
||||
gitlab_instance = gitlab_authentication(module)
|
||||
|
||||
gitlab_user = GitLabUser(module, gitlab_instance)
|
||||
user_exists = gitlab_user.exists_user(user_username)
|
||||
if user_exists:
|
||||
|
||||
Reference in New Issue
Block a user