Commit graph

10 commits

Author SHA1 Message Date
Strahinja Kustudic
43cb5a0d54
Fix the homebrew module failing because of warnings ()
Instead of checking if there is an error message, which can also be a
warning, we now check the return code.

This commit fixes  

Co-authored-by: Strahinja Kustudic <strahinjak@nordeus.com>
2024-05-26 21:07:09 +02:00
Kit Ham
3b7f13c58e
homebrew: Move repeated logic from homebrew modules into module_utils ()
* gomebrew: Move repeated logic from homebrew modules into module_utils

Fixes .

* 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>
2024-05-11 16:52:43 +02:00
Kit Ham
3eeafecd1f
homebrew: Add force_formula parameter to pass --formula to brew command ()
* 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>
2024-05-04 15:25:21 +02:00
Michael Wall
fa30b02294
fix(homebrew): give correct error message when become true used ()
* fix(homebrew): give correct error message when become true used

This commit fixes  by raising the exception coming from calling
homebrew with the `become: true` parameter set.

* chore(changelog): add changelog fragment
2024-03-08 07:24:56 +01:00
João Victor Silva
be3bfd6fa5
Detection of already installed homebrew cask ()
* fix: detect already installed cask

Use json output v2 to check if formulae and casks are installed

chore: add changelog fragment

* test: add homebrew cask specific tests

* refactor: change cask used in tests

* chore: apply suggestions to changelog fragment
2024-01-27 10:23:52 +01:00
Felix Fontein
3e0d84bdda
Use semantic markup (modules h-j) ()
* Use semantic markup.

* Use 'ignore:' until a new version of antsibull-docs is released.

* 'ignore:' is no longer needed.

* E() now works better.
2023-06-15 15:47:00 +02:00
Felix Fontein
3ec2fde2c6
Add attributes to package manager modules ()
Add attributes to package manager modules.
2023-02-24 09:25:20 +01:00
Felix Fontein
b531ecdc9b
Unflatmap community.general ()
* Move files.

* Update imports and references.

* Move wrongly placed files.

* Reverse redirects, deprecate long → short name redirects.

* Simplify contribution guidelines for new modules.

* Rewrite BOTMETA.

* Add changelog fragment.

* Fix ignore.txt files.
2022-11-02 20:42:29 +00:00
Felix Fontein
7743ecd776
Replace symlinks with meta/runtime.yml redirects. () 2022-04-26 20:33:13 +02:00
Brian Coca
8f90360d49
make collection usable with current ansible vers () 2020-03-11 14:10:38 +00:00