从导入的repo安装rpm包

时间:2016-08-10 07:19:23

标签: ruby chef logstash rpm

使用rpm(https://www.elastic.co/guide/en/logstash/current/installing-logstash.html)安装logstash我需要手动指定baseurl和pgpkey

我无法在主厨文档(https://docs.chef.io/resource_rpm_package.html

中看到这些选项

有没有办法和厨师一起做这件事?

1 个答案:

答案 0 :(得分:1)

您可以尝试使用" yum_repository"资源。例如: -

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