We are using rundeck to scan logfiles for a service, and take action depending on what is found there. Basically, for each item found, for which a records does not exists, a git repository is initialized and a few rest endpoints are called, but that's not the point.
We are setting up the job to run as scheduled, say every couple of hours, and to send notification on failure, and additionally to send notification on success only when at least one action has been taken (ie. the shell script in the task entered the loop at least once). The script is written so that it only emits output on stdout when items to be actioned are found.
Is there a way in rundeck to trigger notification with this requirement? Or a way to script it without writing a plugin from scratch?
One possible workaround would be to switch the failure notification trigger off, and make the script return non-zero in case of no items actioned, but I am not comfortable in doing that.