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/module_utils
Léo GATELLIER 5a1ee4e3ee
[PR #7790/787fa462 backport][stable-7] fix(modules/gitlab_runner): Use correct argument to list all runners (#8311)
[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: patchback[bot] <45432694+patchback[bot]@users.noreply.github.com>
Co-authored-by: Mike Wadsten <mikewadsten@gmail.com>
2024-05-06 19:45:53 +02:00
..
identity/keycloak [PR #7641/58cce27d backport][stable-7] Fix Keycloak API client to quote '/' properly (#7664) 2023-12-02 09:40:02 +01:00
mh
net_tools/pritunl [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
oracle [PR #7501/48e860be backport][stable-7] Use isinstance() instead of type() (#7502) 2023-11-08 13:26:52 +01:00
remote_management/lxca
source_control
storage
_filelock.py
_mount.py
_stormssh.py
alicloud_ecs.py
btrfs.py
cloud.py
cmd_runner.py
consul.py
csv.py
database.py
deps.py
dimensiondata.py [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
gandi_livedns_api.py
gconftool2.py
gio_mime.py
gitlab.py [PR #7790/787fa462 backport][stable-7] fix(modules/gitlab_runner): Use correct argument to list all runners (#8311) 2024-05-06 19:45:53 +02:00
heroku.py
hwc_utils.py [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
ibm_sa_utils.py
ilo_redfish_utils.py
influxdb.py
ipa.py [PR #8175/b674f94f backport][stable-7] module_utils/ipa.py: fix regex when parsing version (#8205) 2024-04-09 08:01:04 +02:00
jenkins.py
known_hosts.py
ldap.py [PR #7697/a5cd4ebe backport][stable-7] Simplify regex for identifying order number in DN (#7646) (#7913) 2024-01-29 19:30:04 +01:00
linode.py
locale_gen.py
lxd.py
manageiq.py
memset.py [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
module_helper.py
ocapi_utils.py [PR #7501/48e860be backport][stable-7] Use isinstance() instead of type() (#7502) 2023-11-08 13:26:52 +01:00
oneandone.py
onepassword.py
oneview.py
online.py
opennebula.py
pipx.py [PR #7506/c2e578cb backport][stable-7] pipx: change parameter formatter for pip_args (#7509) 2023-11-11 12:28:35 +01:00
proxmox.py
puppet.py [PR #8001/1b8e6bc9 backport][stable-7] puppet_utils: Do not force lang for cmd (#8241) 2024-04-20 10:08:18 +02:00
pure.py
rax.py
redfish_utils.py [PR #7952/dd7c3ad1 backport][stable-7] Fix errors in hpe specific get methods (#8021) 2024-02-24 20:26:50 +00:00
redhat.py
redis.py
rundeck.py
saslprep.py
scaleway.py [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
snap.py
ssh.py
univention_umc.py
utm_utils.py
vardict.py [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
version.py
vexata.py
wdc_redfish_utils.py [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
xenserver.py
xfconf.py