Last active
December 10, 2021 10:40
-
-
Save jescalan/5746373 to your computer and use it in GitHub Desktop.
install latest ruby via rbenv using salt stack
This file contains hidden or 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
# | |
# ruby deps | |
# | |
rbenv_deps: | |
pkg.installed: | |
- names: | |
- git | |
- build-essential | |
- openssl | |
- curl | |
- 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 | |
# | |
# rbenv and ruby-build installation | |
# | |
/root/.rbenv: | |
file.directory: | |
- makedirs: True | |
https://github.com/sstephenson/rbenv.git: | |
git.latest: | |
- rev: master | |
- target: /root/.rbenv | |
- force: True | |
- require: | |
- pkg: rbenv_deps | |
- file: /root/.rbenv | |
https://github.com/sstephenson/ruby-build.git: | |
git.latest: | |
- rev: master | |
- target: /root/.rbenv/plugins | |
- force: True | |
- require: | |
- git: https://github.com/sstephenson/rbenv.git | |
- file: /root/.rbenv | |
/root/.profile: | |
file.append: | |
- text: | |
- export PATH="$HOME/.rbenv/bin:$PATH" | |
- eval "$(rbenv init -)" | |
- require: | |
- git: https://github.com/sstephenson/rbenv.git | |
# | |
# ruby installation | |
# | |
# this is currently not working | |
# ruby-{{ pillar['ruby']['version'] }}: | |
# rbenv.installed: | |
# - default: True | |
# - require: | |
# - git: https://github.com/sstephenson/ruby-build.git | |
/root/.rbenv/bin/rbenv install {{ pillar['ruby']['version'] }}: | |
cmd.run: | |
- require: | |
- git: https://github.com/sstephenson/ruby-build.git | |
/root/.rbenv/bin/rbenv rehash: | |
cmd.run: | |
- require: | |
- cmd: /root/.rbenv/bin/rbenv install {{ pillar['ruby']['version'] }} | |
/root/.rbenv/bin/rbenv global {{ pillar['ruby']['version'] }} | |
cmd.run: | |
- require: | |
- cmd: /root/.rbenv/bin/rbenv rehash |
This file contains hidden or 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
# /srv/pillar/ruby.sls | |
ruby: | |
version: 2.0.0-p195 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should read:
[Missing colon at the end of the key name]