To support two versions at the same time during upgrade puppet_major_version and puppetdb_major_version variables were created. After April 2018 these both can be removed, along with the various conditions using them, as older puppet and puppetdb versions will no longer be supported
Likewise hieradata for the puppet masters/dbs should be cleaned up, consolidated, moved out of regex, etc.