Hi Juliano,

>> package epel-release-7-0.2.noarch.rpm is already installed

You are using -ivh, so if package is already installed it will fail.
Which is apparently the case.
You should use -Uvh, (U for upgrade) meaning in case the package you try
to install is more recent that the one that is installed, it will
upgrade it.

Also not sure why you don't use the EPEL module on the forge
https://forge.puppetlabs.com/stahnma/epel, which does install EPEL
pretty well.

Hope it helps,

--
Yanis Guenane




On 08/21/2014 02:55 PM, Juliano Resende wrote:
> Hi,
> 
> I made a mistake, the name of the rpm package is wrong, the correct form is
> 
>  package {'epel-release-7-0.2.noarch':
>                  ensure => present,
>                  provider => 'rpm',
>                  install_options => ['-ivh'],
>                  source => "/tmp/epel-release-6-8.noarch.rpm",
>                  require => File["/tmp/epel-release-6-8.noarch.rpm"],
>              }
>              file { "/tmp/epel-release-6-8.noarch.rpm":
>                  source => 
> "puppet:///modules/core/repository/epel-release-6-8.noarch.rpm"
>              }
> 
> Thanks any way
> 
> Em quinta-feira, 21 de agosto de 2014 14h50min56s UTC-3, Juliano Resende 
> escreveu:
>>
>> Hi people,
>>
>> I created a module to install some rpms, but after rpm is installed, in 
>> the next time the agent go check for new changes in my puppet master, i get 
>> the error with the information that rpm packages is already installed.
>>
>> My module 
>>
>>  package {'epel-repo-centos7':
>>                   ensure => present,
>>                   provider => 'rpm',
>>                   install_options => ['-ivh'],
>>                   source => "/tmp/epel-release-7-0.2.noarch.rpm",
>>                   require => File["/tmp/epel-release-7-0.2.noarch.rpm"],
>>               }
>>  file { "/tmp/epel-release-7-0.2.noarch.rpm":
>>                   source => 
>> "puppet:///modules/repository/epel-release-7-0.2.noarch.rpm"
>>  }
>>
>> Error
>>
>> LevelMessageSourceFileLineTimeerrExecution of '/bin/rpm -i -ivh /tmp/
>> epel-release-7-0.2.noarch.rpm' returned 1: Preparing... 
>> ################################################## package 
>> puppetlabs-release-6-10.noarch is already installedPuppet2014-08-21 13:46 
>> BRTerrchange from absent to present failed: Execution of '/bin/rpm -i 
>> -ivh /tmp/epel-release-7-0.2.noarch.rpm' returned 1: Preparing... 
>> ################################################## package 
>> epel-release-7-0.2.noarch.rpm is already installed
>> /Stage[main]/Core::Repository/Package[epel-release-7]/ensure
>> /etc/puppet/environments/production/modules/core/manifests/repository.pp572014-08-21
>>  
>> 13:46 BRT
>> Somebody knows why?
>>
>> Thanks.
>>
>> At,
>>
>> Juliano Resende - Brasil
>>
> 

-- 
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/53F72FC0.3060608%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to