Version information
released Dec 15th 2015
This version is compatible with:
- Darwin
Start using this module
Add this module to your Puppetfile:
mod 'halyard-ruby', '8.5.7'
Learn more about managing modules with a PuppetfileDocumentation
halyard/ruby — version 8.5.7 Dec 15th 2015
puppet-ruby
Module to install ruby versions and gems
Changes from upstream
- Removed a lot of meta-stuff I wasn't using, like the cardboard scripts
- Removed definition files for github's custom ruby versions
- Set up CircleCI build tests
- Default gem version to '*'
- Default gem name to resource title
- Rehash rbenv after gem install
- Switch from puppet-module-data to function bindings
- Allow skipping rbenv init on shell creation using SKIP_RBENV_INIT environment variable
Usage
In your hiera config:
ruby::build::ensure: v20150818
ruby::rbenv::ensure: v0.4.0
"ruby::provider": "rbenv"
"ruby::user": "deployuser"
# Check https://github.com/sstephenson/ruby-build/releases for ruby-build releases
"ruby::build::ensure": "v20141028"
"ruby::chruby::ensure": "v0.3.6"
"ruby::rbenv::ensure": "v0.4.0"
# rbenv plugins
"ruby::rbenv::plugins":
"rbenv-gem-rehash":
"ensure": "v1.0.0"
"source": "sstephenson/rbenv-gem-rehash"
# Environment variables for building specific versions
# You'll want to enable hiera's "deeper" merge strategy
# See http://docs.puppetlabs.com/hiera/1/configuring.html#mergebehavior
"ruby::version::env":
"1.9.3-gentoo":
"CC": "llvm"
"CFLAGS": "-O9 -funroll-loops"
"2.0.0-p0":
"CC": "gcc"
# Version aliases, commonly used to bless a specific version
# Use the "deeper" merge strategy, as with ruby::version::env
"ruby::version::alias":
"1.9.3": "1.9.3-p484"
"2.0.0": "2.0.0-github"
"2.0.0-github": "2.0.0-github6"
class { 'ruby::global':
version => '2.2.2'
}
# ensure a gem is installed for a certain ruby version
# note, you can't have duplicate resource names so you have to name like so
$version = "2.2.2"
ruby_gem { "bundler for ${version}":
gem => 'bundler',
version => '~> 1.2.0',
ruby_version => $version,
}
ruby_gem { 'bundler for all rubies':
gem => 'bundler',
version => '~> 1.0',
ruby_version => '*',
}
# install a ruby version
ruby::version { '2.2.2': }
# Installing rbenv plugin
ruby::rbenv::plugin { 'rbenv-vars':
ensure => 'v1.2.0',
source => 'sstephenson/rbenv-vars'
}
Details
All ruby versions are installed to /opt/rubies, using either rbenv (default) or chruby.
Required Puppet Modules
Types in this module release
Dependencies
- halyard/homebrew (1.13.x)
Copyright (c) 2013 GitHub, Inc. Copyright (c) 2015 Les Aker <me@lesaker.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.