Hello,
I'm new in Rundeck, I would like to use it to expose some scripts, I found it fantastic!
My question is about how to pass the options to script, to allow execution by web interface.
Let suppose Linux OS. I have a script, such as
/bin/myapp
with various options:
/bin/myapp -h -par <value1> -par2 <value2> -n
Some options require a value, some options don't require a value.
First choice is to let only one rundeck option value and people type free text, but I would like a better interface, with a rundeck option value for each script option.
So my rundeck configured command could be
/bin/myapp ${option.-h} ${option.-par} ${option.-par2} ${option.-n}
but I can't understand how to manage options configuration.
For option with value it could be very useful a *prefix value* configurable, such as
"-par" for "value1"; or the option name as a prefix, if I call "-par" the name for the option value "value1".
Instead, I have to manage the value with a regular expression like
^\-par\s.+$
and I force user to type "-par" in the value.
But the main problems are script options with no value.
"-h" or "-n" in my example are script options with no value and not mandatory. So the rundeck option value could be a list with
"-h,"
with restriction enforced from allowed values, but empty value is not accepted.
I would like to know how do you deal with these problems, maybe there are some best practices.
I thank you very much for every help you could give me to understand.
Warm Regards
Marco