web-dev-qa-db-ja.com

SaltStackを介したRVMのインストール(Rubyをインストールできませんでした)

私はsaltstackのドキュメントを使用しています ここ 私のsalt-minionsにRVMをインストールする

塩2015.5.2(リチウム)

Ubuntu14.04システムの場合

これがRuby用の私のinit.slsファイルです。

gpg-import-D39DC0E3:
  cmd.run:
    - user: rvm
    - require:
      - user: rvm
    - name: gpg --keyserver hkp://keys.gnupg.net:80 --recv-keys D39DC0E3; echo '409B6B1796C275462A1703113804BB82D39DC0E3:4:' |gpg --import-ownertrust
- unless: gpg --fingerprint |fgrep 'Key fingerprint = 409B 6B17 96C2 7546 2A17  0311 3804 BB82 D39D C0E3'

rvm-deps:
  pkg.installed:
    - pkgs:
      - bash
      - coreutils
      - gzip
      - bzip2
      - gawk
      - sed
      - curl
      - git-core
      - Subversion

rvm:
  group.present: []
  user.present:
    - gid: rvm
    - home: /home/rvm
    - require:
      - group: rvm

mri-deps:
  pkg.installed:
    - pkgs:
      - build-essential
      - openssl
      - libreadline6
      - libreadline6-dev
      - curl
      - git-core
      - zlib1g
      - zlib1g-dev
      - libssl-dev
      - libyaml-dev
      - libsqlite3-0
      - libsqlite3-dev
      - sqlite3
      - libxml2-dev
      - libxslt1-dev
      - autoconf
      - libc6-dev
      - libncurses5-dev
      - automake
      - libtool
      - bison
      - Subversion
      - Ruby
jruby-deps:
  pkg.installed:
    - pkgs:
      - curl
      - g++
      - openjdk-6-jre-headless

Ruby-2.0.0:
  rvm.installed:
    - default: True
    - user: rvm
    - require:
      - pkg: rvm-deps
      - pkg: mri-deps
      - user: rvm

jruby:
  rvm.installed:
    - user: rvm
    - require:
      - pkg: rvm-deps
      - pkg: jruby-deps
      - user: rvm

jgemset:
  rvm.gemset_present:
    - Ruby: jruby
    - user: rvm
    - require:
      - rvm: jruby

mygemset:
  rvm.gemset_present:
    - Ruby: Ruby-2.0.0
    - user: rvm
    - require:
      - rvm: Ruby-2.0.0    

Gpg-import-D39DC0E3は、機能するはずの修正からのものです(ただし、見つかりません) ここ

私の最終目標は、 this 素晴らしいチュートリアルからredmineのソルトデプロイメントを行うことです。

どんな助けでも大歓迎です。

私の現在の出力

----------
          ID: rvm
    Function: group.present
      Result: True
     Comment: Group rvm is already present
     Started: 
    Duration: 
     Changes:   
----------
          ID: rvm
    Function: user.present
      Result: True
     Comment: User rvm is present and up to date
     Started: 
    Duration: 
     Changes:   
----------
          ID: gpg-import-D39DC0E3
    Function: cmd.run
        Name: gpg --keyserver hkp://keys.gnupg.net:80 --recv-keys             D39DC0E3; echo                         '409B6B1796C275462A1703113804BB82D39DC0E3:4:' |gpg --import-ownertrust
      Result: True
     Comment: unless execution succeeded
     Started: 
    Duration: 
     Changes:   
----------
          ID: rvm-deps
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed.
     Started: 
    Duration: 
     Changes:   
----------
          ID: mri-deps
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed.
     Started: 
    Duration: 
     Changes:   
----------
          ID: jruby-deps
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed.
     Started: 
    Duration: 
     Changes:   
----------
          ID: Ruby-2.0.0
    Function: rvm.installed
      Result: False
     Comment: Could not install Ruby.
     Started: 
    Duration: 
     Changes:   
----------
          ID: jruby
    Function: rvm.installed
      Result: False
     Comment: Could not install Ruby.
     Started: 
    Duration: 
     Changes:   
----------
          ID: jgemset
    Function: rvm.gemset_present
      Result: False
     Comment: One or more requisite failed
     Started: 
    Duration: 
     Changes:   
----------
          ID: mygemset
    Function: rvm.gemset_present
      Result: False
     Comment: One or more requisite failed
     Started: 
    Duration: 
     Changes:   

Summary
------------
Succeeded: 6
Failed:    4
------------
Total states run:    10
1
trueCamelType

salt.states.rvm docs は、実際にrvmをインストールする状態が欠落していると思います。

install_rvm:
  cmd.run:
    - name: curl -sSL https://get.rvm.io | bash
    - user: rvm
    - unless: /home/rvm/.rvm/bin/rvm --version
2
notpeter