Refactoring a Puppet Module to Use Hiera
When writing Puppet modules, we have to be cautious of anything that will differ depending on the operating system or role. To account for these differences in Puppet, we have two different methods of storing variables that can be used in place of any attribute that will change depending on our node's traits: the
params pattern, and Hiera.
In this lab, you are supplied with a MySQL module that has already been set up to use the
params pattern. However, we want to refactor our module to use Hiera instead, completely eliminating the
params option for our module. To do this, we need to understand both how
params work, and how to set up Hiera to mimic that same behavior, proving that we are able to manage a module regardless of its creation process.