Created
October 27, 2014 23:55
-
-
Save mapyo/21c686b31a3ccd674649 to your computer and use it in GitHub Desktop.
rbenv.shを/etc/profile.dに置いて、それをsourceコマンドで読み込ませる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file { 'rbenv/profile.d/rbenv.sh': | |
path => '/etc/profile.d/rbenv.sh', | |
content => '## rbenv setting | |
export RBENV_ROOT="/usr/local/rbenv" | |
export PATH="/usr/local/rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
', | |
require => Exec['clone rbenv'] | |
} | |
~> | |
exec { 'source /etc/profile.d/rbenv.sh': | |
command => "bash -c 'source /etc/profile.d/rbenv.sh'", | |
path => ['/bin', '/usr/bin', '/usr/local/rbenv/bin', '/usr/local/rbenv/plugins/ruby-build/bin/'], | |
user => 'vagrant', | |
refreshonly => true, | |
require => File['rbenv/profile.d/rbenv.sh'] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
普通にはむりじゃないかな。
puppet apply
をシェルスクリプトでラップしたらいいのでは。