It has been clear for years that there is the strong need to be able to test how changes to our Puppet code can affect our infrastructure.
The topic is quite large, complex, and, to be honest, not completely solved, but there are tools and methods than can help us in safely working with Puppet in a production environment.
We can test our code with these tools:
puppet parser validate, to check the syntax of our manifests
We can also follow some procedures ...