Repositories defined in yaml, yum module below. Understand some of my 
floundering is still in this module so things like ensure => "present" are 
not intended to be taken literally

What this really does is wipe out the entire /etc/yum.repos.d/ directory 
then recreates the repos from yaml, not ideal as it fills my dashboard with 
constant changes in my infrastructure. 

*Puppet 3.7.5-1 on Red Hat 6.5, 64bit*

I would hope a work around would make puppet understand and catalogue 
properly every repository created with create_resources. The require was to 
stop Puppet from obliterating the /etc/yum.repos.d/ directory after 
creating the repositories.
I've searched plenty but perhaps I'm not using the right terminology. I can 
see several ways to handle it but none of them pretty, was hoping someone 
else saw this in the wild...

Regards, ~Chris

#init.pp
class yum {
  $yumconfig  = hiera_array("yum::configuration")
  $repos      = hiera("yum::repos")
  $repodefaults = {
    ensure  => "present",
    require => File[ "/etc/yum.repos.d"],
  }
  create_resources(yumrepo, $repos, $repodefaults)
  file { "/etc/yum.repos.d":
    ensure  => "directory",
    owner   => "root",
    group   => "root",
    mode    => "0755",
    purge   => "true",
    recurse => "true",
  }
  file { "/etc/yum.conf":
    ensure  => "file",
    owner   => "root",
    group   => "root",
    mode    => "0644",
    content => template("yum/yum_conf.erb"),
  }
}


-- 
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/74e60535-86d0-4733-8a4e-6dc682d53ba8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to