centos – 使用ansible安装RVM

前端之家收集整理的这篇文章主要介绍了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.f2er.com/centos/373934.html

猜你在找的CentOS相关文章