# Having issues with homebrew\_tap and homebrew\_cask

**URL:** <https://forum.ansible.com/t/having-issues-with-homebrew-tap-and-homebrew-cask/22845>\
**Category:** Ansible Project\
**Created:** [October 20, 2016, 6:47pm UTC](https://forum.ansible.com/t/having-issues-with-homebrew-tap-and-homebrew-cask/22845 "2016-10-20T18:47:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkim](https://avatars.discourse-cdn.com/v4/letter/h/fbc32d/32.png) [@hkim](https://forum.ansible.com/u/hkim)\
**Post date:** [October 20, 2016, 6:47pm UTC](https://forum.ansible.com/t/having-issues-with-homebrew-tap-and-homebrew-cask/22845/1 "2016-10-20T18:47:55Z")

</div>

ansible 2.1.2.0

I’m trying to automate some OS X setup and running into a simple problem I can’t figure out.

[https://gist.github.com/hkim823/0f11e2132bf943e6cd7ae6d2069ce119](https://gist.github.com/hkim823/0f11e2132bf943e6cd7ae6d2069ce119) is part of a playbook, pretty simple stuff

[https://gist.github.com/hkim823/748df579460b26d7e593680f09da7d4e](https://gist.github.com/hkim823/748df579460b26d7e593680f09da7d4e) is the var file

The first task goes fine, installs homebrew with the list inside of the vars file

The other two tasks always fail.

TASK [Tap Homebrew casks] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /Users/hkim/src/mac-dev-playbook/tasks/main.yml:22  
\<127.0.0.1\> ESTABLISH LOCAL CONNECTION FOR USER: hkim  
\<127.0.0.1\> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1476989120.37-88486587995449`” && echo ansible-tmp-1476989120.37-88486587995449=“`echo $HOME/.ansible/tmp/ansible-tmp-1476989120.37-88486587995449`” ) && sleep 0’  
\<127.0.0.1\> PUT /var/folders/8v/6gk6gd7x0s7bx8bs9v669d5w0000gn/T/tmp7PUfom TO /Users/hkim/.ansible/tmp/ansible-tmp-1476989120.37-88486587995449/homebrew\_tap  
\<127.0.0.1\> EXEC /bin/sh -c ‘chmod u+x /Users/hkim/.ansible/tmp/ansible-tmp-1476989120.37-88486587995449/ /Users/hkim/.ansible/tmp/ansible-tmp-1476989120.37-88486587995449/homebrew\_tap && sleep 0’  
\<127.0.0.1\> EXEC /bin/sh -c ‘LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/local/Cellar/ansible/2.1.2.0/libexec/bin/python /Users/hkim/.ansible/tmp/ansible-tmp-1476989120.37-88486587995449/homebrew\_tap; rm -rf “/Users/hkim/.ansible/tmp/ansible-tmp-1476989120.37-88486587995449/” \> /dev/null 2\>&1 && sleep 0’  
fatal: [localhost]: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_args”: {“name”: “[‘caskroom/cask’, ‘homebrew/dupes’]”, “state”: “present”}, “module\_name”: “homebrew\_tap”}, “msg”: “added: 0, unchanged: 0, error: not a valid tap: [‘caskroom/cask’”}

Or if I comment out that task, I get this error

TASK [Install Homebrew cask applications] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /Users/hkim/src/mac-dev-playbook/tasks/main.yml:23  
\<127.0.0.1\> ESTABLISH LOCAL CONNECTION FOR USER: hkim  
\<127.0.0.1\> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1476989254.73-203414290907378`” && echo ansible-tmp-1476989254.73-203414290907378=“`echo $HOME/.ansible/tmp/ansible-tmp-1476989254.73-203414290907378`” ) && sleep 0’  
\<127.0.0.1\> PUT /var/folders/8v/6gk6gd7x0s7bx8bs9v669d5w0000gn/T/tmpseyoBM TO /Users/hkim/.ansible/tmp/ansible-tmp-1476989254.73-203414290907378/homebrew\_cask  
\<127.0.0.1\> EXEC /bin/sh -c ‘chmod u+x /Users/hkim/.ansible/tmp/ansible-tmp-1476989254.73-203414290907378/ /Users/hkim/.ansible/tmp/ansible-tmp-1476989254.73-203414290907378/homebrew\_cask && sleep 0’  
\<127.0.0.1\> EXEC /bin/sh -c ‘LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/local/Cellar/ansible/2.1.2.0/libexec/bin/python /Users/hkim/.ansible/tmp/ansible-tmp-1476989254.73-203414290907378/homebrew\_cask; rm -rf “/Users/hkim/.ansible/tmp/ansible-tmp-1476989254.73-203414290907378/” \> /dev/null 2\>&1 && sleep 0’  
fatal: [localhost]: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_args”: {“name”: “[‘docker’, ‘fing’, ‘firefox’, ‘google-chrome’, ‘sequel-pro’, ‘slack’, ‘vagrant’, ‘virtualbox’, ‘spectacle’, ‘flux’, ‘google-drive’]”, “path”: null, “state”: “present”}, “module\_name”: “homebrew\_cask”}, “msg”: “Invalid cask: [‘docker’.”}

NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
to retry, use: --limit @/Users/hkim/src/mac-dev-playbook/main.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=2 changed=0 unreachable=0 failed=1

Thoughts?
