[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>
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>
random_string: Specify seed while generating random string (#10710)
* random_string: Specify seed while generating random string
* Allow user to specify seed to generate random string
Fixes: #5362
* Apply suggestions from code review
---------
(cherry picked from commit b5a2c5812c)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
ssh_config tests: remove paramiko version restriction (#10732)
Remove paramiko version restriction for ssh_config tests.
(cherry picked from commit 5ee02297b0)
Co-authored-by: Felix Fontein <felix@fontein.de>
pacman: temporary disable yay test (#10674)
Temporary disable pacman yay test.
(cherry picked from commit dfc2a54d16)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: Make sure to install Java in Debian Bullseye (#10653)
Make sure to install Java in Debian Bullseye.
(cherry picked from commit eb5708a125)
Co-authored-by: Felix Fontein <felix@fontein.de>
Keycloak realm add support for some missing options (#10538)
* First commit
* fixe
* changelog
---------
(cherry picked from commit 85f6a07b19)
Co-authored-by: desand01 <desrosiers.a@hotmail.com>
Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
Keycloak idp well known url support (#10527)
* first commit
* add and fixe test
* add example
* fragment and sanity
* sanity
* sanity
* Update plugins/modules/keycloak_identity_provider.py
* Update changelogs/fragments/10527-keycloak-idp-well-known-url-support.yml
---------
(cherry picked from commit 7ffeaaa16d)
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>
lvm_pv_move_data: new module (#10416)
* Added lvm_pv_move_data module
* Removed trailing whitespace
* Decreased loop devices file size
* Remove test VG if exists
* Force remove test VG if exists
* Renamed test VG and LV names
* Updated assert conditions
* Added .ansible to .gitignore
* Force extending VG
* Wiping LVM metadata from PVs before creating VG
* Clean FS, LV, VG and PSs before run
* Migrated to CmdRunner
* Added more detailed info in case of failure and cosmetic changes
* Remove redundant params from CmdRunner call
* Updates the RETURN documentation block to properly specify the return type
of the 'actions' field:
- Changes return status from 'always' to 'success'
- Adds missing 'elements: str' type specification
(cherry picked from commit e91e2ef6f8)
Co-authored-by: Klention Mali <45871249+klention@users.noreply.github.com>
diy callback: add test for on_any_msg (#10550)
Add test for on_any_msg.
(cherry picked from commit ac4aca2004)
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>
Fix no longer valid constructs in tests (#10543)
Fix no longer valid constructs in tests.
(cherry picked from commit 7298f25fe0)
Co-authored-by: Felix Fontein <felix@fontein.de>
sysrc: refactor (#10417)
* sysrc: refactor
* sysrc: refactor changelog fragment
* sysrc: forgot the os import
* sysrc: update test to edit the correct file
* sysrc: Added copyright info to the test conf file
* sysrc: Added full copyright info to the test conf file
* sysrc: Detect permission denied when using sysrc
* sysrc: Fixed the permission check and 2.7 compatibility
* sysrc: Fix typo of import
* sysrc: Fix err.find check
* sysrc: Add bugfixes changelog fragment
* sysrc: Use `StateModuleHelper`
* sysrc: updated imports
* sysrc: remove re import and set errno.EACCES on the OSError
* sysrc: format code properly
* sysrc: fix Python 2.7 compatibility and set changed manually
* sysrc: add missing name format check
Also use `self.module.fail_json` through out
* sysrc: Removed os import by accident
* sysrc: updated per review, and the way the existing value is retrieved
(cherry picked from commit 44ca366173)
Co-authored-by: David Lundgren <dlundgren@syberisle.net>
CI: Bump Alpine 3.21 to 3.22, Fedora 41 to 42, and FreeBSD 14.2 to 14.3 (#10462)
* Bump Alpine 3.21 to 3.22, Fedora 41 to 42, RHEL 9.5 to 9.6, and FreeBSD 14.2 to 14.3.
Add old versions to stable-2.19 if not present yet.
* Add some expected skips.
* Add more restrictions.
* Another try for Android tests.
* Another try.
* Another try.
(cherry picked from commit b458ee85ce)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: Add yamllint for YAML files, plugin/module docs, and YAML in extra docs (#10279)
* Add yamllint to CI.
* Fix more YAML booleans.
(cherry picked from commit 7e66fb052e)
Co-authored-by: Felix Fontein <felix@fontein.de>
jenkins_credentials: new module to manage Jenkins credentials (#10170)
* Added Jenkins credentials module to manage Jenkins credentials
* Added Jenkins credentials module to manage Jenkins credentials
* Added import error detection, adjusted indentation, and general enhancements.
* Added py3 requirement and set files value to avoid errors
* Added username to BOTMETA. Switched to format() instead of f strings to support py 2.7, improved delete function, and added function to read private key
* Remove redundant message
* Replaced requests with ansible.module_utils.urls, merged check domain and credential functions, and made minor adjustments to documentation
* Adjusted for py 2.7 compatibility
* Replaced command with state.
* Added managing credentials within a folder and made adjustments to documentation
* Added unit and integration tests, added token managament, and adjusted documentation.
* Added unit and integration tests, added token management, and adjusted documentation.(fix)
* Fix BOTMETA.yml
* Removed files and generate them at runtime.
* moved id and token checks to required_if
* Documentation changes, different test setup, and switched to Ansible testing tools
* Fixed typos
* Correct indentation.
---------
(cherry picked from commit 52cd104962)
Co-authored-by: YoussefKhalidAli <154611350+YoussefKhalidAli@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
keycloak: add support for client_credentials authentication (#10231)
* add client_credentials authentication for keycloak tasks incl. test case
* support client credentials in all keycloak modules
* Add changelog fragment
* fix typos in required list
* Update changelogs/fragments/10231-keycloak-add-client-credentials-authentication.yml
* revert keycloak url in test environment
---------
(cherry picked from commit f44ca23d7a)
Co-authored-by: divinity666 <65871511+divinity666@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Avoid repeating some code.
* Use new utility added for ansible-core 2.19.0b2.
* Lint.
* Add changelog fragment.
* transform_to_native_types() does not convert map keys.
To catch all tagged strings, we have to recursively walk the data structure then.
* Add test with vaulted string.
* Add zpool module
* Add botmeta
* Use str.format instead of f-strings
* Remove nonlocal usage
* Add check to only pass ashift to zpool add
* Extend ansible_spec and remove unnecessary validation
* Apply suggestions and fix style
* Fix indentation of yaml lists
* Add method to normalize vdevs
Fix role: none in vdevs
* Use CmdRunner instead of run_command
* Fix styling and documentation
* Use str.format instead of f-strings
* Make sure vdevs are only required when state is present
* Add support for loop devices and normalize vdev type
* Add integration tests
* Add missing test dependencies for alpine and redhat
* Skip integration tests on rhel10 until there there packages available
* Use package module for better auto detection of package manager on rhel
* Add copyright header
* Skip tests on rhel and remove redhat install requirements
* Ensure loop devices under /dev exist
* Enable usage of files as pool devices
* Remove disk setup
* Use files as disks
* Apply suggestions
* Fix argument_spec
* github_key: add api_url parameter for GitHub Enterprise support
* github_key: add tests
* Add changelog
* Review fixes: remove test from CI & fix version
---------
Co-authored-by: Aleksei Loginov <aloginov@drwholdings.com>
* add special word '_value' to add_children/set_children in xml module
* changelog fragment added
* Update changelogs/fragments/8437-xml-children-value.yml
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* rebase
* add integration test
* fix result file of integration test
---------
Co-authored-by: z1kk0 <anamleev@phoenixit.ru>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>