Skip to content

Instantly share code, notes, and snippets.

@stevepereira
Created March 10, 2014 15:00
Show Gist options
  • Save stevepereira/9466606 to your computer and use it in GitHub Desktop.
Save stevepereira/9466606 to your computer and use it in GitHub Desktop.
Redis install via rpm - you can pull the version out as a variable if it's stated in the role yaml
cache = Chef::Config[:file_cache_path]
rpm = redis-2.8.7-1.el6.remi.x86_64.rpm
remote_file "#{cache}/#{rpm}" do
source "http://rpms.famillecollet.com/enterprise/6/remi/x86_64/#{rpm}"
end
rname = File.basename("#{rpm}", '.*')
if `rpm -qa | grep #{rname}`.empty?
rpm_package "#{rname}" do
source "#{cache}/#{rpm}"
action :install
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment