Comments (5)
Possibly related to ansible-collections/community.general#4708 (comment)?
from ansible-collection-mac.
Getting the same fatal error, when running mac-dev-playbook
, on a completely fresh MacBook M1 running Sonoma 14.3.1. The same error repeats for each homebrew_cask_apps
in config.yml
. Unclear how to workaround or proceed.
Error Reported
TASK [geerlingguy.mac.homebrew : Install configured cask applications.] **********************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: '<' not supported between instances of 'str' and 'int'
failed: [127.0.0.1] (item=docker) => changed=false
ansible_loop_var: item
item: docker
module_stderr: |-
Traceback (most recent call last):
File "/Users/arthur/.ansible/tmp/ansible-tmp-1708469930.622443-5587-245938492723656/AnsiballZ_homebrew_cask.py", line 107, in <module>
_ansiballz_main()
File "/Users/arthur/.ansible/tmp/ansible-tmp-1708469930.622443-5587-245938492723656/AnsiballZ_homebrew_cask.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/Users/arthur/.ansible/tmp/ansible-tmp-1708469930.622443-5587-245938492723656/AnsiballZ_homebrew_cask.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.homebrew_cask', init_globals=dict(_module_fqn='ansible_collections.community.general.plugins.modules.homebrew_cask', _modlib_path=modlib_path),
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 210, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 895, in <module>
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 887, in main
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 450, in run
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 523, in _run
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 671, in _install_casks
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 622, in _install_current_cask
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 485, in _current_cask_is_installed
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible_collections/community/general/plugins/modules/homebrew_cask.py", line 513, in _brew_cask_command_is_deprecated
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible/module_utils/compat/version.py", line 78, in __ge__
File "/var/folders/9n/wgtj2qt1631bw_sywp_w0x3w0000gp/T/ansible_homebrew_cask_payload_w75x72lg/ansible_homebrew_cask_payload.zip/ansible/module_utils/compat/version.py", line 338, in _cmp
TypeError: '<' not supported between instances of 'str' and 'int'
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
Code Location
Grepping for the task description leads me to line 141 in the collection role:
- name: Install configured cask applications.
homebrew_cask:
name: "{{ item.name | default(item) }}"
state: present
install_options: "{{ item.install_options | default('appdir=' + homebrew_cask_appdir) }}"
accept_external_apps: "{{ homebrew_cask_accept_external_apps }}"
sudo_password: "{{ ansible_become_password | default(omit) }}"
loop: "{{ homebrew_cask_apps }}"
notify:
- Clear homebrew cache
from ansible-collection-mac.
Giving it a look on the go. It does look like underlying issue with the community.general
version compatibility check rather than this collection. I'll take another look by the end of the week and potentially close this issue in favor of mentioned by @excalq.
from ansible-collection-mac.
Having given up, and manually running brew install visual-studio-code
caused Homebrew to also update itself, which fixed the root cause. Previously brew version
reported Homebrew >=4.1.0 (shallow or no git repository)
. Now it reports Homebrew 4.2.9
.
So I suppose issuing a brew update --auto-update
before using Cask for the first time would help prevent this issue on a new MacOS install.
from ansible-collection-mac.
Related Issues (20)
- Support --allhomes for dockutil HOT 4
- Homebrew Path not updated after installation if removed HOT 2
- `ansible.builtin.package` not working after homebrew role HOT 1
- Pinning homebrew installation versions HOT 2
- Greedy Upgrade of Homebrew Casks HOT 3
- Unable to install MacTex. HOT 2
- Installing apps with mas doesn't work for pubkey ssh tunnels HOT 2
- Error: The following directories are not writable by your user:\n/opt/homebrew HOT 2
- Homebrew package installation fails on ARM-based macOS HOT 3
- Homebrew - Add support for link and unlink HOT 2
- Symlink brew to homebrew_brew_bin_path with root user HOT 2
- [M2 issue] Bad CPU type in executable b''/usr/local/bin/git''' HOT 2
- Failed geerlingguy.mac.homebrew : Ensure proper ownership on homebrew_install_path subdirs. HOT 3
- Dock Command does not install correctly, causing the dock commands to skip HOT 6
- Support for spacers in the dock role
- Homebrew fails when tapping homebrew/core HOT 6
- PATH issue finding MAS, when running REMOTELY
- Tapping default homebrew taps is broken HOT 2
- install path /opt/homebrew/Homebrew is unsupported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-collection-mac.