Thank you.
Simple enough to ignore the hack-ish nature :)

Looks like it will do the job

All it needs are a few yum commands to run whenever the file changes to refresh 
the local databse.

I will tinker with that and report back to the list.

Pay It Forward !
Share & Enjoy !

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

----- Eric Sorenson <[email protected]> wrote:
> This is sort of hackish but not too bad... set a list of file resources 
> that are the resultant names of the /etc/yum.repos.d/<blah>.repo files, and 
> purge everything else in that directory.
> 
> class yum::cleanup {
>     # shorthand for the repo directory
>     $rd = "/etc/yum.repos.d"
> 
>     # clean the yum.repos.d directory of any non-managed files
>     file { "$rd": ensure => directory, purge => true, recurse => true }
> 
>     # NOTE: If you add a new yumrepo, make a matching file resource here!
>     file { [ "$rd/local.repo",
>              "$rd/os.repo",
>              "$rd/base.repo", ] : 
>                 ensure => present, 
>          }
> 
> }
> 
> class yum::repositories {
>     require yum::cleanup
> 
>     yumrepo { "os"
> 
>    .... etc ...
> 
>     }
> 
> }
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/62XjufqJOh8J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to