I'm using Rundeck to run remote jobs through the SSH executor. Some of the jobs I run log to specific files on the host, rather than STDOUT, and I don't have the ability to change this.
Is there any way to tell Rundeck to read those files as they get written (using something like tail -f
), and treat what appears there as the job output?
Adding tail -f
itself as a step wouldn't work, since it will never terminate.
If need be, a 'hacky' solution will do (like adding extra job steps for copying and reading logs) but ideally I'd like it to be neater. So if you could give me some guidelines how to build a plugin that will take the filename as a parameter and read the output from there, that would be better.
If you just want a file to read and print on STDOUT, then just use this inline script as additional step in workflow.
Give file name as argument