I don't see why you'd want separate repository templates for SL5 and 6 on a
Yum-based host. EPEL is EPEL. The URLs can be adjusted with one variable,
and you'd save yourself lots of repeated conditionals, which are where bugs
tend to lie.

And as @stdweird says, adding repositories would then become a matter of
appending to a list.
--
Luis Fernando Muñoz Mejías
lfmunozmejias@gmail.com