On Wed, Aug 25, 2010 at 11:47 PM, Christian Casar <[email protected]> wrote:
> Hey,
> I'm running Puppet 2.6.0 and somehow I can't really use the rpm
> provider like I was used to in previous versions.
> This is what my manifest looks like:

[snip]

>        package { "mod_security2":
>                ensure   => present,
>                source   => "/tmp/apache2-
> mod_security2-2.5.9-6.2.x86_64.rpm",
>                provider => "rpm"
>        }
>
> As long as the package isn't installed the manifest works fine, but
> afterwards every run throws this error:
>
> Thu Aug 26 08:29:06 +0200 2010 /Stage[main]/Webserver::Apache/
> Package[mod_security2]/ensure (err): change from absent to present
> failed: Execution of '/bin/rpm -i --oldpackage/tmp/apache2-
> mod_security2-2.5.9-6.2.x86_64.rpm' returned 1:    package apache2-
> mod_security2-2.5.9-6.2.x86_64 is already installed

Puppet is checking if the package "mod_security2" is installed but I
think the package is called "apache2-mod_security2", right?

If you add name => "apache2-mod_security2", it should do what you expect.

Since you haven't specified the name property, puppet automatically
uses the title as the name of the package to check.  Puppet is doing
the equivalent of rpm -q mod_security2 when it should be doing rpm -q
apache-mod_security2 to check if the package is installed or not.

Hope this helps.

--
Jeff McCune



-- 
Jeff McCune
http://www.puppetlabs.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to