Hi, with RH6 you can use yum provider and set ensure to latest. (Maybe you need to create a yum repo for your factor package).
hth, Martin On 14 Jan 2015, at 18:34, puppetstan <stanislas.lev...@gmail.com> wrote: > 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/d4289154-27d7-489d-adea-c452b4d6c767%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/8D42B17B-9A0D-4EAE-99B5-F19B6D264959%40gmail.com. For more options, visit https://groups.google.com/d/optout.