fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Fabric Run Prompt


From: Kyle B
Subject: [Fab-user] Fabric Run Prompt
Date: Wed, 16 Nov 2011 17:41:32 -0700

Hello,
 
I'm fairly new to Fabric, and have been battling this problem for the last couple days. Right now I'm using fabric to log into a series of remote boxes and run some commands. The problem is that some of those commands I need to run have prompts that I need to handle. I saw that I can abort the script on prompts, but I need to interact with them.
 
Is it possible when using the run or sudo commands to do something like:
 
result = run("/path/to/command.sh")
if result prompted me with "Enter ....", then pass in text ".....".
 
Have people encountered this before, wanting to interact with remote prompts using the run command?
 
Specifically, I'm using the run command to manage svn.
 
run("svn update -q -r HEAD --username kyle --no-auth-cache /www/doc_root/html /www/doc_root/crons")
 
And the response I get from the server is:

[server] out: Authentication realm: Subversion
[server] out: Password for 'kyle':
 
And then it sits there waiting for me to enter my svn password. I know I can include it on the run command since svn supports --password, but I'd rather pass it in when prompted for security reasons.
 
Thanks,
 
-Kyle

reply via email to

[Prev in Thread] Current Thread [Next in Thread]