keycloak_user_federation: get the before mappers from `before_comp` to fix `UnboundLocalError` (#8831)
* fix: get the before mappers from `before_comp`
* add changelog fragment
* Adjust changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2ae41fa83f)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
keycloak_user_federation: sort desired and after mappers by name (#8761)
* sort desired mappers by name
* sort mappers fetched after update by name
* only sort mapper list if there are desired mappers specified
* add fallback `''` in case `name` is not a key or `None` when sorting mappers
* add changelog fragment
(cherry picked from commit 982b8d89b7)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
Fix gitlab access token crash in check mode for new tokens (#8796)
Fix crash in check mode when attempting to create a new gitlab access token
(cherry picked from commit e9071e9871)
Co-authored-by: Veikko Virrankoski <71337077+vvirrank@users.noreply.github.com>
keycloak_user_federation: fix key error when removing mappers in update (#8762)
* remove new mappers without an id from list comprehension
* add changelog fragment
* Update changelogs/fragments/8762-keycloac_user_federation-fix-key-error-when-updating.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b79ac4f0ac)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
keycloak_identity_provider: get cleartext clientsecret (#8735)
* get cleartext `clientSecret` from full realm info
* add mock get_realm call to existing tests; add new no_change_when_present test
* add changelog fragment
* remove blank lines
* Update changelog.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 57e28e5a73)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
Namespace the passwordstore lockfile (#8689)
* Namespace the lockfile
When passwordstore needs to grab a lock, it creates a statically file (within /tmp, typically). This is unfortunate, when there might be more than one user using the passwordstore functionality on that machine. Prepend the user to the filename, to bypass further issues.
* Update plugins/lookup/passwordstore.py
specifically reference the argument number in the format string.
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add changelog fragment for PR#8689
* Update 8689-passwordstore-lock-naming.yml
I was sure that was a copy/paste.
* Update changelogs/fragments/8689-passwordstore-lock-naming.yml
specify the type of plugin
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8989b6c4d4)
Co-authored-by: Adam Tygart <adam.tygart@gmail.com>
keycloak_user_federation: add mapper removal (#8695)
* add unwanted mapper removal
* check for mapper updates in already fetched data to remove unnecessary API calls
* added mock answers and updated request count to match the added delete and fetch after_comp calls
* fix sanity issues
* add changelog fragment
* removed automatic field numbering from format
* replace filter expression with list comprehension
Co-authored-by: Felix Fontein <felix@fontein.de>
* add module name, link to issue and link to PR to changelog
Co-authored-by: Felix Fontein <felix@fontein.de>
* Use list comprehension.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2942eda8e0)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
nsupdate: fix 'index out of range' error when changing NS records (#8614)
* nsupdate: fix 'index out of range' error when changing NS records
* add clog fragment
* Update changelogs/fragments/8614-nsupdate-index-out-of-range.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9dd2b71d04)
Co-authored-by: Art Win <art@make.lv>
redfish_utils: fix language check (#8613)
* redfish_utils: fix language check
* add fragment file
* typo
* improve words
* improve words based on suggestion
---------
Co-authored-by: Mike Koreneff <mkoreneff@hudson-trading.com>
(cherry picked from commit ca8ecb1df1)
Co-authored-by: Mike Koreneff <mkoreneff@users.noreply.github.com>
pacman: do not fail if there is nothing to do (#8514)
Do not fail if there is nothing to do.
(cherry picked from commit df7fe19bbe)
Co-authored-by: Felix Fontein <felix@fontein.de>
Fix OpenNebula inventory crash when NIC does not have IP (#8489)
* Fix OpenNebula inventory crash when NIC does not have IP
Match IPv6 behaviour.
When a NIC does not have an IP:
File "ansible/inventory/manager.py", line 292, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "ansible-cm/plugins/inventory/opennebula.py", line 263, in parse
self._populate()
File "ansible-cm/plugins/inventory/opennebula.py", line 226, in _populate
servers = self._retrieve_servers(filter_by_label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "ansible-cm/plugins/inventory/opennebula.py", line 210, in _retrieve_servers
server['v4_first_ip'] = self._get_vm_ipv4(vm)
^^^^^^^^^^^^^^^^^^^^^
File "ansible-cm/plugins/inventory/opennebula.py", line 154, in _get_vm_ipv4
return net['IP']
* Update to call to match IPv6 and add changelog fragment
* Update changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3716187fc3)
Co-authored-by: Tom Paine <github@aioue.net>
git_config: fix state=absent if value is present (#8452)
* Fix state=absent if value is present.
* Update changelog fragment.
(cherry picked from commit 2a3819a696)
Co-authored-by: Felix Fontein <felix@fontein.de>
fix(opentelemetry): remove request from the logs (#8430)
* fix(opentelemetry): remove request from the logs
* add changelog
* filter by task
* add new bugfix
* rename
* support legacy and shortcat ansible tasks
* Update plugins/callback/opentelemetry.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5041ebe5b2)
Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Fix the homebrew module failing because of warnings (#8406)
Instead of checking if there is an error message, which can also be a
warning, we now check the return code.
This commit fixes#8229#7044
Co-authored-by: Strahinja Kustudic <strahinjak@nordeus.com>
(cherry picked from commit 43cb5a0d54)
Co-authored-by: Strahinja Kustudic <kustodian@gmail.com>
keycloak_client: avoid TypeError if `result["attributes"]` is a list (#8403)
* fix(keycloak_client): avoid TypeError if attributes is a list
As sanitize_cr might be executed after normalise_cr, result['attributes'] can be of type list and we
run into:
TypeError: list indices must be integers or slices, not str
* Update changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 572caeaa39)
Co-authored-by: Thomas Bach <63091663+thomasbach-dev@users.noreply.github.com>
* From now on automatically add period to new plugins in changelog, and use FQCNs (#8392)
From now on automatically add period to new plugins in changelog, and use FQCNs.
(cherry picked from commit 704a5acc63)
* Update changelogs.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
fix(opentelemetry): close span even if no logs are sent (#8367)
* fix(opentelemetry): close span even if no logs are sent
* changelog
(cherry picked from commit 03240ad7dc)
Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
bug(lookup/merge_variables): Fix rendering foreign variables (#8303)
* manually prepare variables of foreign host including hostvars property
* render variables from context of current host
* add integration test for cross host merge
* lint fixes
* adjust cross host merge unit tests to provide a tiny bit of the HostVars Class API
* add license information
* lint
* add changelog fragment
* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml
Okay
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml
Okay
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml
Okay
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
* rename _HostVars to HostVarsMock
* removing unnecessary task
---------
Co-authored-by: Gitlab CI <alexander.petrenz@posteo.de>
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
(cherry picked from commit 136419c5c0)
Co-authored-by: Alexander Petrenz <petrenz.a@gmail.com>
apt_rpm: add new states 'latest' and 'present_not_latest' (#8247)
* Add new states 'latest' and 'present_not_latest'.
* Improve documentation.
(cherry picked from commit 211688ef1b)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add accept-new as valid option for ssh_config host key checking (#8257)
* Add accept-new as valid option for host key checking
* Add changelog fragment for #8257
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit af1c5dd785)
Co-authored-by: Maxopoly <max@dermax.org>
Add an explicit `select` option to `portage` module (#8236)
* Add an explicit `select` option to `portage` module
This is a fix for #6226
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Default `select` option to None, making it more retrocompatible
* Add changelog fragment for the PR
* Update changelogs/fragments/8236-portage-select-feature.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit be11d0d409)
Co-authored-by: Thomas Langé <thomas.lange.oss@gmail.com>
bitwarden_secrets_manager: implement rate limit retry with backoff (#8238)
* bitwarden_secrets_manager: implement rate limit retry with backoff (#8230)
* bitwarden_secrets_manager: add changelog fragment for 90cd2d61 (#8238)
* bitwarden_secrets_manager: clarify "Too many requests" is an error condition (#8238)
* bitwarden_secrets_manager: avoid an extra _run_with_retry execution after the last (very long) delay
* bitwarden_secrets_manager: changelog fragment key and reference issue url
(cherry picked from commit a05a5982a6)
Co-authored-by: Matt Adams <matt@4dk.me>