geerlingguy / ansible-collection-mac

Collection of macOS automation tools for Ansible.
https://galaxy.ansible.com/geerlingguy/mac
MIT License
302 stars 112 forks source link

Error on [geerlingguy.mac.homebrew : Ensure proper ownership on homebrew_install_path subdirs.] OSError: [Errno 63] File name too long. #93

Open aex-gh opened 6 months ago

aex-gh commented 6 months ago

Hi,

I keep ending up with this error when trying to run geerlingguy.mac.homebrew. Have imitated what is in mac-dev-playbook. Runs through ok on initial playbook run yet if I run the playbook a second time I keep getting the error below. I've tried searching for any insight but no avail. Is this an error within geerlingguy.mac.homebrew or have I missed something.

It's been replicated on two clean installs of M1 Macs running macOS 14.4, Python 3.12.2, Ansible core 2.16.4.

TASK [geerlingguy.mac.homebrew : Ensure proper ownership on homebrew_install_path subdirs.] *** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 63] File name too long: b'/Applications/calibre.app/Contents/ebook-viewer.app/Contents/../../Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/QtWebEngineCore' fatal: [127.0.0.1]: FAILED! => changed=false module_stderr: |- Traceback (most recent call last): File "/Users/xxxx/.ansible/tmp/ansible-tmp-1710057066.6791492-28050-60271933514068/AnsiballZ_file.py", line 107, in _ansiballz_main() File "/Users/xxxx/.ansible/tmp/ansible-tmp-1710057066.6791492-28050-60271933514068/AnsiballZ_file.py", line 99, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/Users/xxxx/.ansible/tmp/ansible-tmp-1710057066.6791492-28050-60271933514068/AnsiballZ_file.py", line 47, in invoke_module runpy.run_module(mod_name='ansible.modules.file', init_globals=dict(_module_fqn='ansible.modules.file', _modlib_path=modlib_path), File "", line 226, in run_module File "", line 98, in _run_module_code File "", line 88, in _run_code File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/modules/file.py", line 987, in File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/modules/file.py", line 973, in main File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/modules/file.py", line 683, in ensure_directory File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/modules/file.py", line 369, in recursive_set_attributes File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/modules/file.py", line 369, in recursive_set_attributes File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/modules/file.py", line 369, in recursive_set_attributes [Previous line repeated 17 more times] File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/modules/file.py", line 353, in recursive_set_attributes File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/module_utils/basic.py", line 1153, in set_fs_attributes_if_different File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/module_utils/basic.py", line 797, in set_owner_if_different File "/tmp/ansible_file_payload_hriprmju/ansible_file_payload.zip/ansible/module_utils/basic.py", line 691, in user_and_group OSError: [Errno 63] File name too long: b'/Applications/calibre.app/Contents/ebook-viewer.app/Contents/../../Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/../../../../../../QtWebEngineCore.framework/QtWebEngineCore' module_stdout: '' msg: |- MODULE FAILURE See stdout/stderr for the exact error rc: 1

j-wang commented 5 months ago

I encountered the same thing. The temporary solution is to uninstall Calibre, which will allow the playbook to get past that step. It's not the best option, but it does work.