community.general.gitlab_group – Creates/updates/deletes GitLab Groups¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.gitlab_group
.
Synopsis¶
When the group does not exist in GitLab, it will be created.
When the group does exist and state=absent, the group will be deleted.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
python-gitlab python module
Parameters¶
Examples¶
- name: "Delete GitLab Group"
community.general.gitlab_group:
api_url: https://gitlab.example.com/
api_token: "{{ access_token }}"
validate_certs: False
name: my_first_group
state: absent
- name: "Create GitLab Group"
community.general.gitlab_group:
api_url: https://gitlab.example.com/
validate_certs: True
api_username: dj-wasabi
api_password: "MySecretPassword"
name: my_first_group
path: my_first_group
state: present
# The group will by created at https://gitlab.dj-wasabi.local/super_parent/parent/my_first_group
- name: "Create GitLab SubGroup"
community.general.gitlab_group:
api_url: https://gitlab.example.com/
validate_certs: True
api_username: dj-wasabi
api_password: "MySecretPassword"
name: my_first_group
path: my_first_group
state: present
parent: "super_parent/parent"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Werner Dijkerman (@dj-wasabi)
Guillaume Martinez (@Lunik)