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>
* use smaller snap, add disabled to aliases
* rollback tag disabled in aliases
* comment out the test_dangerous as it takes too long
* comment out the test_dangerous as it takes too long
* Update tests/integration/targets/snap/tasks/main.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* change MH to use the module_utils.vardict.VarDict
* remove VarsMixin from superclasses of MH
* bump vardict deprecation to 11.0.0 + add old/new vardict selection in MH
* improve backawards compatibility
* improve backawards compatibility
* use new vardict in some modules, make adjustments
* add changelog frag
* adjustment after rebase
Fixes#6563 by extending the allowed values of the `state` parameter to
include `latest`. To do this, the `update_flat()` function is introduced
which borrows the majority of its implementation from both the existing
`install_flat()` and `remove_flat()` functions. The documentation and
examples have been expanded describing what to expect when using
`state=latest`.
* bitwarden - add support for filtering by organization_id
* Update changelogs/fragments/8188-bitwarden-add-organization_id.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* implement PR discussion result on wording
* rewrite search_field filtering
To correctly handle organization_id and collection_id by passing both to bw.
Tests needed to be extended to filter organizations / collections and
the testdata needed changes to reflect that a collection always belongs to a
single organizaion
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: Ensuring interpolation is disabled for ConfigParser
This PR disables interpolation of ConfigParser and adds test coverage for that.
* Adding changelog fragment
* Fixing missing extension of changelog fragment
* Adding issue link to changelog fragment
* Update changelogs/fragments/8183-from_ini_to_ini.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Implement integration test to reproduce #7463
* Make new iptables_state checks async
* Add missing commit to iptable_state integration test
* Remove async when using checkmode in iptables_state integration tests
* Do per table comparison in check mode for iptables_state
* Calculate changes of iptables state per table based on result
* Output target iptables state in checkmode
* Refactor calculation of invidual table states in iptables_state
* Add missing return for table calculation
* Add missing arg to regex check
* Remove leftover debug output for target iptable state
* Parse per table state from raw state string
* Join restored state for extration of table specific rules
* Switch arguments for joining restored iptable state
* Output final ip table state
* Compare content of tables
* Complete iptables partial tables test cases
* Correct order of test iptables data
* Update docu for iptables tables_after
* Add changelog fragment
* Appease the linting gods for iptables_state
* Adjust spelling and remove tables_after from return values
* ini_file - support optional spaces between section names and their surrounding brackets
Some ini files have spaces between some of their section names and the
brackets that enclose them. This is documented in the 'openssl.cnf(5)' man
page. In order to manage files such as /etc/ssl/openssl.cnf with ini_file
before now, one would have to include spaces in the section name like this:
section: ' crypto_policy '
option: Options
value: UnsafeLegacyRenegotiation
This change implements matching section headers with such optional spaces.
Existing tasks using the workaround above will continue to work, even in
cases where spaces in section headers are subsequently removed.
* readability improvement in the test content expressions
---------
Co-authored-by: Todd Lewis <todd_lewis@unc.edu>
* Ignore pylint warnings for construct that does not work with Python 2.
* Revert "Ignore pylint warnings for construct that does not work with Python 2."
This reverts commit 51d559cc94.
* Different approach: use ignore.txt since otherwise ansible-core 2.14 tests fail.
* First implementation of usb module
* Rename to usb_facts
* Working tests
* Appease linter
* Fix author
* Remove splitlines arg for python 2.7 compat
* indent usb test further
* indent usb test a bit less
* Remove trailing whitespace
* Update plugins/modules/usb_facts.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/usb_facts.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adjust usb_facts PR based on feedback
* Add usage example and extend correct documentation fragment
* Add myself to BOTMETA.yml
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
New filters lists_union, lists_intersect, lists_difference and lists_symmetric_difference added.
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
* Add noexec support to sudoers
* Add changelog fragment #7983
* Fix yml formatting in fragment 7983
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>