In reference to Wiki:
There's mentioned of sudo configuration. The steps are clear but the purpose is a little misleading...
1) Having used NOPASSWD in sudoers file, what's the purpose of "echo "$nolio_password" in the customActionsRunner.sh file?
Can we improve the steps to add detailed usage and configuration with PASSWD and NOPASSWD?
The purpose of "echo "$nolio_password" in the customActionsRunner.sh file, when no password is specified in job action for impersonate user account, then it becomes echo "" (echoes an empty sting). when you do specify the password in job action, then it becomes echo "<password>".
I just stumbled upon this discussion. Instead of just marking Piyush's response as the correct answer I wanted to add that I can vouch that the echo string placed in the customActionsRunner.sh will work (with "$nolio_password") regardless of whether NOPASSWD is being used or not. The "$nolio_password" is there for when NOPASSWD is not being used. And when NOPASSWD is used echo'ing $nolio_password doesn't cause a problem (i think because sudo isn't prompting for a password anyway). I frequently change my sudoers, while doing different tests, to add/remove the NOPASSWD and never needed to change my customActionsRunner.sh file.