Nick Ginanto Nick Ginanto - 3 months ago 21
Ruby Question

Installing rpm package from imported repo

To install logstash with rpm (https://www.elastic.co/guide/en/logstash/current/installing-logstash.html) I need to manually specify the baseurl and the pgpkey

I can't see these options in the chef docs (https://docs.chef.io/resource_rpm_package.html)

Is there a way to do this with chef?

Answer

You can try with "yum_repository" resource. For, example:-

Github Source:- https://github.com/chef-cookbooks/yum

# add the Zenoss repository
yum_repository 'zenoss' do
   description "Zenoss Stable repo"
   baseurl "http://dev.zenoss.com/yum/stable/"
   gpgkey 'http://dev.zenoss.com/yum/RPM-GPG-KEY-zenoss'
   action :create
end
Comments