Closed BoggyBumblebee closed 1 month ago
Issue is found here in the homebrew. I see Jeff you commented on Ansible version being the issue - I'll see if that makes a difference. https://github.com/ansible-collections/community.general/issues/1524
I've found the root of the issue. When homebrew is first installed in the VM that I am using to test the installation, running the command brew --version
returns the string "Homebrew >=4.1.0 (shallow or no git repository)", which cannot be correctly parsed by the code in homebrew_cask.py
in the function def _get_brew_version(self):
on line 498, that in turn throws an issue on line 513:
return LooseVersion(self._get_brew_version()) >= LooseVersion('2.6.0')
If I run brew update
and then brew --version
it nows returns "Homebrew 4.2.9", and if the Ansible script is re-run, everything works.
In @geerlingguy's tasks/main.yml there is a step that should force an update, post installation of brew, when "not homebrew_binary.stat.exists", but that is being skipped, as I assume that does exist. Should it not be forced regardless? Clearly, I can run the Ansible script several times, but that feels wrong.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
Followed the steps provided, and I did not provide a custom config.yml, so using default 'default.config.yml'. When it comes to processing homebrew_cask_apps, it throws this error for every entry in the 'homebrew_cask_apps':
I can see where the error is (homebrew_cask.py), I'm struggling to find where that code resides, so I can work out what has gone wrong.
I know that the way in which Casks are installed has recently changed in homebrew, so I removed them and provided an empty 'homebrew_cask_apps' in the default config. The remainder of script then works. However, adding the cask list to the 'homebrew_installed_packages' did not work. Any suggestions on what needs to be fixed (happy to help), or a workaround?