ReleaseEngineering/PuppetAgain/HowTo/Hack on PuppetAgain: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 67: Line 67:
** Examples crontab vs cron.d/*, http.d.
** Examples crontab vs cron.d/*, http.d.
* You should specify the parent dir to purge and recursive, so that when you remove a resource from puppet it removes itself from the machine.
* You should specify the parent dir to purge and recursive, so that when you remove a resource from puppet it removes itself from the machine.
* The crontab resource has complex gotchyas, *always* use cron.d/* for cron.
* The crontab resource has complex gotchyas - *always* use /etc/cron.d/* files for cron.
* config resources which are run automatically should explicitly depend on the Classes they need to run properly.
* When installing files that might be executed immediately, e.g., crontabs or application scripts, use ''require'' to ensure that all prerequisites are installed first, to avoid unnecessary failures.
 
== Revertible ==
Where it's not too difficult, try to write classes so that *removing* a resource will cause a corresponding removal on clients.  For example, when ''sudoers::custom { foo: command => "foo" }'' is removed from a client's catalog, the 'foo' command can no longer be run from sudo. To do otherwise could cause nasty security problems!


= Nit-Worthy Code Style =
= Nit-Worthy Code Style =
canmove, Confirmed users
1,394

edits

Navigation menu