I have an define
backup::directory() {} within my puppet catalog.
This define is used to backup an directory with rsnapshot from an production server onto an backup server:
backup::directory { "/home/web/example.com": }
For our internal sysadmin documentation we need to add this to our wiki. This is done via an script that generates an html overview:
server.example.com
/home/web/example.com
server2.example.com
/home/web/foo/bar
/var/www
If we add in our puppet configuration an new directory to backup, the documentation will be updated on-the-fly without any action from us.
That's pretty cool - we also can use this to generate an overview of
apache::sites::vhost {}. So every guy knows where an apache vhost is configured.
You can get that code on
github.com.
./puppet_documentation.rb --resource Backup::Directory --name "Directory Backup System"