Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab_group module fail @ creation if project_creation_level and subgroup_creation_level are not defined #4855

Closed
1 task done
fzarifian opened this issue Jun 19, 2022 · 4 comments
Labels
bug This issue/PR relates to a bug gitlab has_pr module module plugins plugin (any type) source_control traceback

Comments

@fzarifian
Copy link

fzarifian commented Jun 19, 2022

Summary

cannot create subgroups if project_creation_level and subgroup_creation_level are not defined

when i affect default values to those variable, it works
please add default value for those variable

Issue Type

Bug Report

Component Name

gitlab_group module

Ansible Version

$ ansible --version

Community.general Version

$ ansible-galaxy collection list community.general

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Steps to Reproduce

- name: "Create GitLab SubGroup"
  community.general.gitlab_group:
    api_url: https://gitlab.example.com/
    validate_certs: True
    api_token: xxx
    name: c
    path: c
    state: present
    parent: "a/b"

Expected Results

creating should work according the documentation

Actual Results

The full traceback is:
  File "/var/folders/h3/rbw_915j7tg2h4lp1bp63st80000gn/T/ansible_community.general.gitlab_group_payload_y2u7c11d/ansible_community.general.gitlab_group_payload.zip/ansible_collections/community/general/plugins/modules/source_control/gitlab/gitlab_group.py", line 262, in create_group
  File "/Users/fab1/Library/Python/3.8/lib/python/site-packages/gitlab/exceptions.py", line 313, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_job_token": null,
            "api_oauth_token": null,
            "api_password": null,
            "api_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_url": "XXX",
            "api_username": null,
            "auto_devops_enabled": null,
            "avatar_path": null,
            "description": null,
            "name": "c",
            "parent": "a/b",
            "path": "c",
            "project_creation_level": null,
            "require_two_factor_authentication": null,
            "state": "present",
            "subgroup_creation_level": null,
            "validate_certs": true,
            "visibility": "private"
        }
    },
    "msg": "Failed to create group: 500: 500 Internal Server Error "

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug gitlab module module plugins plugin (any type) source_control traceback labels Jun 19, 2022
@Lunik
Copy link
Contributor

Lunik commented Jun 19, 2022

Duplicate of #4577

@felixfontein
Copy link
Collaborator

Thanks for spotting that @Lunik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug gitlab has_pr module module plugins plugin (any type) source_control traceback
Projects
None yet
Development

No branches or pull requests

4 participants