Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Live Data

64 views
Skip to first unread message

Roger McCarrick

unread,
Mar 13, 2025, 3:49:33 PMMar 13
to rundeck-discuss
I was looking at an automation platform called Rewst.
I can create a form with a dropdown menu of tenant users, and that list of users is generated on the fly with a backend Microsoft Get-GraphUser call.

Is there a way in Rundeck to have dropdowns generated on the fly with backend commands?

thanks.


rac...@rundeck.com

unread,
Mar 13, 2025, 4:38:49 PMMar 13
to rundeck-discuss

Hi Roger,

Is there a way in Rundeck to have dropdowns generated on the fly with backend commands?

Not at the moment. Yoy can suggest it here.

Greetings.

Roger McCarrick

unread,
Mar 14, 2025, 12:03:29 PMMar 14
to rundeck-discuss
Are OptionValues plugins a possibility? I'm not fully getting the concept ... the documentation can be hard to follow at times.

rac...@rundeck.com

unread,
Mar 14, 2025, 12:34:41 PMMar 14
to rundeck-discuss
Hello, Roger.

You can create list values, but not on the fly. Perhaps a more practical solution is to use remote json options, which allow you to produce a local/remote JSON file and observe the changes "on the fly".

Regards.

Roger McCarrick

unread,
Mar 17, 2025, 3:28:15 PMMar 17
to rundeck-discuss
I created an OptionsValue plugin, just for testing. It runs a script, the script sets 3 variables to a random word from a list of words in a file  (example sublime, subside, succumb).
The guts of the script does this :

x=`cat /home/rundeck/words | xargs shuf -n1 -e` 
y=`cat /home/rundeck/words | xargs shuf -n1 -e` 
z=`cat /home/rundeck/words | xargs shuf -n1 -e` 
 RESULTS=("$x" "$y" "$z") 
 echo "==START_OPTIONS==" 
 for result in "${RESULTS[@]}"; 
do
 echo "$result:$result" # Using value:label format 
 done
 echo "==END_OPTIONS=="

and that creates a dropdown menu in the Rundeck job of those 3 randomly picked words. Let's call that option 
${option.word} ,

And every time I load the Rundeck job, the 3 values change. 
So this is good ..  it shows me how I can run a script on the fly to generate the values in a drop down.

So can I pass the value of a previous option (example  ${option.ClientCode}) to the script?
I want the script to take in the value  ${option.ClientCode} and use it to generate the dropdown for  ${option.word}.

I can do this with cascading options, but that relies on a static JSON file, whereas the script is dynamic .. it will go get data base on  ${option.ClientCode}.
That script could be an api call using curl  ... like curl "https://myAPI-service/api/v1/cust/${option.ClientCode}" -method GET

rac...@rundeck.com

unread,
Mar 18, 2025, 2:28:51 PMMar 18
to rundeck-discuss
Hi Roger,

In Rundeck, dynamic options are processed through frontend JavaScript within the user interface (it looks at the value at the GUI level). This means that the dynamic option functionality is intended to work primarily at the GUI level (and not at the backend level). That deserves an enhancement (probably an interface to bring the existing options values). I´m pretty sure that was requested before.

Regards!


Reply all
Reply to author
Forward
0 new messages