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>
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>
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>
Fail if Slack API response is not OK with error message (#9198)
* Fails if slack api return is not ok
* add changelog
* show all error
* add doc
* Update plugins/modules/slack.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f2dbe08d0e)
Co-authored-by: Matthieu Bourgain <aohzan@gmail.com>
Add backup module for proxmox (#9197)
* Defined configuration variables, main backup function todo
* Defined configuration variables, main backup function todo
* wip
* permission checks and basic flow done, final request missing
* ansible-test and unit test open
* Improve documentation
* fix pep8 errors
* remove f-string and fix bugs through manual testing
* longer full example
* improve docs
* error message for fail + timeout
* move sleep location
* remove residual debugger
* include newline for better readability
* more linting errors fixed
* Include UPIDs as return value
* Output logs as comma separated value, move exception and create new abstraction for api calls
* pretter logs
* Update project to final version
* Remove accidential placeholder for integration test
* Fix missing explizit string in docstring
* Reorder imports below docstrings
* remove type annotations and fix indendation of options dict
* prettier idendation and aplhabetic ordering of options dict
* aplhabetic ordering of docstring options
* Remove the rest of type hinting as well :(
* fix version
* improve documentation
* add change detection mode
* refactor list comprehension to filter function
* remove storage availability check for node
* refactor to quotation marks
* Fix trailing newline and incorrect RV usage
* rollback filter plugin
* Remove action_group reference and add proxmox_backup to meta/runtime.yml
* Include note about missing idempotency
---------
Co-authored-by: IamLunchbox <r.grieger@hotmail.com>
(cherry picked from commit c38b474982)
Co-authored-by: IamLunchbox <56757745+IamLunchbox@users.noreply.github.com>
Add the options apply_live to rpm_ostree_pkg (#9167)
rpm_ostree_pkg: add support for `apply_live` and return value `needs_reboot` #9167
(cherry picked from commit 420f78de2f)
Co-authored-by: shios86 <17804953+shios86@users.noreply.github.com>
flatpak: force locale language to be C (#9187)
* flatpak: force locale langauge to be C
* add changelog frag
(cherry picked from commit f828bdee22)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pipx/pipx_info: add return value version (#9180)
* pipx/pipx_info: add return value version
* add changelog frag
(cherry picked from commit a9449ccc2e)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
gio_mime: fix bug when looking for version (#9171)
* gio_mime: fix bug when looking for version
* add changelog frag
(cherry picked from commit 152339a8f9)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
modprobe: document when 'persistent' was added. (#9144)
This is based on `git tag --contains
29f5033737a7fd86349ff3daab7d7ee7db66ad00`.
(cherry picked from commit 54194ccb24)
Co-authored-by: Max Gautier <mg@max.gautier.name>
dnf_config_manager: use --assumeyes when changing state (#9124)
* dnf_config_manager: use --assumeyesm when changing state
* changelog fragment
* update tests
* format fix
* Update changelogs/fragments/9124-dnf_config_manager.yml
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 36c7e56005)
Co-authored-by: Andrew Hyatt <4400272+ahyattdev@users.noreply.github.com>
alternatives: add support for "family" parameter (#9096)
* alternatives: added parsing and setting of 'family' for an alternative
* alternatives: added checks for path nullability
* alternatives: added idempotence when setting alternative using family
* alternatives: added family to diff mode
* alternatives: added tests for family
* alternatives: updated documentation and examples
* alternatives: added constraints for 'path' and 'family' parameters.
in any invariants at least one of the parameters must be specified
* alternatives: added changelog fragment
* removed unnecessary check
* added version
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 523439ab62)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
launchd: Add plist option (#9102)
This allows the module to be used with services such as com.openssh.sshd, when
the name of the plist file doesn't match the service name.
fixes#5932
(cherry picked from commit 737717d015)
Co-authored-by: Alex Willmer <alex@moreati.org.uk>
redfish_command: add update_custom_oem options (#9123)
* redfish_command: add update_custom_oem options
The Multipart HTTP push update implementation allows OEM specific
parts that are not part of the `UpdateParameters` body part, but a
separate one. This OEM part shall start with `Oem` and is optional.
The OEM part implementation is specified in the Redfish spec point
12.6.2.2 [1].
Right now, the implementation will only support JSON as MIME Type,
although it is not limited to JSON.
[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.21.0.html#oem
Signed-off-by: Tan Siewert <tan@siewert.io>
* redfish_command: add option to set custom mime type
The implementation of using a custom MIME type will also remove the
default JSON type.
Converting the payload to JSON or any other type is up to the user.
Signed-off-by: Tan Siewert <tan@siewert.io>
* redfish_command: apply docs changes from review
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* redfish_command: add mime type option to changelog
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Tan Siewert <tan@siewert.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1f786a6171)
Co-authored-by: Tan Siewert <tom@siewert.io>
homebrew_cask: add + to valid cask chars (#9128)
* fix(homebrew_cask): add + to valid cask chars
* docs(homebrew_cask): add changelog fragment
Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>
* fix(homebrew_cask): add PR link to changelog fragment
Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>
* fix: add period to end of changelog fragment
Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>
* fix: remove blank line from changelog fragment
Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>
* fix: changelog fragment formatting
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Update changelogs/fragments/9128-homebrew_cask-name-regex-fix.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9596995ffc)
Co-authored-by: dronenb <dronenb@users.noreply.github.com>
keycloak_client: remove code that turns attributes dict into list (#9077)
* remove code that turns attributes dict into list
* add changelog fragment
* Update changelogs/fragments/9077-keycloak_client-fix-attributes-dict-turned-into-list.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 62cb6087b5)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
keycloak_clientscope: remove code turning attributes dict into list (#9082)
* remove code turning attributes dict into list
* add changelog fragment
(cherry picked from commit d27d86ecb1)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>