Hi,
I'm trying to pull in some sensitive information using the vars_prompt construct.
My playbook looks something like this (see [1] for full source):
---
- hosts: all
sudo: true
vars:
...
vars_prompt:
some_user: "Enter some username"
some_prefix: "Enter some prefix"
some_pass: "Enter some password"
pre_tasks:
...
roles:
...
But when I execute this (via vagrant provision), I get:
$ vagrant provision
==> default: Running provisioner: ansible...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=*** --user=vagrant --connection=ssh --limit='default' --inventory-file=*** playbook.yml
Enter some username: : Test<enter>
... then absolutely nothing happnes, until I Ctrl+C:
^C==> default: Waiting for cleanup before exiting...
ERROR: interrupted
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
For reference, my (very simple) vagrant file looks like this (see [2] for full source):
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/centos-6.5"
config.vm.network "forwarded_port", guest: 80, host: 8889
config.vm.provision :ansible do |ansible|
ansible.playbook = "playbook.yml"
end
end
Anybody had similar issues?
My OS and version info:
- Host OS: Ubuntu 14.04 LTS "trusty" 64bit
- Guest OS: CentOS 6.5 64bit
- Ansible version 1.5.4
- Vagrant version 1.7.2
Best Regards
// Samuel