mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
refactor(gitlab modules): remove duplicate gitlab package check (#7486)
This commit is contained in:
parent
6b00b76f32
commit
4a74f46e56
17 changed files with 63 additions and 65 deletions
|
@ -340,7 +340,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, find_project, gitlab_authentication, gitlab, ensure_gitlab_package
|
||||
auth_argument_spec, find_group, find_project, gitlab_authentication, gitlab
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
@ -558,7 +558,9 @@ def main():
|
|||
],
|
||||
supports_check_mode=True,
|
||||
)
|
||||
ensure_gitlab_package(module)
|
||||
|
||||
# check prerequisites and connect to gitlab server
|
||||
gitlab_instance = gitlab_authentication(module)
|
||||
|
||||
group_identifier = module.params['group']
|
||||
project_name = module.params['name']
|
||||
|
@ -596,8 +598,6 @@ def main():
|
|||
security_and_compliance_access_level = module.params['security_and_compliance_access_level']
|
||||
topics = module.params['topics']
|
||||
|
||||
gitlab_instance = gitlab_authentication(module)
|
||||
|
||||
# Set project_path to project_name if it is empty.
|
||||
if project_path is None:
|
||||
project_path = project_name.replace(" ", "_")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue