community.general.gitlab_project – Creates/updates/deletes GitLab Projects¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.gitlab_project
.
Synopsis¶
When the project does not exist in GitLab, it will be created.
When the project does exists and state=absent, the project will be deleted.
When changes are made to the project, the project will be updated.
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 Project
community.general.gitlab_project:
api_url: https://gitlab.example.com/
api_token: "{{ access_token }}"
validate_certs: False
name: my_first_project
state: absent
delegate_to: localhost
- name: Create GitLab Project in group Ansible
community.general.gitlab_project:
api_url: https://gitlab.example.com/
validate_certs: True
api_username: dj-wasabi
api_password: "MySecretPassword"
name: my_first_project
group: ansible
issues_enabled: False
merge_method: rebase_merge
wiki_enabled: True
snippets_enabled: True
import_url: http://git.example.com/example/lab.git
state: present
delegate_to: localhost
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)