homebrew: Add force_formula parameter to pass --formula to brew command (#8275)

* 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>
This commit is contained in:
Kit Ham
2024-05-04 23:25:21 +10:00
committed by GitHub
parent ea719649bb
commit 3eeafecd1f
4 changed files with 84 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
minor_changes:
- "homebrew - adds ``force_formula`` parameter to disambiguate a formula from a cask of the same name (https://github.com/ansible-collections/community.general/issues/8274)."