I am attempting to install rvm with ansible on a centos-based vagrant box.
The command I am running is:
vars:
user: "foo"
- name: install rvm
action: command sudo -u $user bash /home/$user/rvm-install.sh stable creates=$home/.rvm
It pretty much works BUT Ansible thinks it has failed.
Ansible output is:
failed: [127.0.0.1] => {"changed": true, "cmd": ["sudo", "-u", "foo", "bash", "/home/foo/rvm-install.sh", "stable"], "delta": "0:00:21.102322", "end": "2012-10-09 12:33:19.917874", "rc": 1, "start": "2012-10-09 12:32:58.815552"}
stderr: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1081k 100 1081k 0 0 54170 0 0:00:20 0:00:20 --:--:-- 89264
stdout: Downloading RVM from wayneeseguin branch stable
Installing RVM to /home/foo/.rvm/
RVM PATH line found in /home/foo/.bashrc /home/foo/.zshenv.
RVM sourcing line found in /home/foo/.bash_profile /home/foo/.zprofile.
# RVM: Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use-rvm
# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'
Installation of RVM in /home/foo/.rvm/ is almost complete:
* To start using RVM you need to run `source /home/foo/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# root,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne