diff --git a/changelogs/fragments/65176-gitlab-runner-idempotency.yaml b/changelogs/fragments/65176-gitlab-runner-idempotency.yaml new file mode 100644 index 00000000000..5570d75cbf3 --- /dev/null +++ b/changelogs/fragments/65176-gitlab-runner-idempotency.yaml @@ -0,0 +1,2 @@ +bugfixes: + - gitlab_runner - fix idempotency for shared runner diff --git a/lib/ansible/modules/source_control/gitlab_runner.py b/lib/ansible/modules/source_control/gitlab_runner.py index c8ecad590e1..7a92c8992b2 100644 --- a/lib/ansible/modules/source_control/gitlab_runner.py +++ b/lib/ansible/modules/source_control/gitlab_runner.py @@ -258,10 +258,10 @@ class GitLabRunner(object): @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