The following settings don't exist: inventory_file

I’ve pulled down a git repo and ran vagrant up but I’m getting this error message

The following settings don’t exist: inventory_file

I’ve installed virtual box and vagrant and ansible for osx mountain lion.

But I can’t get anything to work.

also when I run “ansible all -m ping -vvvv” I get

<192.168.0.62> ESTABLISH CONNECTION FOR USER: Grant
<192.168.0.62> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/Grant/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.0.62', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1379790346.17-244145524385544 && chmod a+rx $HOME/.ansible/tmp/ansible-1379790346.17-244145524385544 && echo $HOME/.ansible/tmp/ansible-1379790346.17-244145524385544'"]
192.168.0.62 | FAILED => SSH encountered an unknown error. The output was:
OpenSSH_5.9p1, OpenSSL 0.9.8y 5 Feb 2013
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/Users/Grant/.ansible/cp/ansible-ssh-192.168.0.62-22-Grant" does not exist
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.62 [192.168.0.62] port 22.
debug2: fd 3 setting O_NONBLOCK
debug1: connect to address 192.168.0.62 port 22: Operation timed out
ssh: connect to host 192.168.0.62 port 22: Operation timed out

Any ideas on what is going on will be appreciated :slight_smile:

Can you ssh to that system normally?

My vagrant file looks like this

Vagrant.configure(“2”) do |config|

Box configuration.

config.vm.box = “precise64”
config.vm.box_url = “http://files.vagrantup.com/precise64.box

Network configuration.

config.vm.network :forwarded_port, host: 8080, guest: 80
config.vm.network :private_network, ip: “192.168.50.50”
config.vm.synced_folder “app/storage”, “/vagrant/app/storage”, :owner => ‘www-data’, :group => ‘www-data’

Ansible provisioning.

config.vm.provision :ansible do |ansible|
ansible.playbook = “provisioning/playbook.yml”
ansible.inventory_file = “provisioning/ansible_hosts”
end
end

Without the ansible part in the vagrant file I can bring up vagrant and ssh normally without any issues.

Is there a way I can do a fresh install of ansible? I’m getting really annoyed with it to be honest.

“Is there a way I can do a fresh install of ansible?”

http://ansibleworks.com/docs/gettingstarted.html

I would recommend learning Ansible without vagrant first if you are having vagrant problems.

The correct argument is ansible.inventory_path:

http://docs.vagrantup.com/v2/provisioning/ansible.html

I’ve installed both vagrant and ansible multiple times now

Commenting out the ansible.inventory_file = “provisioning/ansible_hosts” line which has the same IP address as the Vagrant config


[laravel]
192.168.50.50

Works, am I missing some inventory_file package?

No, the correct option is inventory_path as I commented above. It was changed in the past and you appear to be working off of old documentation. Please consult the link I included in the previous email regarding vagrant/ansible provisioning.