ansible-collection-mac
ansible-collection-mac copied to clipboard
`mac.homebrew`: Install `mas` apps from Brewfile over SSH does not work
I'd like to reopen https://github.com/geerlingguy/ansible-role-homebrew/issues/146 here, as the issue still exists.
I have a Brewfile with multiple mas
apps in it. When I run the playbook over SSH, it fails:
TASK [geerlingguy.mac.homebrew : Install from Brewfile.] *******************************************************************************************************************************************************************************************************************************************************************
fatal: [ws547]: FAILED! => changed=true
cmd:
- /usr/local/bin/brew
- bundle
delta: '0:00:09.632515'
end: '2022-04-01 15:18:18.952991'
msg: non-zero return code
rc: 1
start: '2022-04-01 15:18:09.320476'
stderr: 'Error: Unable to install Affinity Designer app. mas installation failed.'
stderr_lines: <omitted>
stdout:
(Lot of Brewfile content)
stdout_lines: <omitted>
However, it works using ansible_connection=local
therefor I'm using this workaround now:
- name: Set controller_host fact
set_fact:
controller_host: "{{lookup('pipe','hostname')}}"
- name: Switch to local connection if this is the device
set_fact:
ansible_connection: local
when: ansible_hostname == controller_host
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.
For me the whole MAS installation doesnt work when using ansible remotely on my M1 mac. It just stops at the task. Im logged in via GUI and have Xcode installed and uninstalled to check if it was user error. It just doesnt appear to install or it takes forever that way?
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.