On Fri, Feb 15, 2013 at 10:42 AM, Tiago Cruz <tiago.tuxkil...@gmail.com>wrote:
> Hello, > > What's the problem with this syntax: > > package { 'redhat-lsb': > ensure => present, > before => File['/etc/yum.repos.d/rpmforge.repo'], > } > > file { '/etc/yum.repos.d/rpmforge.repo': > mode => 644, > owner => root, > content => template("base/rpmforge.repo.erb"), > require => Package["redhat-lsb"], > } > > The "before" and "require" its not working, 'Cause I still getting this > message: > > Could not retrieve catalog from remote server: Error 400 on SERVER: Failed > to parse template base/rpmforge.repo.erb: Could not find value for > 'lsbmajdistrelease' at > 4:/etc/puppet/modules/base/templates/rpmforge.repo.erb at > /etc/puppet/modules/base/manifests/repository.pp:23 > > > I'm using "lsbmajdistrelease" to discover the verstion of CentOS, but I've > noticed that some hosts has broken, because the package "redhat-lsb" is > missing. If I install the package with yum, everything works well, but I > would like to solve this with puppet. > You can't update fact information during a puppet run. Puppet either have or don't have lsb facts when applying the catalog, installing the package to satisfy the dependency won't help that particular puppet run (only the next one). I also find redhat-lsb package to be hideously large dependency for answering such a basic fact. Here's one possible work around (as long you don't need lsbrelease): https://forge.puppetlabs.com/nanliu/lsb HTH, Nan -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.