example42 / puppet-yum

Puppet module for Yum
Other
43 stars 116 forks source link

Centos6.6 - require yum - this does not call a "refresh" #113

Closed felipe1982 closed 9 years ago

felipe1982 commented 9 years ago

I need nginx installed for my modules to operate as required. I'm not using nginx module from forge (made my own very basic one).

At top my my nginx::install, I require yum and this adds the EPEL repo. When it comes time to package { 'nginx': ensure => present }. It complains that It cannot find nginx in repos.

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list nginx' returned 1: Error: No matching Packages to list Error: /Stage[main]/Freshmobile::Nginx::Install/Package[nginx]/ensure: change from absent to present > failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list nginx' returned 1: Error: No matching Packages to list

alvagante commented 9 years ago

With yum there's no need to refresh anything, as in apt with apt-update. You just need to be sure that the nginx package is installed after the yum repo, so I would place, where you declare the nginx package somtehing like: require => Yumrepo['epel'], # Or whtever is the resource that configures epel)