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, 64bitI 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"),
}
}