Use a more general method of installing the base puppet repositories

Our version of the "install repositories" step treated all redhat variants as
EL, which was incorrect. The new code is adapted from puppet and should work
across versions.