fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] I can't respond to prompts using Fabric "shell" or "run"


From: Niklas Lindström
Subject: Re: [Fab-user] I can't respond to prompts using Fabric "shell" or "run" verbs
Date: Tue, 16 Dec 2008 16:48:51 +0100

Hm. Of course, I can just *use* getpass here, although I loose some of
the `prompt` features. Remaining then is whether some secret expansion
is still desirable (the solution of which may or may not make the
usecase of `secret_prompt` interesting again)..


On Tue, Dec 16, 2008 at 4:45 PM, Niklas Lindström <address@hidden> wrote:
> This was an eerie case of synchronicity. I had the exact same problem
> about an hour ago.. :)
>
> I could work around it by using the Fabric `prompt` operation though,
> but since the use case was for adding users with passwords, I figure
> perhaps adding something like a `secret_prompt` may be useful (using
> the stdlib `getpass` module)?
>
> Albeit to be safe it must be coupled with some mechanism for blanking
> out the printout of the executed command.. Just off the top of my
> head, how about some special variable expansion syntax for that; e.g.:
>
>    secret_prompt('passwd', "Password for %s" % user, validate=r"^\w{6,}$")
>    sudo("htpasswd -m -b /etc/apache2/dav_svn.passwd $(user) $(passwd:secret)")
>    del config['passwd']
>
> ? Notice that last `del` as well, to cleanup the env unless
> `secret_prompt` shouldn't add the value there (which of course forces
> a rethink of how to do "secret variable expansion" as well)..
>
> Best regards,
> Niklas
>
>
>
> On Tue, Dec 16, 2008 at 3:39 PM, Jeff Forcier <address@hidden> wrote:
>> Hi David,
>>
>> Interactive prompting is still on the todo list, unfortunately. Fabric
>> is capable of re-prompting for sudo and login passwords, but we
>> haven't yet extended that to a more generic "is the remote end
>> prompting us for input?" functionality (which is a harder nut to crack
>> than simply parsing for a specific password prompt).
>>
>> So, you're not missing anything: that's just not possible right now.
>> But we hope to have it implemented in the near future :)
>>
>> Best,
>> Jeff
>>
>> On Tue, Dec 16, 2008 at 9:08 AM, Hancock, David (dhancock)
>> <address@hidden> wrote:
>>> I can't seem to see and respond to prompts (shell "read" commands) using the
>>> Fabric shell, and I'd be grateful for people telling me what I'm doing
>>> wrong.
>>>
>>> I'm trying to run the command line "/etc/init.d/oracle-xe configure" as part
>>> of installing Oracle, and no matter whether I enter it at a "fab>" shell
>>> prompt or via the run() command, the script reaches the first prompt and
>>> stops. I can enter what I know is the correct responses, but they are not
>>> accepted by the script and no furthe prompts appear.
>>>
>>> Other than that, we are having a great time using Fabric to automate or
>>> semiautomate deployment of software to dev, test, and production boxes; it's
>>> a very nice tool for us.
>>>
>>> Cheers!
>>> --
>>> David Hancock | address@hidden
>>>
>>> _______________________________________________
>>> Fab-user mailing list
>>> address@hidden
>>> http://lists.nongnu.org/mailman/listinfo/fab-user
>>>
>>>
>>
>>
>> _______________________________________________
>> Fab-user mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/fab-user
>>
>




reply via email to

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