mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51: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
|
@ -97,7 +97,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, gitlab_authentication, find_project, ensure_gitlab_package
|
||||
auth_argument_spec, gitlab_authentication, find_project
|
||||
)
|
||||
|
||||
|
||||
|
@ -159,13 +159,12 @@ state_strategy = {
|
|||
|
||||
|
||||
def core(module):
|
||||
ensure_gitlab_package(module)
|
||||
# check prerequisites and connect to gitlab server
|
||||
gl = gitlab_authentication(module)
|
||||
|
||||
gitlab_project = module.params['project']
|
||||
state = module.params['state']
|
||||
|
||||
gl = gitlab_authentication(module)
|
||||
|
||||
project = find_project(gl, gitlab_project)
|
||||
# project doesn't exist
|
||||
if not project:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue