Last active
August 29, 2015 14:05
-
-
Save charlesjohnson/876f57104e6cca105242 to your computer and use it in GitHub Desktop.
Use a .gemrc file with Omnibus chef-client
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
:sources: | |
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/ |
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
template '/root/.gemrc' do | |
source 'gemrc.erb' | |
action :create | |
notifies :run, 'ruby_block[refresh_gemrc]', :immediately | |
end | |
# Thanks to http://lists.opscode.com/sympa/arc/chef/2013-12/msg00237.html | |
ruby_block 'refresh_gemrc' do | |
action :nothing | |
block do | |
Gem.configuration = Gem::ConfigFile.new [] | |
end | |
end | |
gem_package 'di-ruby-lvm' do | |
gem_binary Chef::Util::PathHelper.join(Chef::Config.embedded_dir,'bin','gem') | |
action :install | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment