mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
[PR #8406/43cb5a0d backport][stable-9] Fix the homebrew module failing because of warnings (#8425)
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>
This commit is contained in:
parent
5a36e84b86
commit
f0db1d1f6b
3 changed files with 4 additions and 16 deletions
|
@ -12,20 +12,6 @@
|
|||
path: "{{ brew_which.stdout }}"
|
||||
register: brew_stat
|
||||
|
||||
- name: MACOS | Install docker without --formula
|
||||
community.general.homebrew:
|
||||
name: docker
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
ignore_errors: true
|
||||
register: result
|
||||
|
||||
- name: Check that installing docker without --formula raises warning
|
||||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
|
||||
- name: MACOS | Install docker
|
||||
community.general.homebrew:
|
||||
name: docker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue