GetValkyrie / valkyrie

Valkyrie is an opinionated local dev stack that makes features/git based Drupal development easy.
http://www.getvalkyrie.com
GNU General Public License v3.0
45 stars 11 forks source link

vnew - ansible-playbook: command not found #30

Closed ghost closed 9 years ago

ghost commented 9 years ago

ansible-playbooks fails during vnew

[peuc@sz6 tmp]$ drush vnew valkyrie Valkyrie project initialized at: valkyrie [ok] Bringing machine 'valkyrie' up with 'virtualbox' provider... ==> valkyrie: Importing base box 'ubuntu/trusty64'... ==> valkyrie: Matching MAC address for NAT networking... ==> valkyrie: Checking if box 'ubuntu/trusty64' is up to date... ==> valkyrie: Setting the name of the VM: valkyrie_valkyrie_1425995730460_43820 ==> valkyrie: Clearing any previously set forwarded ports... ==> valkyrie: Clearing any previously set network interfaces... ==> valkyrie: Preparing network interfaces based on configuration... valkyrie: Adapter 1: nat valkyrie: Adapter 2: hostonly ==> valkyrie: Forwarding ports... valkyrie: 22 => 2222 (adapter 1) ==> valkyrie: Running 'pre-boot' VM customizations... ==> valkyrie: Booting VM... ==> valkyrie: Waiting for machine to boot. This may take a few minutes... valkyrie: SSH address: 127.0.0.1:2222 valkyrie: SSH username: vagrant valkyrie: SSH auth method: private key valkyrie: Warning: Connection timeout. Retrying... valkyrie: Warning: Connection timeout. Retrying... valkyrie: Warning: Remote connection disconnect. Retrying... valkyrie: Warning: Remote connection disconnect. Retrying... valkyrie: Warning: Remote connection disconnect. Retrying... valkyrie: valkyrie: Vagrant insecure key detected. Vagrant will automatically replace valkyrie: this with a newly generated keypair for better security. valkyrie: valkyrie: Inserting generated public key within guest... valkyrie: Removing insecure key from the guest if its present... valkyrie: Key inserted! Disconnecting and reconnecting using new SSH key... ==> valkyrie: Machine booted and ready! ==> valkyrie: Checking for guest additions in VM... ==> valkyrie: Fixing NFS user/group mapping. valkyrie: Setting up SSH access for the 'ubuntu' user. valkyrie: Refreshing SSH connection, to login as 'ubuntu'. valkyrie: Installing Ansible from sources. valkyrie: Running Ansible playbook to re-map users and groups. ==> valkyrie: bash: line 3: ansible-playbook: command not found The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ansible-playbook /tmp/mount.yml -i /tmp/inventory --connection=local --sudo --extra-vars "host_os=x86_64-linux host_gid=100 host_uid=1000 "

Stdout from the command:

Stderr from the command:

bash: line 3: ansible-playbook: command not found

ghost commented 9 years ago

To fix, use host's name resolver by running: VBoxManage modifyvm "valkyrie" --natdnshostresolver1 on

ergonlogic commented 9 years ago

This can be done in the Vagrantfile with:

config.vm.provider "virtualbox" do |v| 
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end

That said, I've never had to do this before. How are you installing Vagrant? And on what OS?

ghost commented 9 years ago

I simply added the following inside the v.vm.provider 'virtualbox' do |vbox|end block:

vbox.customize ['modifyvm', :id, '--natdnshostresolver1', 'on'] vbox.customize ['modifyvm', :id, '--natdnsproxy1', 'on']

The Linux distro is Arch Linux, and Vagrant is installed with official packages