mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix: gitlab_deploy_key idempotency (#3473)
* Fix: gitlab_deploy_key idempotency The module was not retrieving all the deploy keys leading to non idempotency on projects with multiple deploy keys. SEE: https://python-gitlab.readthedocs.io/en/stable/api-usage.html#pagination * Update changelogs/fragments/3473-gitlab_deploy_key-fix_idempotency.yml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Jonathan Piron <jonathanpiron@gmail.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
e95f63b067
commit
0bc4518f3b
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- gitlab_deploy_key - fix idempotency on projects with multiple deploy keys (https://github.com/ansible-collections/community.general/pull/3473).
|
|
@ -211,7 +211,7 @@ class GitLabDeployKey(object):
|
|||
@param key_title Title of the key
|
||||
'''
|
||||
def findDeployKey(self, project, key_title):
|
||||
deployKeys = project.keys.list()
|
||||
deployKeys = project.keys.list(all=True)
|
||||
for deployKey in deployKeys:
|
||||
if (deployKey.title == key_title):
|
||||
return deployKey
|
||||
|
|
Loading…
Reference in a new issue