I was recenlty adding a user account for someone that needed access to a couple of our legacy systems. These systems are on a version of puppet code that we have not maintained for almost 2 years (ever since we re-worked our network and re-wrote our puppet code to be cleaner and more efficient).
Erring on the side of caution I checked and found that puppet hadn't been run on one of the servers for almost 2 years (which is scary). But, I needed to get the person's account propogated out to the machines in question (as we only use puppet for account management. We DO NOT manually create accounts).
So, I decided to run puppet JUST for the module in question. This has the benefit of only applying the changes of the module you want and nothing else in the puppet ecosystem.
First thing to do was to run the command, but with the added '--noop'. This will allow us to see what changes were going to be made, without actually applying them:
# puppet agent -vt --noop --tags=moduleThe '--tags=module' portion of that line allows you to specify which module you want to apply to the system during the puppet run. The '--noop' tells puppet to run in what is essentially known as 'just kidding' mode. This means it will run, but it won't apply anything. Instead, it will tell you what it would have done. This way, you can see what changes would be made, just in case there were some you didn't expect. This is an excellent feature that can help you avoid any unexpected changes that can really cause things to go awry.
After that runs and you confirm that all is ok with what it would have done, simply run the command again, but without the --noop, and it will apply the changes.
No comments:
Post a Comment