Rake tasks

Add rake tasks as an easily importable ruby file
The task created by this line doesn't seem to work. I get NameError: undefined local variable or method `failure_message` whenever I run it. It also doesn't seem to actually use the :hosts and :type argument that I pass to it whereas the tasks defined below seem to work fine.