0
votes

I'm trying to use the following code block to install an rpm I have inside a custom Artifactory repo:

yum_package 'apache-activemq-5.14.3-1.x86_64' do
  package_name 'apache-activemq-5.14.3-1.x86_64'
  action :install
end

This ends the chef run in an error:

   * yum_package[apache-activemq-5.14.3-1.x86_64] action install[2017-03-01T16:46:05-05:00] INFO: Processing yum_package[apache-activemq-5.14.3-1.x86_64] action install (cookbook::activemq line 91)

     * No candidate version available for apache-activemq-5.14.3-1.x86_64
     ================================================================================
     Error executing action `install` on resource 'yum_package[apache-activemq-5.14.3-1.x86_64]'

This rpm installs via commandline with yum with no special needs however:

yum install apache-activemq-5.14.3-1.x86_64

What am I missing?

1

1 Answers

2
votes

What you probably want is this:

package 'apache-activemq' do
  version '5.14.3-1'
end

You can use the package resource since yum is already the default for platforms where it is used, and you use the version property to specify which version to install.