salt.modules.rbenv

Manage ruby installations with rbenv.

New in version 0.16.0.

salt.modules.rbenv.default(ruby=None, runas=None)

Returns or sets the currently defined default ruby.

ruby=None
The version to set as the default. Should match one of the versions listed by rbenv.versions. Leave blank to return the current default.

CLI Example:

salt '*' rbenv.default
salt '*' rbenv.default 2.0.0-p0
salt.modules.rbenv.do(cmdline=None, runas=None)

Execute a ruby command with rbenv's shims from the user or the system.

CLI Example:

salt '*' rbenv.do 'gem list bundler'
salt '*' rbenv.do 'gem list bundler' deploy
salt.modules.rbenv.do_with_ruby(ruby, cmdline, runas=None)

Execute a ruby command with rbenv's shims using a specific ruby version.

CLI Example:

salt '*' rbenv.do_with_ruby 2.0.0-p0 'gem list bundler'
salt '*' rbenv.do_with_ruby 2.0.0-p0 'gem list bundler' deploy
salt.modules.rbenv.install(runas=None, path=None)

Install Rbenv systemwide

CLI Example:

salt '*' rbenv.install
salt.modules.rbenv.install_ruby(ruby, runas=None)

Install a ruby implementation.

ruby
The version of Ruby to install, should match one of the versions listed by rbenv.list

Additional environment variables can be configured in pillar / grains / master:

rbenv:
  build_env: 'CONFIGURE_OPTS="--no-tcmalloc" CFLAGS="-fno-tree-dce"'

CLI Example:

salt '*' rbenv.install_ruby 2.0.0-p0
salt.modules.rbenv.is_installed(runas=None)

Check if Rbenv is installed.

CLI Example:

salt '*' rbenv.is_installed
salt.modules.rbenv.list(runas=None)

List the installable versions of ruby.

CLI Example:

salt '*' rbenv.list
salt.modules.rbenv.rehash(runas=None)

Run rbenv rehash to update the installed shims.

CLI Example:

salt '*' rbenv.rehash
salt.modules.rbenv.uninstall_ruby(ruby, runas=None)

Uninstall a ruby implementation.

ruby
The version of ruby to uninstall. Should match one of the versions listed by rbenv.versions

CLI Example:

salt '*' rbenv.uninstall_ruby 2.0.0-p0
salt.modules.rbenv.update(runas=None, path=None)

Updates the current versions of Rbenv and Ruby-Build

CLI Example:

salt '*' rbenv.update
salt.modules.rbenv.versions(runas=None)

List the installed versions of ruby.

CLI Example:

salt '*' rbenv.versions