Ithank you

I understand, I do not use puppet as he would really


Le vendredi 17 juin 2016 11:23:45 UTC+2, puppetstan a écrit :
>
> 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/8a17c930-e7c6-4a8d-b6b1-908be5645fdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to