Hi

Yes it's a solution but for the moment i would like to use a condition ;) 
but i have a problem with it ;)

Regards

Le mercredi 14 janvier 2015 18:34:58 UTC+1, puppetstan a écrit :
>
> Hi,
>
> I would like to update the package facter on all of my servers. (I can not 
> use INSTALL_OPTIONS because my puppet version is too old)
>
> I added a condition--> if the package facter is installed AND if facter 
> version is not facter-1.7.6-1.el6.x86_64.rpm I install the package but I 
> think 
> I have an error in my onlyif condition because it does not work.
>
> Can you have an idea please?
> Thanks in advance
>
> regards
>
>
> class paquet::redhat6-64 {
>
>         package {'facter':
>                   provider => 'rpm',
>         #          install_options => ['-Uvh'],
>                   source => "/tmp/facter-1.7.6-1.el6.x86_64.rpm",
>                   require => File["/tmp/facter-1.7.6-1.el6.x86_64.rpm"],
>                   notify => Service["puppet"],
>               }
>
>        file { "/tmp/facter-1.7.6-1.el6.x86_64.rpm":
>        source => "puppet:///modules/paquet/facter-1.7.6-1.el6.x86_64.rpm"
>        }
>
>         exec {'rpm updates':
>         command => '/bin/rpm -Uvh /tmp/facter-1.7.6-1.el6.x86_64.rpm',
>         onlyif => "/bin/rpm -q facter and ('/usr/bin/facter -v' != 
> facter-1.7.6)",
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/58c72c23-1631-4116-b829-074ced379635%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to