gurgeous/teleport — Issue #10: Access to the server object instance in callback methods
Author: tarnfeld
Created: 2011-12-29 01:06:41+00:00
State: open

It would be really handy if I could access the instance of `Teleport::Config::Server` so I could do something like this...

before_recipes do
# If we don't have the cron option on the server, just set it to an empty array
if !@server.options.key?(:cron)
@server.options[:cron] = []
end
end

after_recipes do

# Do something with @server.options[:cron] - perhaps install them into crontab
end

I'd like to have my recipes create cron entries, e.g.: mysql database backups but currently I can't see a nice integrated way to get shared data between the original server definition, all the recipes and then out at the end.

Hopefully that makes sense :)