gitlab_*_access_token: add planner access level (#10679)

The Planner role was introduced in December 2024 with GitLab 17.7 [1].
Allow its use in gitlab_project_access_token and
gitlab_group_access_token.

[1]: https://about.gitlab.com/releases/2024/12/19/gitlab-17-7-released/
This commit is contained in:
David Phillips 2025-08-24 04:35:17 +12:00 committed by GitHub
commit 1c0eb9ddf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 6 deletions

View file

@ -0,0 +1,3 @@
minor_changes:
- gitlab_group_access_token - add ``planner`` access level (https://github.com/ansible-collections/community.general/pull/10679).
- gitlab_project_access_token - add ``planner`` access level (https://github.com/ansible-collections/community.general/pull/10679).

View file

@ -68,9 +68,10 @@ options:
access_level:
description:
- Access level of the access token.
- The value V(planner) was added in community.general 11.3.0.
type: str
default: maintainer
choices: ["guest", "reporter", "developer", "maintainer", "owner"]
choices: ["guest", "planner", "reporter", "developer", "maintainer", "owner"]
expires_at:
description:
- Expiration date of the access token in C(YYYY-MM-DD) format.
@ -160,7 +161,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
auth_argument_spec, find_group, gitlab_authentication, gitlab
)
ACCESS_LEVELS = dict(guest=10, reporter=20, developer=30, maintainer=40, owner=50)
ACCESS_LEVELS = dict(guest=10, planner=15, reporter=20, developer=30, maintainer=40, owner=50)
class GitLabGroupAccessToken(object):
@ -245,7 +246,7 @@ def main():
'create_runner',
'ai_features',
'k8s_proxy']),
access_level=dict(type='str', default='maintainer', choices=['guest', 'reporter', 'developer', 'maintainer', 'owner']),
access_level=dict(type='str', default='maintainer', choices=['guest', 'planner', 'reporter', 'developer', 'maintainer', 'owner']),
expires_at=dict(type='str', required=True),
recreate=dict(type='str', default='never', choices=['never', 'always', 'state_change'])
))

View file

@ -68,9 +68,10 @@ options:
access_level:
description:
- Access level of the access token.
- The value V(planner) was added in community.general 11.3.0.
type: str
default: maintainer
choices: ["guest", "reporter", "developer", "maintainer", "owner"]
choices: ["guest", "planner", "reporter", "developer", "maintainer", "owner"]
expires_at:
description:
- Expiration date of the access token in C(YYYY-MM-DD) format.
@ -160,7 +161,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
auth_argument_spec, find_project, gitlab_authentication, gitlab
)
ACCESS_LEVELS = dict(guest=10, reporter=20, developer=30, maintainer=40, owner=50)
ACCESS_LEVELS = dict(guest=10, planner=15, reporter=20, developer=30, maintainer=40, owner=50)
class GitLabProjectAccessToken(object):
@ -243,7 +244,7 @@ def main():
'create_runner',
'ai_features',
'k8s_proxy']),
access_level=dict(type='str', default='maintainer', choices=['guest', 'reporter', 'developer', 'maintainer', 'owner']),
access_level=dict(type='str', default='maintainer', choices=['guest', 'planner', 'reporter', 'developer', 'maintainer', 'owner']),
expires_at=dict(type='str', required=True),
recreate=dict(type='str', default='never', choices=['never', 'always', 'state_change'])
))