I know using procedural steps in Puppet is generally frowned upon, but since we are using it to deploy Veritas-managed clustered applications, there is a specific set of steps that must happen before the rpm install is called.
Currently, we manually freeze the Veritas cluster so it doesn't try to failover the application, run Puppet, which installs the RPM (bringing the application down if necessary), and Puppet is instructed not to start the application. We then manually start the application and unfreeze Veritas. Finally, we verify the status.
I would like to automate those Veritas steps, so that we only have to run Puppet. These steps are only done in our production environment. For all others, we just need to call the RPM install. To complicate matters, I don't want to do any of these steps if nothing has changed.
What is the preferred way to do something like this? I was reading about Run Stages, but it seems like it would require a significant refactor of my existing code.
Wondering if someone could give me some ideas on how to handle this.