Option variables throws 'bad substitution' error in job script

406 views
Skip to first unread message

Eric Fanson

unread,
Feb 11, 2022, 6:02:01 AM2/11/22
to rundeck-discuss
Have setup Option parameters in Webhook configuration and I could see that the values are available in Rundeck job.

But when I try to refer them in the scrip like below, it is throwing  'bad substitution' error.
echo ${option.host}
echo ${option.whkpayload}

I even tried to enclose them in single quotes(as mentioned in other threads), but that didn't work either.
echo '\${option.host}'
echo '\${option.whkpayload}'

I am using Rundeck version : 3.4.4-20210920, can somebody help me resolve this issue as I am blocked ?

rac...@rundeck.com

unread,
Feb 11, 2022, 6:26:10 AM2/11/22
to rundeck-discuss

Hi Eric,

The correct way to call options on inline scripts is using @option.myoption@ format.

Could you test it?

Regards!

Reply all
Reply to author
Forward
0 new messages