thanks for your answer

But with this conf, my package package-5.0.el6.noarch.rpm is automatically 
downloaded even if my package version is 5.0. So it's my problem. I don't 
want downloaded package package-5.0.el6.noarch.rpm if my version package is 
5.0...

file { "/tmp/package-5.0.el6.noarch.rpm":
#        ensure => 'present',
       source => "puppet:///modules/puppet/package-5.0.el6.noarch.rpm"
      }


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

Regards


Le lundi 13 février 2017 16:44:03 UTC+1, Michael Watters a écrit :
>
> 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/c089f9c6-95ae-45f7-819e-332a1900f362%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to