Re: [rundeck] Interactive shell prompts using Rundeck

2,301 views
Skip to first unread message

Alex Honor

unread,
May 7, 2013, 8:25:10 PM5/7/13
to rundeck...@googlegroups.com
Hi Joe,

Is it possible to have a script that provides the input to the interactive command? You could setup a Job that calls that "front end" script. Beyond that, thoughts of expect-like tools come to mind.

Thanks


On Tue, May 7, 2013 at 4:22 PM, <jdev...@comcast.net> wrote:
Hi

I am running a remote script that has confirmation prompts.  Currently, when prompted, the screen waits indefinitely for an input that never happens.  I am not able to answer the prompt.  Is there a way to enter the input request to the prompt so that the command can continue?

Thanks

Joe

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jdev...@comcast.net

unread,
May 7, 2013, 11:39:01 PM5/7/13
to rundeck...@googlegroups.com
Alex

Thanks for the quick response.  Unfortunately, the output is non-deterministic.  It is not as simple as a user/password prompt.  It is a command line with multiple options where the prompt is determined by the input.

Joe

Moses Lei

unread,
May 8, 2013, 9:38:25 PM5/8/13
to rundeck...@googlegroups.com
Joe, basically you've run into input that's not easily scriptable. Having to provide interactive input defeats the purpose of automation, anyway-- you might as well log onto the box with ssh at that point.

I would say see if expect does what you need to do. If it's even more complicated than that, I would test the program for the "tree" of answers to give, then determine which trees you can have a script follow, and write one (in some kind of high level scripting language like python or ruby).

If those alternatives don't pan out, it's time to look at what other tool besides this interactive command line utility could provide the same functionality

What does this thing requiring interactive input do?

Moses


--
Moses Lei
Principal, Village Chime LLC
mobile: +1 703 901 5969 | skype: moseslei | yahoo: moseslei

jdev...@comcast.net

unread,
May 8, 2013, 11:39:44 PM5/8/13
to rundeck...@googlegroups.com
Moses

They are confirmation screens before performing commands on a production website.

Joe

Moses Lei

unread,
May 9, 2013, 6:13:11 AM5/9/13
to rundeck...@googlegroups.com
Ah, I see, so it's a matter of someone has to look at it and make sure the commands are right?

If that's your in-house script that puts up the confirmation screen, one way to change it to integrate into RunDeck is to split the functionality into a "dry run" that simply shows you the screen, then quits, and another invocation that actually goes through with it. You could then have a job for each without having to prompt for extra input.

Moses

--
Moses Lei
Principal, Village Chime LLC
mobile: +1 703 901 5969 | skype: moseslei | yahoo: moseslei


Reply all
Reply to author
Forward
0 new messages