mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 18:31:25 -07: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:
parent
1a5ad80589
commit
c1f9aeaac8
17 changed files with 63 additions and 65 deletions
|
@ -171,7 +171,7 @@ from ansible.module_utils.api import basic_auth_argument_spec
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
||||
auth_argument_spec, find_project, gitlab_authentication, ensure_gitlab_package
|
||||
auth_argument_spec, find_project, gitlab_authentication
|
||||
)
|
||||
|
||||
|
||||
|
@ -325,7 +325,9 @@ def main():
|
|||
],
|
||||
supports_check_mode=True,
|
||||
)
|
||||
ensure_gitlab_package(module)
|
||||
|
||||
# check prerequisites and connect to gitlab server
|
||||
gitlab_instance = gitlab_authentication(module)
|
||||
|
||||
state = module.params['state']
|
||||
project_identifier = module.params['project']
|
||||
|
@ -342,8 +344,6 @@ def main():
|
|||
enable_ssl_verification = module.params['hook_validate_certs']
|
||||
hook_token = module.params['token']
|
||||
|
||||
gitlab_instance = gitlab_authentication(module)
|
||||
|
||||
gitlab_hook = GitLabHook(module, gitlab_instance)
|
||||
|
||||
project = find_project(gitlab_instance, project_identifier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue