3

I'm have this code in my Vagrantfile to use Ansible to provision my virtual machine:

Vagrant.configure("2") do |config|
  config.vm.box = "geerlingguy/centos7"
  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "playbook.yml"
end

But now I get this error:

> There is a syntax error in the following Vagrantfile. The syntax error
> message is reproduced below for convenience:
> 
> /Users/vagrant/Vagrantfile:5: syntax error, unexpected
> end-of-input, expecting keyword_end

Can somebody please help to figure out why I'm getting this error?

Thanks!

VaTo
  • 2,936
  • 7
  • 38
  • 77

1 Answers1

4

You seem to be missing the "end" keyword for your "config.vm.provision "ansible" do |ansible|" do statement. I think the below change should work.

Vagrant.configure("2") do |config|
  config.vm.box = "geerlingguy/centos7"
  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "playbook.yml"
  end
end
Uday Kiran
  • 126
  • 3