微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

centos – 使用ansible安装RVM

我试图在一个基于centos的流浪盒上安装带有ansible的rvm.

我正在运行的命令是:

vars:
  user: "foo"

- name: install rvm
  action: command sudo -u $user bash /home/$user/rvm-install.sh stable creates=$home/.rvm

它几乎可以工作但是Ansible认为它失败了.

Ansible输出是:

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
这对我有用(Ubuntu):
tasks:
      - name: Install RVM
        shell: "curl -sSL https://get.rvm.io | bash"

使用常规(非root)用户.

原文地址:https://www.jb51.cc/centos/373934.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。