Skip to content

Commit

Permalink
[Backport 2.8] gitlab_runner: fix idempotency for shared runners (#65546
Browse files Browse the repository at this point in the history
)

* gitlab_runner: fix idempotency for shared runners (#65176)

* add changelog
  • Loading branch information
Lunik authored and mattclay committed Jan 10, 2020
1 parent 11dd391 commit fc9d6ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/65176-gitlab-runner-idempotency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- gitlab_runner - fix idempotency for shared runner
6 changes: 3 additions & 3 deletions lib/ansible/modules/source_control/gitlab_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def updateRunner(self, runner, arguments):
@param description Description of the runner
'''
def findRunner(self, description):
runners = self._gitlab.runners.list(as_list=False)
runners = self._gitlab.runners.all(as_list=False)
for runner in runners:
if (runner.description == description):
return self._gitlab.runners.get(runner.id)
if (runner['description'] == description):
return self._gitlab.runners.get(runner['id'])

'''
@param description Description of the runner
Expand Down

0 comments on commit fc9d6ea

Please sign in to comment.