xfconf/xfconf_info: add return value version (#9226)
* xfconf/xfconf_info: add return value version
* add changelog frag
* adapt test to helper improvements
* rollback copyright update
* replace tab with spaces in test yamls
(cherry picked from commit b429e8a2cf)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Add action group for keycloak (#9284)
* Create group for keycloak
This will allows keycloak authentication details to be set as a module_defaults rather than repeated on each task
* add documentation to keycloak modules to note creation of action_group
* add changelog for keycloak action_group creation
* exclude keycloak_realm_info from action group, as it does not share same set of base parameters
* fix formatting on changelog entry for adding Keycloak action group
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 28f36ae25c)
Co-authored-by: Chris Northwood <cnorthwood@users.noreply.github.com>
become plugins: use f-strings (#9319)
* become plugins: use f-strings
* add changelog frag
(cherry picked from commit c7edf0a87b)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
CI: Arch Linux updated to Python 3.13 (#9310)
* Arch Linux updated to Python 3.13.
* Skip lmdb_kv lookup on Arch Linux.
Ref: https://github.com/jnwatson/py-lmdb/issues/362
(cherry picked from commit 2adcc34dd5)
Co-authored-by: Felix Fontein <felix@fontein.de>
Polish botmeta extra sanity test and make it work without warnings on Python 3.13 (#9297)
Polish botmeta and make it work without warnings on Python 3.13.
(cherry picked from commit d2088ccfcc)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add android sdk module (#9236)
* adds simple implementation of adding and removing android sdk packages
* adds package update
* adds simple installed packages parsing
* moves parsing logic to a separate class
* adds absent state for sdkmanager packages and setup for tests
* adds output for installing and removing packages
* removes version from Package object since it is not possible to specify version for a package while using sdkmanager
* adds 'latest' state
* adds tests
* fixes crash when sdkmanager is invoked from python with LC_ALL=C
* fixes latest state
* adds sdk_root parameter
* adds channel parameter
* simplifies regexps, removes unused named groups
* minor refactoring of sdkmanager parsing
* adds java dependency variable for different distributions
* adds RETURN documentation
* adds check for nonexisting package
* adds check for non-accepted licenses
* removes excessive methods from sdkmanager
* removes unused 'update' module parameter, packages may be updated using 'latest' state
* minor refactoring
* adds EXAMPLES doc section
* adds DOCUMENTATION section and license headers
* fixes formatting issues
* removes diff_params
* adds maintainer
* fixes sanity check issues in sdkmanager
* adds java dependency for macos and moves some tests to a separate FreeBSD configuration
* fixes dependencies setup for OSX
* fixes dependencies setup for OSX (2)
* fixes dependencies setup for OSX (3)
* Apply minor suggestions from code review
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* applies code review suggestions
* changes force_lang from C.UTF-8 to auto in sdkmanager (as per discussion https://github.com/ansible-collections/community.general/pull/9236#discussion_r1881114326)
* Revert "changes force_lang from C.UTF-8 to auto in sdkmanager (as per discussion https://github.com/ansible-collections/community.general/pull/9236#discussion_r1881114326)"
This reverts commit 619f28dd58.
* fixes some more comments from review
* minor sanity issue fix
* uses the 'changed' test instead of checking the 'changed' attribute
* adds 'accept_licenses' parameter. Installation is now performed independently for each package specified.
* removes "Accept licenses" task from examples
* fixes docs sanity issues
* applies minor suggestions from code review
* fixes regexps. The previous version didn't match versions like "32.1.0 rc1". Also, this allows to simplify the parsing logic as there is no need to skip table headers anymore.
* renamed sdkmanager.py to android_sdkmanager.py
* applies minor suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* updates BOTMETA
* reordered BOTMETA
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2b2872f0ef)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
Clean up Proxmox API token handling by stripping whitespace and forma… (#9228)
* Clean up Proxmox API token handling by stripping whitespace and formatting the token string
* Update plugins/inventory/proxmox.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/proxmox.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/9228-fix-issue-header.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/9228-fix-issue-header.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c5855d1a58)
Co-authored-by: xilmen <romain.scha@gmail.com>
random_words integration tests: avoid test failure due to valid result (#9271)
Avoid test failure due to valid result.
(cherry picked from commit 50b25f8c01)
Co-authored-by: Felix Fontein <felix@fontein.de>
Drop myself from team_suse (#9259)
I no longer work with ansible and/or SUSE so drop me from the team.
(cherry picked from commit 65827bdc96)
Co-authored-by: Thomas Bechtold <thomasbechtold@jpberlin.de>
CI: Fix some issues pointed out by zizmor (#9250)
Fix some issues pointed out by zizmor.
(cherry picked from commit f6dae1fc4d)
Co-authored-by: Felix Fontein <felix@fontein.de>
sysrc: add another exclusion for ezjail (#9243)
Add another exclusion.
(cherry picked from commit 9df4ef9a9c)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add the accumulate filter (#9133)
* Add the accumulate filter
- Add myself as a maintainer for it.
- Some integration tests.
* accumulate: fix documentation and add test aliases
The aliases file was copied over from
tests/integrations/targets/filter_dict/aliases as the documentation[1]
suggests to use the same group as existing similar tests.
[1]: https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/integration-aliases.html
Suggested-by: Felix Fontein <felix@fontein.de>
* accumulate: documentation: markup consistency with other plugins
Suggested-by: Felix Fontein <felix@fontein.de>
Suggested-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* filter/accumulate: Validate input is a Sequence
Accepting arbitrary iterables might lead to surprising behavior so we
are stricter on what we accept in the filter.
Relaxing those requirements is easier than retrofitting them, in terms
of backwards compatibility.
Suggested-by: Felix Fontein <felix@fontein.de>
Signed-off-by: Max Gautier <mg@max.gautier.name>
* filter/accumulate: Document the behavior with a string
Signed-off-by: Max Gautier <mg@max.gautier.name>
---------
Signed-off-by: Max Gautier <mg@max.gautier.name>
(cherry picked from commit a789bd128f)
Co-authored-by: Max Gautier <mg@max.gautier.name>
opkg: deprecate value "" for force (#9172)
* opkg: deprecate value "" for force
* fix sanity plus wording
* add comments for future removal
* add changelog frag
(cherry picked from commit d826dd1c88)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Add SR-IOV support to nmcli module (#9168)
* Add SR-IOV support to nmcli module (#9168)
* Add SR-IOV support to nmcli module (#9168)
Fixes
* Add SR-IOV support to nmcli module (#9168)
Add test
* Update changelogs/fragments/9168-nmcli-add-sriov-parameter.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Populate sriov options
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 82462e407e)
Co-authored-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>
Greatly speed up homebrew module when multiple packages are passed in the `name` key (#9181)
* Increase test coverage and assert output more strictly
* Remove unused `_current_package_is_installed_from_head`
* Remove `un/changed_count` and infer from un/changed_pkgs length
* Track `installed` & `outdated` package state once
* Validate package names beforehand
* Install packages in 1 brew call instead of N
This also has the side effect of fixing the check message so that it prints every packages that will be installed instead of only the first one.
* Uninstall packages in 1 brew call instead of N
* Link packages in 1 brew call instead of N
* Unlink packages in 1 brew call instead of N
* Upgrade packages in 1 brew call instead of N
* Remove dangling checks
* Remove `_status` method and directly return the tuple
* Add changelog fragment
* Fix invalid format string (nice catch pylint!)
* Update changelogs/fragments/9181-improve-homebrew-module-performance.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update brew info parsing for casks
* Update changelogs/fragments/9181-improve-homebrew-module-performance.yml
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit fddccea940)
Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>
Add decompress module (#9175)
* adds simple implementation of `decompress` module
* adds simple test, fixes src and dest arg types
* minor refactoring
* adds support for common file operations
adds integration test for gz decompressing
* makes tests parametrized to test all supported compression formats
* checks that target file exists
* writes to decompressed file now uses atomic_move
* adds idempotency for decompression
* refactoring, removed classes
* adds support for check mode
* adds check for destination file. If it exists and it is a directory, the module returns error
* refactoring, moves code to a class. Also, simplifies tests (now only tests related to the module core functionality run as parametrized, tests for idempotency and check mode run only for one format)
* adds 'remove' parameter that deletes original compressed file after decompression
* adds documentation
* fixes bug with 'remove' parameter in check mode
* makes dest argument not required. Dest filename now can be produced from the src filename
* adds dest to output
* updates the documentation, adds "RETURN" block
* fixes test
* adds support for python2
* removes some of the test files that can be generated during testing. Adds copyright header to test files
* adds maintainer
* apply minor suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* fixes code review comments (idempotency issue with non existing src, existing dest and remove=true; fixes the issue and adds test)
* refactors the module to use ModuleHelper
* refactors lzma dependency manual check to use 'deps.validate'
* minor fix
* removes registered handlers check
* minor refactoring
* adds aliases
* changes setup for tests
* tests: ignores macos and fixes tests for FreeBSD
* tests: reverts ignore for macos and fixes issue with centos7
* tests: adds liblzma dependency for python2
* tests: adds backports.lzma
* fixes bz2 decompression for python2
* tests: install xz for osx
* tests: install xz for osx (2)
* fixes code review comments
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 41b6a281e1)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>