refactor common bits of centos6 scripts

Common code is extracted to functions in a shared file.

In addition the commit adds initial puppet.conf compatibility with
puppet pluginsync. (required by concat module)