On Mon, Jul 18, 2011 at 7:38 PM, Justin Lambert
<jlambert@localmatters.com> wrote:> I know I am not the first to run into this problem, but I cannot seem to
> find an elegant way to solve it - either through Google or on my own.
> I want to ensure that the yum repos I define through Yumrepo are the only
> repos on the machine (removing any that might be on there for other
> reasons). I have come up with a few ways to do it, none that I really
like.
> 1 - sync the yum.repos.d/*.repo files from puppet using the recurse =>
true,
> purge => true. While this accomplishes the goal, I remove the
"feature" of
> being able to define a repo like
>
"http://yum/shared/corp/${::lsbmajdistrelease}/${::architecture}/" and
have
> it "magically" work for future versions of OS without having to
copy/paste
> new repo files.
> 2 - Keep the above directory purge options, but sync an empty directory and
> then have puppet push out all relevant repos. This makes sure nothing else
> is there, but will force all repos to be pushed out every puppet run. Not
> the end of the world, it just doesn''t seem as clean as it should
be.
> 3 - Delete the contents of the directory before any repos are pushed unless
> my special dotfile exists saying I at one point purged the cruft. This
will
> work to make sure things are as I want them at a given point in time, but
> will not enforce it automatically in the future unless the dotfile is
> removed.
> How have others dealt with this?
Either resources resource, or model yumrepo as a define resource type
which translate to a file resource and the parameters set the content
of files in yum.d (the second option allows purging of the directory
as a file without the downside mentioned above).
Thanks,
Nan
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.