community / community.general / 3.8.10 / module / gitlab_protected_branch (un)Marking existing branches for protection | "added in version" 3.4.0 of community.general" Authors: Werner Dijkerman (@dj-wasabi)community.general.gitlab_protected_branch (3.8.10) — module
Install with ansible-galaxy collection install community.general:==3.8.10
collections: - name: community.general version: 3.8.10
(un)Marking existing branches for protection.
- name: Create protected branch on main community.general.gitlab_protected_branch: api_url: https://gitlab.com api_token: secret_access_token project: "dj-wasabi/collection.general" name: main merge_access_levels: maintainer push_access_level: nobody
name: description: - The name of the branch that needs to be protected. - Can make use a wildcard charachter for like C(production/*) or just have C(main) or C(develop) as value. required: true type: str state: choices: - present - absent default: present description: - Create or delete proteced branch. type: str api_url: description: - The resolvable endpoint for the API type: str project: description: - The path and name of the project. required: true type: str api_token: description: - GitLab access token with API permissions. required: true type: str api_password: description: - The password to use for authentication against the API type: str api_username: description: - The username to use for authentication against the API type: str validate_certs: default: true description: - Whether or not to validate SSL certs when supplying a https endpoint. type: bool push_access_level: choices: - maintainer - developer - nobody default: maintainer description: - Access levels allowed to push. type: str merge_access_levels: choices: - maintainer - developer - nobody default: maintainer description: - Access levels allowed to merge. type: str