-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-private prompts in Ansible not working #2924
Comments
Confirmed here, too... I was about to do the exact same thing you did, @martinp, but luckily a quick google search found your repo, then this issue. |
@geerlingguy Which platform are you using? I'm trying to determine if this issue is specific to OS X. |
OS X, specifically Mavericks 10.9.1 and 10.9.2 beta. |
@martinp, we've bumped into this for our packaging for the CKAN project. I'm using a fedora host building onto an ubuntu vm, I'm using the fedora repo's ansible rpm at the moment, I will experiment with other versions when I get some time. |
Like any other Ansible private prompts (e.g. Other user prompts (e.g. I only verified on OS X, but I suppose it will behave the same on a Linux host. Except if @mitchellh has an idea about how to easily tweak the childprocess stdin pipe for python's Note that in #3396, I also want to evaluate if Vagrant support for all (existing) interactive prompt options (e.g.
|
Not allowing any kind of prompts would really take away from the integration of Vagrant with Ansible; I am currently able to prompt users for a network credential during the build process, so they can do things like grab a particular file from an NFS share, or mount an SMB volume. It would be awesome if we could get non-private prompts working too, but it sounds like that might be a tall order. Is there something like |
@geerlingguy thanks for your feedbacks!
It is not question to prevent prompts, but (for sake of dear simplicity) to maybe not officially support these Ansible features (passing prompt args via
Of course, it would be an optimal solution for Vagrant integration and I can figure out some other "piped usages" where it could also make sense. Though it is not a priority issue for me, but please let us know if you start the discussion on Ansible mailing list... |
Work around for me. I only needed vars_prompt when pushing to remote servers, so it wasn't needed when provisioning locally with ansible and vagrant. And if you define the variable with extra_vars ansible will skip the prompt. It's a little less flexible but good enough for me when working locally.
|
Closing in favor of guidelines in #3396 |
This is a little note for people hitting an unexpected This problem
|
Or put the following in your
|
Using non-private prompts in Ansible provisioning won't work when running provisioning with
vagrant provision
.With non-private prompts the input will be echoed, but hangs after hitting enter at the prompt. Private prompts behave correctly.
Non-private prompts behave correctly when running
ansible-playbook
directly. My guess it has something to do with how Vagrant handles stdin in the Ansible provisioner.To reproduce:
git clone https://github.com/martinp/vagrant-ansible-prompts
vagrant up
Vagrant 1.4.3
Ansible 1.4.4
OS X 10.9.1
The text was updated successfully, but these errors were encountered: