Ask Your Question
1

package issue when using "*"

asked 2013-08-13 09:19:04 -0500

Andyh1983 gravatar image

updated 2013-08-15 12:46:00 -0500

GregLarkin gravatar image

Hi,

I am trying to create a module which requires the nagios-plugins* package/s installed. When I run yum install nagios-plugins* from the command line all works fine and all is installed as expected.

If I do:

package { 'nagios-plugins*':
  ensure => present,
}

Though in my class and apply to the node I get the following error from the puppet run which also reports as failed in the dashboard:

Error: Could not find package nagios-plugins*
Error: /Stage[main]/Nagios/Package[nagios-plugins*]/ensure: change from absent to present failed: Could not find package nagios-plugins*
Notice: Finished catalog run in 17.90 seconds

However ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-08-15 13:13:17 -0500

GregLarkin gravatar image

It looks like the yum package provider cannot fully support wildcards in package names, since it expects to gather information about packages one at a time. One reason it's done that way is to allow the "ensure" attribute to specify a version number, and that's often valid only on a per-package basis.

In order to adhere to Puppet best practices, you'll want to list the packages in an array, and pass it to the package resource type. You can use this command to start cobbling the array syntax together:

yum list | grep ^nagios-plugin | awk -v q="'" '{ print ...
(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-08-13 09:19:04 -0500

Seen: 79 times

Last updated: Aug 15 '13