14.5. Extending the Module
You can extend the module (besides using the yum::repository definition), by adding profiles other then yum::standard, yum::testing, yum::development, yum::eatbabies, for example, yum::myprofile. To do so, create a class in classes/yum.pp as follows;
class yum::myprofile inherits yum::standard {
yum::repository { "custom1":
enable => true
}
class disabled inherits yum::myprofile {
Yum::Repository["custom1"] {
enable => false
}
}
}
To have a node be configured to use the custom1 repository (enabled), use:
node 'node1.example.org' {
include yum::myprofile
}
To have a node be configured to use the custom1 repository (disabled), use:
node 'node1.example.org' {
include yum::myprofile::disabled
}
Additional customizations, such as a myprofile2 with additional custom repositories, plugin configuration or update schedules, should go into classes/yum.pp as well.