[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>
puppet_utils: Do not force lang for cmd (#8001)
puppet_utils: Add option to set LANG for puppet execution
Add option `environment_lang` to force the LANG when executing the
puppet agent. The default is the `C` LANG
(cherry picked from commit 1b8e6bc95b)
Co-authored-by: Niklas Schwarz <schwarz.niklas@hotmail.de>
Support newer 'riak admin' sub-command beside legacy 'riak-admin' command (#8211)
* Support newer 'riak admin' sub-command
* Added changelog for riak admin sub-command
* Added blank line
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* replaced string commands with lists
added white space
removed white space
removed parenthesis
* Update changelogs/fragments/8211-riak-admin-sub-command-support.yml
Co-authored-by: Don Naro <dnaro@redhat.com>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Don Naro <dnaro@redhat.com>
(cherry picked from commit bafad8ecd4)
Co-authored-by: tobixx <tobixx@directbox.com>
fix(aix_filesystem): remove extra param from running lsvg (#8176)
* fix(aix_filesystem): remove extra param from running lsvg
* chore: add new line to changlog file
* Update 8151-fix-lsvg_cmd-failed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8491bf7b49)
Co-authored-by: Peter Shen <xianpeng.shen@gmail.com>
updated lxd_container.py docs (#8168)
linuxcontainer.org has phased out LXC/LXD support.
This edit reflects part of it in the docs.
(cherry picked from commit 610ecf9bf5)
Co-authored-by: Herschdorfer <herschdorfer@gmail.com>
xml: make module work with lxml 5.1.1 (#8169)
Make module work with lxml 5.1.1.
(cherry picked from commit b444e8739c)
Co-authored-by: Felix Fontein <felix@fontein.de>
HAProxy skips the wait when drain=true and the backend is down - fix issue 8092 (#8100)
* fix issue 8092
* "is not" => "!="
* moved the drain & down cause to the wait
* added changelogs for PR 8100
* fixed yaml
* fixed file type
* Apply suggestions from code review
Removed a dot from a comment
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/haproxy.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b2b8fc30bf)
Co-authored-by: RayJin2000 <rayjin2000@gmail.com>
ipa_sudorule, ipa_hbacrule: change ipaenabledflag type to bool (#7880)
* ipa_sudorule, ipa_hbacrule: change ipaenabledflag type to bool
freeipa changed the type to bool with commit https://pagure.io/freeipa/c/6c5f2bcb301187f9844985ffe309c7d2262e16f3
* add changelog-fragment
* ipa_sudorule, ipa_hbacrule: set ipaenabledflag according to version
* ipa_sudorule, ipa_hbacrule: change version for backport
it also got backported (https://pagure.io/freeipa/c/faeb656c77adf27a49ccaceb57fc1ba44e11cc1d)
* ipa_sudorule, ipa_hbacrule: swap assigned values
* Update changelogs/fragments/7880-ipa-fix-sudo-and-hbcalrule-idempotence.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: aBUDmdBQ <>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9f5193e40b)
Co-authored-by: aBUDmdBQ <135135848+aBUDmdBQ@users.noreply.github.com>
Fix check mode in iptables_state for incomplete iptables-save files along with integration tests (#8029)
* Implement integration test to reproduce #7463
* Make new iptables_state checks async
* Add missing commit to iptable_state integration test
* Remove async when using checkmode in iptables_state integration tests
* Do per table comparison in check mode for iptables_state
* Calculate changes of iptables state per table based on result
* Output target iptables state in checkmode
* Refactor calculation of invidual table states in iptables_state
* Add missing return for table calculation
* Add missing arg to regex check
* Remove leftover debug output for target iptable state
* Parse per table state from raw state string
* Join restored state for extration of table specific rules
* Switch arguments for joining restored iptable state
* Output final ip table state
* Compare content of tables
* Complete iptables partial tables test cases
* Correct order of test iptables data
* Update docu for iptables tables_after
* Add changelog fragment
* Appease the linting gods for iptables_state
* Adjust spelling and remove tables_after from return values
(cherry picked from commit 23396e62dc)
Co-authored-by: Maxopoly <max@dermax.org>
Aix filesystem crfs issue (#8052)
* crfs issue in aix_filesystem.py
Change the crfs logic and fields, since empty options and order seem to be an issue.
this quick fix seems to solve it
* Create aix_filesystem-crfs-issue.yml
changelog fragment
* fix
fix typo
* Update changelogs/fragments/aix_filesystem-crfs-issue.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Refactored based on feeback and testing
Refactored the changes i did based on the comments and testing. Also changed the attribute default values because they were causing errors
* blank line whitespaces
* fix default
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 73b6b98ed9)
Co-authored-by: Mike <mike@php-webdesign.nl>
fix(homebrew): give correct error message when become true used (#8048)
* fix(homebrew): give correct error message when become true used
This commit fixes#8047 by raising the exception coming from calling
homebrew with the `become: true` parameter set.
* chore(changelog): add changelog fragment
(cherry picked from commit fa30b02294)
Co-authored-by: Michael Wall <thewalla07@gmail.com>
pam_limits: do not create file in check mode when it does not exist (#8057)
Do not create file in check mode when it does not exist.
(cherry picked from commit c13bede0c5)
Co-authored-by: Felix Fontein <felix@fontein.de>
Updates `lxd_container` to support new LXD API (#7980)
* feat: ✨ adds support for /1.0/instances endpoint
* Update changelogs/fragments/lxd-instances-api-endpoint-added.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 74c15c1241)
Co-authored-by: Anthony Anderson <fnanderson93@gmail.com>
[FIX] proxmox_kvm: fetch vm status from node-specific API endpoint to ensure fresh state (#7953)
* proxmox_kvm: fetch vm status from node-specific API endpoint to ensure fresh state, fixes#7817
* changelog fragments
* Fix changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 248e2ff321)
Co-authored-by: nxet <nxet821@protonmail.com>
Fix instruction for distro Ubuntu and Debian for htpasswd depends (#8037)
* Fix instruction fo debian 12 for htpasswd depends
* Add range for python-passlib distro
(cherry picked from commit 05bf5ee1df)
Co-authored-by: Xavier Mitault <xavier.mitault@epitech.eu>
Correct apk docu to not include spaces in package name (#8009)
* Correct apk docu to not include spaces in package name
* Update apk name docu as suggested in PR
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b5c3361be4)
Co-authored-by: Maxopoly <max@dermax.org>
cargo: use the correct path when checking installation status fixing idempotency issue. (#7970)
* cargo: use the correct path when checking installation status
* Add changelog fragment
* Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9510988abc)
Co-authored-by: rbomze <14312790+rbomze@users.noreply.github.com>
Fixes#1226 - keycloak_client detects changes on check_mode but not in run mode (#7881)
* Fix warning integrated
* Update Keycloak version intergrated test
* Exclude metadata from diff test
* Sanity
* Add fragments
* typo
* Add test
* Update changelogs/fragments/7881-fix-keycloak-client-ckeckmode.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove docker compose
* Update changelogs/fragments/7881-fix-keycloak-client-ckeckmode.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 001292c780)
Co-authored-by: desand01 <desrosiers.a@hotmail.com>
Fixes#7389 - NMCLI issue with creating a wifi bridge-slave (#7695)
* working mod
* added changelog fragment
* added link on fragment
* Update changelogs/fragments/7389-nmcli-issue-with-creating-a-wifi-bridge-slave.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* last fix
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 997e6345b5)
Co-authored-by: Gianmarco Mameli <57061995+gianmarco-mameli@users.noreply.github.com>
Detection of already installed homebrew cask (#7870)
* fix: detect already installed cask
Use json output v2 to check if formulae and casks are installed
chore: add changelog fragment
* test: add homebrew cask specific tests
* refactor: change cask used in tests
* chore: apply suggestions to changelog fragment
(cherry picked from commit be3bfd6fa5)
Co-authored-by: João Victor Silva <160127815@aluno.unb.br>
Add missing `id` parameter into pacman_key documentation examples. (#7855)
Key ID is a mandatory parameter, and the examples which miss it are
incorrect.
(cherry picked from commit cd77d67efb)
Co-authored-by: Danila Kiver <forumdan@mail.ru>
ipa_otptoken: fix wrong return value string to bool (#7795)
ipa_data is return ipatokendisable in boolean format and the module expects it as a string
this behavior causes a lack of idempotency and the get_diff module will fail in the second run.
(cherry picked from commit 31de16cee3)
Co-authored-by: Parsa Yousefi <p.yousefi97@gmail.com>
Bugfix: keycloak_identity_provider does not handle mapper changes properly (#7418)
* fix keycloak_identity_provider ITs to actually pass
- wrong identityProviderAlias in mapper configuration
* kc_identity_provider: add mapper reconfiguration regression tests
* test for removing an existing mapper
* test for adding a new mapper when others already exist
* test for module idempotency when mappers not ordered by name in ascending order
* kc_identity_provider: add bugfixes for mapper reconfigurations
* removing an existing mapper
* adding a new mapper when others already exist
* module idempotency when mappers not ordered by name in ascending order
* add changelog fragment
* prevent unnecessary update_mapper calls when there is no change
* Update changelogs/fragments/7418-kc_identity_provider-mapper-reconfiguration-fixes.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/7418-kc_identity_provider-mapper-reconfiguration-fixes.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/7418-kc_identity_provider-mapper-reconfiguration-fixes.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_identity_provider.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* kc_identity_provider: sort changeset mappers via name OR id to prevent potential failures in case name was not specified in playbook
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit fd0d05d6f2)
Co-authored-by: Jakub Danek <danekja@users.noreply.github.com>
Fixed payload format (#7754)
* Fixed payload format
* added changelog fragment
* Update changelogs/fragments/7754-fixed-payload-format.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Ed Ferguson <eferguson@nrtc.coop>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4a1006ac34)
Co-authored-by: Ed Ferguson <5855090+eeferg@users.noreply.github.com>
keycloak_user: avoid error when trying to delete a non-existing user (#7696)
* avoid error when trying to delete a non-existing user
when force is set, but the user doesn't exist yet, this fails.
* 7696-avoid-attempt-to-delete-non-existing-user
add changelog entry
* rename changelog file
* Update changelogs/fragments/7696-avoid-attempt-to-delete-non-existing-user.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1389bba459)
Co-authored-by: Michiel Dethmers <michiel@phplist.com>
using timeout parameter within community.general.mail module (#7731)
* using timeout parameter within community.general.mail module
* consolidated time-out example within an existing playbook
* consolidated time-out example within an existing playbook
* Update plugins/modules/mail.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 916f6f7c87)
Co-authored-by: Aditya Putta <puttaa@skiff.com>
Updated documentation to reflect new behaviour (#7685)
* Updated documentation to reflect new behaviour
Per issue [6027](https://github.com/ansible-collections/community.general/issues/6027), disk and storage should not be used together, and changes to the API make it so "disk" should be formatted like "<storage>:<size in gb>".
Documentation edited to reflect this new behavior.
* Apply suggestions from code review
Change format due to referencing options.
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 98b2d04348)
Co-authored-by: Wesley P <68830971+xhk416x@users.noreply.github.com>
Change tab to space in SSHFP requests (#7653)
* Change tab to space in SSHFP requests
Cloudflare uses space and not tab when you search for SSHFP records
Cloudflare changes fingerprint to uppercase
Create 7653-fix-cloudflare-lookup.yml
* Update changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3d0da92784)
Co-authored-by: Kalle Møller <git@k-moeller.dk>
lvol: check return message in both stderr and stdout (#7601)
* lvol: check return message in both stderr and stdout
* add changelog frag
(cherry picked from commit 32558558c0)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
redhat_subscription: use D-Bus registration on RHEL 7 only on 7.4+ (#7624)
subscription-manager does not provide a D-Bus interface in versions of
RHEL 7 older than 7.4.
(cherry picked from commit af01b462d5)
Co-authored-by: Pino Toscano <ptoscano@redhat.com>
interfaces_file: filter by address_familiy when updating method (#7612)
* When updating method, check address_family if provided.
* Also test modifying 'method' without address_family filter.
(cherry picked from commit 5adb7ab948)
Co-authored-by: Felix Fontein <felix@fontein.de>
Update proxmox_tasks_info.py (#7591)
fix typo
I spend 3 hours because of this mistake
(cherry picked from commit 19984ce4df)
Co-authored-by: Андрей Неустроев <99169437+aneustroev@users.noreply.github.com>