salt.modules.rvm
Manage ruby installations and gemsets with RVM, the Ruby Version Manager.
-
Execute a command in an RVM controlled environment.
- ruby
-
Which ruby to use
- command
-
The rvm command to execute
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
- cwd
-
The directory from which to run the rvm command. Defaults to the user's home directory.
CLI Example:
salt '*' rvm.do 2.0.0 <command>
salt.modules.rvm.do(ruby, command, runas=None, cwd=None, env=None)
-
Copy all gems from one gemset to another.
- source
-
The name of the gemset to copy, complete with ruby version
- destination
-
The destination gemset
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.gemset_copy foobar bazquo
salt.modules.rvm.gemset_copy(source, destination, runas=None)
-
Creates a gemset.
- ruby
-
The ruby version for which to create the gemset
- gemset
-
The name of the gemset to create
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.gemset_create 2.0.0 foobar
salt.modules.rvm.gemset_create(ruby, gemset, runas=None)
-
Delete a gemset
- ruby
-
The ruby version to which the gemset belongs
- gemset
-
The gemset to delete
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.gemset_delete 2.0.0 foobar
salt.modules.rvm.gemset_delete(ruby, gemset, runas=None)
-
Remove all gems from a gemset.
- ruby
-
The ruby version to which the gemset belongs
- gemset
-
The gemset to empty
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.gemset_empty 2.0.0 foobar
salt.modules.rvm.gemset_empty(ruby, gemset, runas=None)
-
List all gemsets for the given ruby.
- rubydefault
-
The ruby version for which to list the gemsets
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.gemset_list
salt.modules.rvm.gemset_list(ruby='default', runas=None)
-
List all gemsets for all installed rubies.
Note that you must have set a default ruby before this can work.
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.gemset_list_all
salt.modules.rvm.gemset_list_all(runas=None)
-
Update RVM
- versionstable
-
Which version of RVM to install, (e.g. stable or head)
CLI Example:
salt '*' rvm.get
salt.modules.rvm.get(version='stable', runas=None)
-
Install RVM system-wide
- runas
-
The user under which to run the rvm installer script. If not specified, then it be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.install
salt.modules.rvm.install(runas=None)
-
Install a ruby implementation.
- ruby
-
The version of ruby to install
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
- env
-
Environment to set for the install command. Useful for exporting compilation flags such as RUBY_CONFIGURE_OPTS
- opts
-
List of options to pass to the RVM installer (ie -C, --patch, etc)
CLI Example:
salt '*' rvm.install_ruby 1.9.3-p385
salt.modules.rvm.install_ruby(ruby, runas=None, opts=None, env=None)
-
Check if RVM is installed.
CLI Example:
salt '*' rvm.is_installed
salt.modules.rvm.is_installed(runas=None)
-
List all rvm-installed rubies
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.list
salt.modules.rvm.list_(runas=None)
-
Reinstall a ruby implementation
- ruby
-
The version of ruby to reinstall
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.reinstall_ruby 1.9.3-p385
salt.modules.rvm.reinstall_ruby(ruby, runas=None, env=None)
-
Installs a specific rubygems version in the given ruby
- ruby
-
The ruby for which to install rubygems
- version
-
The version of rubygems to install, or 'remove' to use the version that ships with 1.9
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.rubygems 2.0.0 1.8.24
salt.modules.rvm.rubygems(ruby, version, runas=None)
-
Set the default ruby
- ruby
-
The version of ruby to make the default
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
CLI Example:
salt '*' rvm.set_default 2.0.0
salt.modules.rvm.set_default(ruby, runas=None)
-
Install RVM wrapper scripts
- ruby_string
-
Ruby/gemset to install wrappers for
- wrapper_prefix
-
What to prepend to the name of the generated wrapper binaries
- runas
-
The user under which to run rvm. If not specified, then rvm will be run as the user under which Salt is running.
- binariesNone
-
The names of the binaries to create wrappers for. When nothing is given, wrappers for ruby, gem, rake, irb, rdoc, ri and testrb are generated.
CLI Example:
salt '*' rvm.wrapper <ruby_string> <wrapper_prefix>
salt.modules.rvm.wrapper(ruby_string, wrapper_prefix, runas=None, *binaries)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.rvm.html