mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
* homebrew_cask: reinstall when force is install option
* add changelog entry
* Fix OSX CI runs - run as non-root
* test with cask that has no macos dependencies
* use `brooklyn` cask to test
(cherry picked from commit 8b95c56030
)
Co-authored-by: Joseph Torcasso <87090265+jatorcasso@users.noreply.github.com>
This commit is contained in:
parent
e6c90cc52c
commit
1b609a34ae
5 changed files with 87 additions and 1 deletions
|
@ -102,6 +102,12 @@ EXAMPLES = '''
|
|||
state: present
|
||||
install_options: 'debug,appdir=/Applications'
|
||||
|
||||
- name: Install cask with force option
|
||||
community.general.homebrew_cask:
|
||||
name: alfred
|
||||
state: present
|
||||
install_options: force
|
||||
|
||||
- name: Allow external app
|
||||
community.general.homebrew_cask:
|
||||
name: alfred
|
||||
|
@ -600,7 +606,7 @@ class HomebrewCask(object):
|
|||
self.message = 'Invalid cask: {0}.'.format(self.current_cask)
|
||||
raise HomebrewCaskException(self.message)
|
||||
|
||||
if self._current_cask_is_installed():
|
||||
if '--force' not in self.install_options and self._current_cask_is_installed():
|
||||
self.unchanged_count += 1
|
||||
self.message = 'Cask already installed: {0}'.format(
|
||||
self.current_cask,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue