Rundeck setsup all the options passed to a job as environment variable like $RD_OPTION_*
but it is not setting up those variables when a job is executed in remote n
As Yang said it was due to ssh configurations. Likewise AcceptEnv
variable in sshd_config
there is SendEnv
variable in ssh_config
so I have to specify RD_*
in SendEnv
like this SendEnv RD_*
in localhost ssh_config which will instruct ssh to send those environment variables to server. I found out the following things that needs to be done when working with environment variables
SendEnv
needs to be setup in ssh_config
file in localhost for sending the environment variables.AcceptEnv
needs to be setup in sshd_config
file in remote node in order to accept environment variables passed to the server.