1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] 828968b0dd
[PR #7790/787fa462 backport][stable-8] fix(modules/gitlab_runner): Use correct argument to list all runners (#8032)
fix(modules/gitlab_runner): Use correct argument to list all runners (#7790)

* fix(modules/gitlab_runner): Use correct argument to list all runners

python-gitlab 4.0.0 removed support for the `as_list=False` parameter.
This functionality is now available as `iterator=True`.

Without this change, the module actually only retrieves the first
20 results, which can lead to non-idempotent behavior, such as
registering a runner again.

* Add changelog entry (#7790)

* gitlab_runner: Check python-gitlab version when listing runners

* gitlab: Add list_all_kwargs variable to module_utils

* refactor(gitlab modules): use list_all_kwargs where it helps (#7790)

I did not change every instance of all=True or all=False, only those
which could obviously benefit from simplifying:

  * Code using `all=True` but then searching for any items that match a
    condition (no need to collect the full list).
  * Code that basically reimplements `all=True` with manual pagination.
    (These could be changed to `all=True`, but `list_all_kwargs` also
    sets per_page to 100, to gather data faster.)

* gitlab_instance_variable: Use list_all_kwargs

* Add new changelog entry for gitlab module changes (#7790)

(cherry picked from commit 787fa46217)

Co-authored-by: Mike Wadsten <mikewadsten@gmail.com>
2024-02-25 21:26:37 +01:00
..
action Fix more typos (#7439) 2023-10-29 18:04:44 +01:00
become machinectl become plugin: mark as require_tty (#6935) 2023-07-15 12:53:59 +02:00
cache Fix more typos (#7439) 2023-10-29 18:04:44 +01:00
callback [stable-8] Add default_without_diff callback (#7949) (#7968) 2024-02-15 07:16:58 +01:00
connection [PR #7873/13e3161f backport][stable-8] Refer to LXD containers/VMs as instances (#7891) 2024-01-24 19:49:01 +01:00
doc_fragments [PR #7897/afd19888 backport][stable-8] Consul action group (#7905) 2024-01-27 12:21:34 +01:00
filter [PR #7985/102a0857 backport][stable-8] New filters to calculate the union, intersection, difference and symmetric difference of lists by preserving the items order (#8020) 2024-02-23 20:48:50 +01:00
inventory [PR #7996/638a7fc1 backport][stable-8] Add templating support to Icinga2 Inventory (#8026) 2024-02-25 07:47:37 +01:00
lookup [PR #7994/6cafd3be backport][stable-8] feat(lookup/bitwarden): add support for "session" arg (#8030) 2024-02-25 21:26:23 +01:00
module_utils [PR #7790/787fa462 backport][stable-8] fix(modules/gitlab_runner): Use correct argument to list all runners (#8032) 2024-02-25 21:26:37 +01:00
modules [PR #7790/787fa462 backport][stable-8] fix(modules/gitlab_runner): Use correct argument to list all runners (#8032) 2024-02-25 21:26:37 +01:00
test [PR #7533/2a5e7c33 backport][stable-8] Add test fqdn_valid (#7567) 2023-11-22 09:26:17 +01:00