[英]Get input job value to use it in a command execution Rundeck
My Rundeck detail: 我的Rundeck详细信息:
Rundeck version: 2.10.7
install type: rpm
OS Name/version: CentOS 6.7
DB Type/version: h2
I want to get all data from a required input data and use it in a script execution as follows: 我想从所需的输入数据中获取所有数据,并在脚本执行中使用它,如下所示:
/home/user/script.sh INPUTDATA1 INPUTDATA2
I tried next variables but it does not work: 我尝试了下一个变量,但它不起作用:
/home/user/script.sh $RD_OPTION_1 $RD_OPTION_2
What should I do? 我该怎么办?
I think about modifying the script.sh
to get those input options as @option.1@
but I'd prefer to use the scripts without modifying them. 我考虑过修改
script.sh
以将这些输入选项作为@option.1@
来获取,但我宁愿使用脚本而不修改它们。
The convention is whatever is the field name that should be given after RD_OPTION_. 约定是在RD_OPTION_之后应提供的字段名称。 For example if message is field name it will be $RD_OPTION_MESSAGE.
例如,如果消息是字段名,则它将是$ RD_OPTION_MESSAGE。 Make sure your you are passing right names, based on your question, it expects field names 1 and 2. You can read more on this documentation
确保您传递正确的名称,根据您的问题,它要求使用字段名称1和2。您可以阅读本文档的更多内容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.