Skip to content

Commit

Permalink
Merge pull request #285 from Headlinerfm/verify-with-gpg
Browse files Browse the repository at this point in the history
Use GPG for rvm verification.
  • Loading branch information
martinisoft committed Dec 20, 2014
2 parents 8a877e9 + 10df50e commit 87cc2fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
default['rvm']['group_id'] = 'default'
default['rvm']['group_users'] = []

# GPG key for rvm verification
default['rvm']['gpg_key'] = 'D39DC0E3'

case platform
when "redhat","centos","fedora","scientific","amazon"
node.set['rvm']['install_pkgs'] = %w{sed grep tar gzip bzip2 bash curl git}
Expand Down
6 changes: 6 additions & 0 deletions recipes/system_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@
g.run_action(:create)
end

execute 'Adding gpg key' do
command "`which gpg2 || which gpg` --keyserver hkp://keys.gnupg.net --recv-keys #{node['rvm']['gpg_key']}"
only_if 'which gpg2 || which gpg'
not_if { node['rvm']['gpg_key'].empty? }
end

rvm_installation("root")

0 comments on commit 87cc2fe

Please sign in to comment.