On 09-May-2011, at 6:33 PM, Martijn Grendelman wrote:
> On 09-05-11 14:29, Jeff wrote:
>> Is it possible to extend 'package' without actually hacking the puppet
>> code. I'd like to do this:
>>
>> package { "httpd":
>> name => "httpd",
>> ensure => "present",
>> check => "newer",
>> }
>>
>> My goal is this. For every package I have in puppet, I'd like to check
>> to see if I have a newer version in the repository than I have on the
>> server. If that's the case I'd like to record that. (Probably in a log
>> file). This will allow me to produce a report of packages that need
>> upgraded. I can't just "ensure => latest" because it violates our
>> change procedure.
>>
>
> You could define a type, that wraps Package and uses an Exec to do
> whatever you want.
>
I guess if you ever want to do this kinda stuff , Either implement this core
logic in package provider or separate out this kinda controlled change
management out of config management . For my case i had a requirement of
installing a package from a particular yum repo , so i wrapped up “Yum install
stuff” in a definition and some hacky stuff .
--
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.