Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Allow empty ${option.name} and eliminate special case handling in scripts

#340

When trying to create a job which called a script with the calling convention "scriptname [option1] [option2]", after reading documentation 1.2.0, section 6.5, I realized that RunDeck does not handle a default option that is empty. For undefined options (ie in my case, a normal calling convention), I must update my scripts to handle RunDeck's expectation that ${option.name} will not be defined.

I'd like to propose that RunDeck handle an unsupplied optional option differently. Instead of not defining the option, requiring any called script to be update, just set the option to nothing. Perhaps a checkbox saying "Allow option to be empty". This would allow Rundeck to call existing scripts like my example above which is pretty standard.

If it did this, then one could configure a job step like this:

Path: /path/to/script
Commandline arguments: ${option.name}

Then scripts could be run as-is, and not have to be updated to deal with a nonexistent ${option.name}. If using variable replacement syntax the model would be to always reference it in quotes:

#!/bin/sh VAR1="@OPTION.NAME@"

When empty, it would resolve to
VAR1=""

IRC Chat attached

Reported by Duck · June 14th, 2011 @ 06:55 PM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Alex-SF
    Alex-SF
    • Tag set to feature request, options

    July 9th, 2011 @ 01:44 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.