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 is part of a playbook, pretty simple stuff
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?