omapi_host: fix bytes vs. str confusion (#11001)
* omapi_host: fix bytes vs. str confusion
After an update of the control node from Debian
bookworm to trixie, the omapi_host module fails to
work with the error message:
Key of type 'bytes' is not JSON serializable by the
'module_legacy_m2c' profile.
https://github.com/ansible/ansible/issues/85937 had the
same error, but the fix is a bit more intricate here
because the result dict is dynamically generated from
an API response object.
This also fixes unpacking the MAC and IP address and
hardware type, which were broken for Python3.
* Merge suggestion for changelog fragment
* do not unpack_ip twice
Noticed by Felix Fontein <felix@fontein.de>
* mention py3k in changelog fragment, too
---------
(cherry picked from commit eb6337c0c9)
Co-authored-by: mirabilos <tg@mirbsd.org>
Co-authored-by: Felix Fontein <felix@fontein.de>
keycloak_user: mark credentials[].value as no_log=True (#11005)
Mark credentials[].value as no_log=True.
(cherry picked from commit 54af64ad36)
Co-authored-by: Felix Fontein <felix@fontein.de>
fix(pritunl_user): improve resilience to null or missing user parameters (#10955)
* fix(pritunl_user): improve resilience to null or missing user parameters
* added changelog fragment - 10955
* standardize 10955 changelog fragment content
* simplify user params comparison
* simplify list fetch
* simplify remote value retrieval
---------
(cherry picked from commit e84f59a62d)
Co-authored-by: David Jenkins <david.jenkins@twosixtech.com>
Co-authored-by: djenkins <djenkins@twosix.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
onepassword: extend CLI class initialization with additional parameters (#10965)
* onepassword: extend CLI class initialization with additional parameters
* add changelog fragment 10965-onepassword-bugfix.yml
* Update changelogs/fragments/10965-onepassword-bugfix.yml
---------
(cherry picked from commit ce0d06b306)
Co-authored-by: Matthew <mjmjelde@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
[stable-11] terraform: Fix bug when None values aren't processed correctly (#10961) (#11003)
terraform: Fix bug when None values aren't processed correctly (#10961)
* terraform: Fix bug when None values aren't processed correctly
Just found that i can't pass null values as complex variables into terraform using this module, while i can do that with terraform itself. Fixed undesired behavior.
* chore: changelog fragment 10961-terraform-complexvars-null-bugfix.yaml
* Update changelogs/fragments/10961-terraform-complexvars-null-bugfix.yaml
* Update plugins/modules/terraform.py
* Update plugins/modules/terraform.py
* Fix condition to check for None type in terraform.py
---------
(cherry picked from commit af8c4fb95e)
(cherry picked from commit 9cb619ff6c)
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: nbragin4 <139489942+nbragin4@users.noreply.github.com>
fix(modules/gitlab_runner): Fix exception in check mode on new runners (#10918)
* fix(modules/gitlab_runner): Fix exception in check mode on new runners
When a new runner is added in check mode, the role used to throw an
exception. Fix this by returning a valid runner object instead of a
boolean.
Fixes#8854
* docs: Add changelog fragment
(cherry picked from commit 7e666a9c31)
Co-authored-by: carlfriedrich <carlfriedrich@posteo.de>
github_deploy_key: make sure variable exists before use (#10857)
Make sure variable exists before use.
(cherry picked from commit 68684a7a4c)
Co-authored-by: Felix Fontein <felix@fontein.de>
yaml cache plugin: make compatible with ansible-core 2.19 (#10852)
Make compatible with ansible-core 2.19.
(cherry picked from commit 648ff7db02)
Co-authored-by: Felix Fontein <felix@fontein.de>
Fix keycloak sub-group search (#10840)
* fix bug in missing realm argument when searching for groups
* MR change fragment
* 39+1=40
(cherry picked from commit b865bf5751)
Co-authored-by: Jakub Danek <danekja@users.noreply.github.com>
Force Content-type header to application/json if is_pre740 is false (#10832)
* Force Content-type header to application/json if is_pre740 is false
* Remove response variable from fail_json module
* Add a missing blank line to match pep8 requirement
* Add changelog fragment of issue #10796
* Rename fragment section
* Improve fragment readability
---------
(cherry picked from commit 0f23b9e391)
Co-authored-by: X <2465124+broferek@users.noreply.github.com>
Co-authored-by: ludovic <ludovic.petetin@aleph-networks.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Keycloak role fix changed status (#10829)
* Exclude aliases before comparison
* add test
* fragment
* Update changelogs/fragments/10829-fix-keycloak-role-changed-status.yml
---------
(cherry picked from commit 7c40c6b6b5)
Co-authored-by: desand01 <desrosiers.a@hotmail.com>
Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
Co-authored-by: Felix Fontein <felix@fontein.de>
kdeconfig: add support for kwriteconfig6 (#10751)
* kdeconfig: add support for kwriteconfig6
Rationale:
With a minimal install of KDE Plasma 6, the kdeconfig module would systematically fail with the following error: `kwriteconfig is not installed.`
In this configuration, kwriteconfig6 is the only version of kwriteconfig installed, and the kdeconfig module did not not find it.
Fixes#10746
* Add changelog fragment
* Update changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml
---------
(cherry picked from commit d6ad9beb58)
Co-authored-by: Thibault Geoffroy <33561374+nebularnoise@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
monit: handle arbitrary error status (#10743)
* handle arbitrary error status
* add changelog fragment
* mock module in test
* Update changelogs/fragments/10743-monit-handle-unknown-status.yml
---------
(cherry picked from commit 469e557b95)
Co-authored-by: Simon Kelly <skelly@dimagi.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
pids: avoid type error if name is empty (#10688)
Avoid type error if name is empty.
(cherry picked from commit ceba0cbedb)
Co-authored-by: Felix Fontein <felix@fontein.de>
apache2_module: updated cgi action conditions (#10423)
* apache2_module: updated cgi action conditions
Only the activation of the cgi module in threaded mode should be a
restriction due to apache2 limitations, not the deactivation.
Especially when the cgi module isn't enabled yet at all. Fixes#9140
* bug(fix): apache2_module fails to disable cgi module
* Update changelog fragment.
---------
(cherry picked from commit 735a066d92)
Co-authored-by: Daniel Hoffend <dh@dotlan.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
json_query: extend list of type aliases for compatibility with ansible-core 2.19 (#10539)
* Extend list of type aliases for json_query.
* Improve tests.
---------
(cherry picked from commit 3de073fb6f)
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Disable pipelining for doas and machinectl on ansible-core 2.19+ (#10537)
Disable pipelining for doas and machinectl.
(cherry picked from commit 9a29622584)
irc: fix wrap_socket() call when validate_certs=true and use_tls=true (#10491)
Fix wrap_socket() call when validate_certs=true and use_tls=true.
(cherry picked from commit de0618b843)
Co-authored-by: Felix Fontein <felix@fontein.de>
Fix ansible-core 2.19 deprecations (#10459)
Do not return warnings.
(cherry picked from commit ee7830667a)
Co-authored-by: Felix Fontein <felix@fontein.de>
github_release - support multiple type of tokens (#10339)
* Support multiple type of tokens
* Add missing spaces around operator.
* Add changelog fragments.
* fix logic, missing NOT
* Update changelogs/fragments/10339-github_app_access_token.yml
---------
(cherry picked from commit e5b37c3ffd)
Co-authored-by: Bruno Lavoie <bl@brunol.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
incus_connection: Improve error handling (#10349)
Related to #10344
This tweaks the error handling logic to work with more versions of Incus
as well as catching some of the project and instance access errors.
The full context (instance name, project name and remote name) is now
included so that the user can easily diagnose access problems.
(cherry picked from commit 4195cbb364)
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Co-authored-by: Stéphane Graber <stgraber@stgraber.org>
Inventory plugins: remove deprecated disable_lookups parameter (which was set to its default anyway) (#10271)
* Remove default value for keyword argument that is deprecated since ansible-core 2.19.
* Add changelog fragment.
(cherry picked from commit 40fb0f0c75)
Co-authored-by: Felix Fontein <felix@fontein.de>