Get interfaces for Proxmox LXC containers (#8713)
* Get interfaces for Proxmox LXC containers
* Add changelog
* Don't use bare except
* Update changelog from suggestion
Co-authored-by: Felix Fontein <felix@fontein.de>
* Only lookup interfaces for running containers
* Ignore not implemented status
* Check that key exists in properties dict
* define ignore errors in mock
* Use not in
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 0f59bb7a99)
Co-authored-by: Scott Langendyk <scott@langendyk.com>
keycloak_identity_provider: get cleartext clientsecret (#8735)
* get cleartext `clientSecret` from full realm info
* add mock get_realm call to existing tests; add new no_change_when_present test
* add changelog fragment
* remove blank lines
* Update changelog.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 57e28e5a73)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
Add support for multiple locales in locale_gen (#8682)
* Add support for multiple locales in locale_gen
* Add changelog fragment
* Remove extraneous newlines
* Remove typehints
* Add 'before version' to names documentation
* Remove extraneous comment
* Replace fstring with .format
* Refer to issue in changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
* Clarify version
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add newline between examples
Co-authored-by: Felix Fontein <felix@fontein.de>
* Use semantic markup for locale value
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 158947f5e5)
Co-authored-by: Matthias Kunnen <matthias.kunnen@gmail.com>
keycloak_user_federation: add mapper removal (#8695)
* add unwanted mapper removal
* check for mapper updates in already fetched data to remove unnecessary API calls
* added mock answers and updated request count to match the added delete and fetch after_comp calls
* fix sanity issues
* add changelog fragment
* removed automatic field numbering from format
* replace filter expression with list comprehension
Co-authored-by: Felix Fontein <felix@fontein.de>
* add module name, link to issue and link to PR to changelog
Co-authored-by: Felix Fontein <felix@fontein.de>
* Use list comprehension.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2942eda8e0)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
django_manage: rely on package idempotency to install virtualenv (#8644)
* rely on package idempotency to install virtualenv
* improve os package name logic in integration tests
* add os families debian, redhat
* add os families archlinux
* fix pkg name in archlinux
* improvement from PR
* typo
* Update tests/integration/targets/setup_os_pkg_name/tasks/debian.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/setup_os_pkg_name/tasks/redhat.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9f340861ad)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Fix pylint and pep8 issues exposed by latest ansible-core's ansible-test sanity checks (#8720)
* Remove bad whitespace.
* 'Fixing' various used-before-assignment issues that pylint flagged.
(cherry picked from commit 9a16eaf9ba)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add a keycloak module to query keys metadata (#8605)
* feat(keycloak): module to query keys metadata
* chore: add thomasbach-dev as maintainer in team_keycloak
* test: adding a unit test for keycloak_real_keys_metadata_info module
* fixup! feat(keycloak): module to query keys metadata
(cherry picked from commit 229ed6dad9)
Co-authored-by: Thomas Bach <63091663+thomasbach-dev@users.noreply.github.com>
homebrew: Add support for services functions (#8329)
* Homebrew: Add support for services functions
Fixes#8286.
Add a homebrew.services module for starting and stopping services
that are attached to homebrew packages.
* Address python version compatibility
* Addressing reviewer comments
* Addressing sanity logs
* Address str format issues
* Fixing Python 2.7 syntax issues
* Test alias, BOTMETA, grammar
* Attempt to fix brew in tests
* Address comments by russoz
* Fixing more dumb typos
* Actually uninstall black
* Update version_added in plugins/modules/homebrew_services.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2963004991)
Co-authored-by: Kit Ham <kitizz.devside@gmail.com>
Introduce bootc functionality (#8606)
* introduce bootc functionality
Signed-off-by: Ryan Cook <rcook@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* fix of test
Signed-off-by: Ryan Cook <rcook@redhat.com>
* switch stdout var
Signed-off-by: Ryan Cook <rcook@redhat.com>
* Feedback on NOTE format
Co-authored-by: Felix Fontein <felix@fontein.de>
* addition of trailing comma
Co-authored-by: Felix Fontein <felix@fontein.de>
* addition of trailing comma
Co-authored-by: Felix Fontein <felix@fontein.de>
* incorporating feedback from russoz
Signed-off-by: Ryan Cook <rcook@redhat.com>
* error in stdout
Signed-off-by: Ryan Cook <rcook@redhat.com>
* proper rc checking and status
Signed-off-by: Ryan Cook <rcook@redhat.com>
* linting
Signed-off-by: Ryan Cook <rcook@redhat.com>
* Update version
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Ryan Cook <rcook@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1a8f172186)
Co-authored-by: Ryan Cook <rcook@redhat.com>
Fix pipx tests (#8665)
* fix pipx tests
* enable pipx int tests
* replace ansible-lint with pylint in pipx test
* install jupyter in freebsd
* replace jupyter with mkdocs in pipx test
* adjust installed dependency for mkdocs
* fix pipx_info tests as well
(cherry picked from commit 58f9860ba7)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
CI: Replace FreeBSD 14.0 with 14.1; add 14.0 for stable-2.17 (#8550)
* Replace FreeBSD 14.0 with 14.1; add 14.0 for stable-2.17.
* Skip tests that do not work.
(cherry picked from commit 9e38161400)
Co-authored-by: Felix Fontein <felix@fontein.de>
add test case for cmd_runner_fmt.as_list() (#8541)
(cherry picked from commit 60ba7cab93)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Update CI for ansible-core devel (#8534)
* Update CI for ansible-core devel.
* Uncomment platforms that cause problems.
(cherry picked from commit 86f19cb5d3)
* Finish updating CI (#8537)
* Uncomment TODO entries.
* Exclude some tests that fail or are known to fail.
* Also run extra VM tests on Ubuntu 24.04.
* Fix condition.
* More adjustments.
(cherry picked from commit ecb68aa5d2)
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
`cargo` module install from source in a given directory (#8480)
* Fixes installed version for git/local.
* Support latest determination with local source.
* Adds docs.
* Improves error message.
* Setup for tests.
* Updates copyright.
* Align closer to #7895.
* Adds changelog.
* Check directory exists.
* Stop using format strings.
* Corrects directory arg type in docs.
* Setup test repo dynamically.
* Adds tests.
* Adds version matching tests.
* Update changelog fragment to match PR ID.
* Updates copyright.
* Import new directory tests.
(cherry picked from commit 69b72e4a8e)
Co-authored-by: Colin Nolan <colin-nolan@users.noreply.github.com>
Consul implement agent service and check (#7989)
* Implement agent service and check (#7987)
* implement update of service and check
* update tests
update documentation
* update documentation
* add consul_agent_check/service to action_groups
check if unique_identifier of name is in params to get object
add suggested improvements
* update sanity
* fix sanity issues
update documentation
* fix naming
* fix naming
check if response_data has data
* fix sanity extra-docs
* add as ignore maintainer in BOTMETA.yml
update version_added to 8.4
* fix sanity
* add to maintainers
* Update plugins/modules/consul_agent_check.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/consul_agent_check.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/consul_agent_check.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* update version_added
* if create and update return no object as result we read the object again
* get_first_appearing_identifier check the params for the given identifier and return it to simplify id vs name
* add unique_identifiers as a new property and a method to decide which identifier should be used
* fix sanity
* add self to team consul
remove params with no values
add operational_attributes that inherited classes can set them
get identifier value from object
* fix sanity
fix test
* remove the possibility to add checks with consul_agent_check.
check if service has changed
* remove tests for idempotency check because for checks it is not possible
* remove unique_identifier from consul.py
change unique_identifier to unique_identifiers
* get id from params
* Revert "remove unique_identifier from consul.py"
This reverts commit a4f0d0220dd23e95871914b152c25ff352097a2c.
* update version to 8.5
* Revert "Revert "remove unique_identifier from consul.py""
This reverts commit d2c35cf04c8aaf5f0175d772f862a796e22e35d4.
* update description
update test
* fix sanity tests
* fix sanity tests
* update documentation for agent_check
* fix line length
* add documentation
* fix sanity
* simplified check for Tcp
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* check duration with regex
* fix
* update documentation
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 03966624ba)
Co-authored-by: Ilgmi <michael.ilg@mailbox.org>
Feature filter replace_keys (#8446)
* Add filter replace_keys.
* Update examples and integration tests.
* Fix examples and copyright.
* Update documentation, examples and integration tests.
* Implement #8445. Add filter replace_keys
* Fix documentation formatting.
* Fix documentation.
* Fix type(target). Formatting improved.
* Instead of a dictionary, _keys_filter_target_dict returns a list
* No target testing in _keys_filter_params
* Interface changed _keys_filter_params(data, matching_parameter)
* If there are items with equal C(before) the B(first) one will be used.
* Update remove_keys. Interface changed _keys_filter_params(data, matching_parameter)
* The target can't be empty also in _keys_filter_target_dict
* Update plugins/filter/replace_keys.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/filter/replace_keys.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/filter/replace_keys.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Test attributes before and after are strings in the iteration of target.
* Update plugins/filter/replace_keys.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1d61541951)
Co-authored-by: Vladimir Botka <vbotka@gmail.com>
django_check: new module (#8454)
* django_check: new module
* sanity fix
* working version
* remove unused import
* add note about the module output
* add note on module failing when rc!=0
(cherry picked from commit c31499a411)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
git_config: fix state=absent if value is present (#8452)
* Fix state=absent if value is present.
* Update changelog fragment.
(cherry picked from commit 2a3819a696)
Co-authored-by: Felix Fontein <felix@fontein.de>
Fix the homebrew module failing because of warnings (#8406)
Instead of checking if there is an error message, which can also be a
warning, we now check the return code.
This commit fixes#8229#7044
Co-authored-by: Strahinja Kustudic <strahinjak@nordeus.com>
(cherry picked from commit 43cb5a0d54)
Co-authored-by: Strahinja Kustudic <kustodian@gmail.com>
docs: add seealso and notes for yaml callback plugin (#8396)
* docs: add seealso and notes for yaml callback plugin
* docs: correct links to parameters
Co-authored-by: Felix Fontein <felix@fontein.de>
* docs: shorten the long lines
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4792e21416)
Co-authored-by: kurokobo <kuro664@gmail.com>
* feat: add community.general.timestamp callback plugin
* feat: add minimal integration tests for timestamp callback plugin
* feat: add maintainers for timestamp callback plugin
* fix: correct license
* fix: remove type annotation for the older python environment
* fix: remove unnecessary comment
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: add trailing period
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: split long description into list
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: remove default and add type
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix; add type
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: split long description into list
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: improve description for format_string to describe usable format codes
* fix: clarify the original codes and add copyright from that
* fix: shorten long lines
* fix: correct link format
* fix: add seealso section
* fix: add ignore entries for EOL CI
* fix: update seealso to correctly associate with related plugin
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix sanitize for keycloak_identitiy_provider.
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* add systemd run0 as a become method
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* add fragment
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* remove space after hyphen
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* replace ansible with collection version
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* update version_added and remove changelog fragment
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* update formating
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* add types
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* slim super()
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* imports must appear below docs
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* add initial unit test
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* update unit tests
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
---------
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* gomebrew: Move repeated logic from homebrew modules into module_utils
Fixes#8323.
* ghangelog + unit test improvement
* Update changelogs/fragments/8323-refactor-homebrew-logic-module-utils.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* manually prepare variables of foreign host including hostvars property
* render variables from context of current host
* add integration test for cross host merge
* lint fixes
* adjust cross host merge unit tests to provide a tiny bit of the HostVars Class API
* add license information
* lint
* add changelog fragment
* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml
Okay
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml
Okay
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml
Okay
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
* rename _HostVars to HostVarsMock
* removing unnecessary task
---------
Co-authored-by: Gitlab CI <alexander.petrenz@posteo.de>
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
* homebrew: Add force_formula parameter to pass --formula to brew command
Some formulas have names that are also cask formulas (e.g. docker).
When trying to install such a formula, brew prints a warning and returns
a non-zero exit code. This causes Ansible to halt and report the failure.
By allowing the task to set force_formula, we can sidestep this problem.
* Add changelog fragment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/homebrew.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>