Matt,
On Thu, Jun 21, 2012 at 8:44 AM, Matt Bierbaum <
matt.b...@gmail.com> wrote:
> I was wondering if there was a way to provide user interaction during
> provisioning. As it is now, I'm using a Shell provisioner that would like
> to ask for a password to gather a public key from another server. However,
> the ssh run during `vagrant up` does not allocate a pseudo-tty. Is there a
> way to provide this option to ssh during the up command. The shell does run
> successfully when run with ssh -t -p 2222 vagrant@localhost "/bin/bash
> ~/script.sh". I tried to sneak it into other parts of the ssh command but
> it appears you've escaped the options well enough.
>
> I was also considering using ssh-askpass, but haven't got that to function
> properly either. The last option is to login to the box and run the script.
> I was hoping to make these as simple to distribute as possible though.
There isn't any way to ask for input because usually thats not what
you want to do. However, it is an idea for the future.
In the meantime, there are a few options:
1. Use a version control ignored local file for storing your
passwords, have your Vagrantfile read this file. This way the
passwords remain on the system.
2. Use environmental variables that are read in the Vagrantfile and
passed as arguments perhaps to the shell script.
I hope this helps.
Best,
Mitchell
>
> Thanks!