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>
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)
Co-authored-by: nbragin4 <139489942+nbragin4@users.noreply.github.com>
keycloak_user_rolemapping: docs fixes and examples about mapping realm roles in keycloak_user_rolemapping (#10953)
* Fix docs and add examples about mapping realm roles for keycloak_user_rolemapping.py module (#7149)
* fix sanity tests
(cherry picked from commit 258e65f5fc)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
Add support for client auth in Keycloak cllient secrets module (#10933)
* keycloak: add client authentication support for client_secret
* readd ['token', 'auth_realm']
---------
(cherry picked from commit c850e209ab)
Signed-off-by: Marius Bertram <marius@brtrm.de>
Co-authored-by: Marius Bertram <marius@brtrm.de>
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>
Add __init__.py to work around ansible-test/pylint bug (#10926)
Add __init__.py to work around ansible-test/pylint bug.
(cherry picked from commit 9dedd77459)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add stable-2.20 to CI, bump version of devel branch (#10923)
Add stable-2.20 to CI, bump version of devel branch.
(cherry picked from commit 8472dc22ea)
refactor dict from literal list (#10891)
* refactor dict from literal list
* add changelog frag
(cherry picked from commit 5f471b8e5b)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pacman: link to yay bug report (#10887)
Link to yay bug report.
(cherry picked from commit 68b8345199)
Co-authored-by: Felix Fontein <felix@fontein.de>
github_app_access_token: add support for GitHub Enterprise Server (#10880)
* github_app_access_token: add support for GitHub Enterprise Server (#10879)
Add option to specify api endpoint for a GitHub Enterprise Server.
If option is not specified, defaults to https://api.github.com.
* refactor: apply changes as suggested by felixfontein
* docs: fix nox check error and type-o
nox check: plugins/lookup/github_app_access_token.py:57:1: DOCUMENTATION: error: too many blank lines (1 > 0) (empty-lines)
* refactor: apply changes as suggested by russoz
* refactor: apply changes as suggested by felixfontein
(cherry picked from commit 30894f4144)
Co-authored-by: Chris <chodonne@gmail.com>
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>
[doc] update requirements for all consul modules/lookups (#10863)
* [doc] update requirements for consul_kv module
python-consul has been unmaintained for a while. It uses a legacy way of passing the Consul token when sending requests. This leads to warning messages in Consul log, and will eventually break communication. Using the maintained py-consul library ensures compatibility to newer Consul versions.
* [doc] replace all python-consul occurrences with py-consul
* [fix] tests and possible pip server errors
* [chore] remove referencce to python-consul in comment
---------
(cherry picked from commit 9d0150b2c3)
Co-authored-by: Sebastian Damm <SipSeb@users.noreply.github.com>
Co-authored-by: Sebastian Damm <sebastian.damm@pascom.net>
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>
timezone: mention that Debian 13 also needs util-linux-extra (#10830)
Mention that Debian 13 also needs util-linux-extra.
(cherry picked from commit 2bf8ae88be)
Co-authored-by: Felix Fontein <felix@fontein.de>
homebrew: Support old_tokens and oldnames in homebrew package data (#10805)
* homebrew: Support old_tokens and oldnames in homebrew package data
Fixes#10804
Since brew info will accept old_tokens (for casks) and oldnames (for formulae) when provided by the homebrew module "name" argument, the module also needs to consider thes old names as valid for the given package. This commit updates _extract_package_name to do that.
All existing package name tests, including existing tests for name aliases and tap prefixing, have been consolidated with new name tests into package_names.yml.
* Added changelog fragment.
* homebrew: replace non-py2 compliant f-string usage
* code formatting lint, and py2 compatibility fixes
* homebrew: added licenses to new files, nox lint
* Update plugins/modules/homebrew.py
use str.format() instead of string addition
* Update tests/integration/targets/homebrew/tasks/casks.yml
* Update tests/integration/targets/homebrew/tasks/package_names_item.yml
* Update tests/integration/targets/homebrew/tasks/formulae.yml
* Fixes for performance concerns on new homebrew tests.
1) tests for alternate package names are commented out in main.yml.
2) the "install via alternate name, uninstall via base name" test
case was deemed duplicative, and has been deleted .
3) minor fixes to use jinja2 "~" for string concat instead of "+"
* Fix nox lint
---------
(cherry picked from commit 833e6e36de)
Co-authored-by: brad2014 <brad2014@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Speed up tests in android_sdk module (#10818)
changed the dependency that is used to test the functionality in android_sdk module. The previous dependency was ~100MB, the current one is ~6MB. This should speed up the tests a bit and reduce the traffic.
(cherry picked from commit d2e2395ae3)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
gitlab_protected_branch: refactor, add `allow_force_push`, `code_owner_approval_required` (#10795)
* gitlab_protected_branch: fix typo
* gitlab_protected_branch: lump parameters into options dictionary
Hardcoding parameter lists gets repetitive. Refactor this module to use
an options dictionary like many other gitlab_* modules. This makes it
cleaner to add new options.
* gitlab_protected_branch: update when possible
Until now, the module deletes and re-creates the protected branch if any
change is detected. This makes sense for the access level parameters, as
these are not easily mutated after creation.
However, in order to add further options which _can_ easily be updated,
we should support updating by default, unless known-immutable parameters
are changing.
* gitlab_protected_branch: add `allow_force_push` option
* gitlab_protected_branch: add `code_owner_approval_required` option
* gitlab_protected_branch: add issues to changelog
* Update changelog.
---------
(cherry picked from commit f772bcda88)
Co-authored-by: David Phillips <phillid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>