Skip to content

Commit

Permalink
Fixes ansible-collections#5907: gitlab_runner is not idempotent on fi…
Browse files Browse the repository at this point in the history
…rst run after runner creation

This fix adds the missing parameter 'access_level' on runner creation.

Signed-off-by: Christoph Fiehe <[email protected]>
  • Loading branch information
Christoph Fiehe committed Jan 28, 2023
1 parent 8818a6f commit 5f8fe38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- gitlab_runner - add missing parameter 'access_level' on runner creation (https://github.com/ansible-collections/community.general/issues/5907).
5 changes: 3 additions & 2 deletions plugins/modules/gitlab_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
- If set to C(ref_protected), runner can pick up jobs only from protected branches.
- If set to C(not_protected), runner can pick up jobs from both protected and unprotected branches.
required: false
default: ref_protected
default: not_protected
choices: ["ref_protected", "not_protected"]
type: str
maximum_timeout:
Expand Down Expand Up @@ -216,6 +216,7 @@ def create_or_update_runner(self, description, options):
'locked': options['locked'],
'run_untagged': options['run_untagged'],
'maximum_timeout': options['maximum_timeout'],
'access_level': options['access_level'],
'tag_list': options['tag_list'],
})
changed = True
Expand Down Expand Up @@ -327,7 +328,7 @@ def main():
tag_list=dict(type='list', elements='str', default=[]),
run_untagged=dict(type='bool', default=True),
locked=dict(type='bool', default=False),
access_level=dict(type='str', default='ref_protected', choices=["not_protected", "ref_protected"]),
access_level=dict(type='str', default='not_protected', choices=["not_protected", "ref_protected"]),
maximum_timeout=dict(type='int', default=3600),
registration_token=dict(type='str', no_log=True),
project=dict(type='str'),
Expand Down

0 comments on commit 5f8fe38

Please sign in to comment.