Greg and folks,
I'm currently working on extending Rundeck to be able to delegate executions to Salt, but am a bit stuck with a couple of points.
For a little background, the goal is to have Rundeck send commands and target node definitions to a Salt master, which would then dispatch those to the actual nodes running the Salt minions. The sequence would be as follows:

I'm breaking up the work to be done in three parts:
- Adding a delegated dispatcher/executor to Rundeck
- Writing custom Salt returners to post ouput back to Rundeck
- Adding a new method to the Rundeck API to accept ouput
I'm starting to tackle item #3 - getting Salt minions to write output back to Rundeck. Given that Rundeck already has an API end-point for fetching output from an execution, I think it would be the logical place to add the ability to post output back.
To retrieve output:
And now using the same endpoint to submit/append output:
{ payload: 'a string containing log output to be appended' }
So far I've managed to update the Grails UrlMappings and added a new controller / action which accepts a JSON request. No problems there.
The issue is I am having a hard time figuring out how to hook in to logging. I've created a new apiExecutionAppendOutput closure in the ExecutionController and am able to get the execution, but that only gives me the "grails" execution record and not the "actual" execution instance.
Any words of wisdom? Also, should I be approaching this differently?
Thanks,
JB