ensure => '5.0' should work but you may want to add a dependency to the 
package resource to ensure that the file is downloaded first.

package { "package":
    ensure => '5.0',
    provider => 'rpm',
    source => '/tmp/package-5.0.el6.noarch.rpm',
    require => File['/tmp/package-5.0.el6.noarch.rpm',
}


On Monday, February 13, 2017 at 7:56:09 AM UTC-5, puppetstan wrote:
>
> Hi,
>
> i would like modify my conf because is not satisfactory
>
> i would live verify my package version and if my version is 5.0 i do 
> notfhing but if the version is 2.0 for example i download my package in 
> /tmp and i update package...this is my conf but it's not very good...
>
> file { "/tmp/package-5.0.el6.noarch.rpm":
>         ensure => 'present',
>        source => "puppet:///modules/package/package-5.0.el6.noarch.rpm"
>       }
>
> package { "package":
>         ensure => '5.0',
>         provider => 'rpm',
>         source => "/tmp/package-5.0.el6.noarch.rpm"
>         }
>
> can you have an idea with condition if i do nothing else dwonload package 
> and i update...
> regards
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/183e82ab-3287-449f-9612-93031acf0c91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to