--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
This is a provider called rpm_plus.rb -- I found most of it floating
around on the web and I seem to recall tweaking some small part of it,
although I don't recall now what it was... in any event this works and
is in use in our environment. Provider looks like:
Puppet::Type.type(:package).provide :rpm_plus, :parent => :rpm, :source =>
:rpm do
has_feature :versionable
desc "Support via ``rpm``."
commands :rpm_plus => "rpm"
def rpm(*args)
rpm_plus(*args + @resource[:vendor].split(" "))
end
end
You'd throw this in a file called rpm_plus.rb and stash it in
<module>/lib/puppet/provider/package/. What this basically does is
wrap the existing RPM provider with another one that lets you pass
arguments in a "vendor" attribute.
You would then install your RPM package in your manifest the following way:
package{ 'My_package':
ensure => 'version_number',
provider => rpm_plus,
source = "<my_package_location>",
vendor => "--prefix=/home/ads",
}
The key bits are the provider => rpm_plus attribute, which tells
Puppet to override its default yum provider, and the vendor attribute,
into which you pass your additional arguments.
-Eric
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.