Hi,


I'm not an expert on puppet and I have some syntax problems


I would check if the package is installed and compare the version of the 
package with the version I would like to see installed


IF the package is installed with the correct version DO NOTHING

BUT if it is not installed or installed but not the correct version, 
uninstall it and download the right package with the right version and 
install


I started to do something that is not terrible and I would like your help 
to answer my problem


thank you very much in advance


here is the beginning of what I've done


if package { 'xyz' ensure=> '1.2'}
    do nothing

    else {
    exec => rpm -e xyp-packagebadversion


file { "/tmp/xyz-packagegoodversion":
       ensure => 'present',
       source => "puppet:///modules/package/xyz-packagegoodversion"
}
package { "xyz":
        ensure => '1.2',
        provider => 'rpm',
        source => "/tmp/xyz-packagegoodversion"
        }

-- 
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/4835a155-1a2c-4857-b0a4-090dd1a28657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to