On May 15, 9:32 am, Biltong <[email protected]> wrote:
> I have a class that pulls in some yum repositories. One of the yum
> repositories is disabled, but on one host I'd like to enable it.
>
> i.e. I'd like to do something like this:
>
> class { 'myyumrepos': }
> yumrepo { 'EPEL': enabled => 1, }
>
> What's the best way to do this?
>
> I am using an ENC.
Closest to what you actually wrote might be
class myyumrepos::epel_enabled inherits myyumrepos {
Yumrepo['EPEL'] { enabled => 1 }
}
include 'myyumrepos::epel_enabled'
Better, however, might be for class myyumrepos to rely on an external
data source (e.g. via hiera) to choose the correct 'enabled' value for
each repo in the first place:
# (in class myyumrepos)
yumrepo { 'EPEL':
# ...
enabled => hiera('EPEL_enabled')
# ...
}
John
--
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.