hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

Initial Vagrantfile has incorrect provisioning line for shell #5100

Closed sc68cal closed 9 years ago

sc68cal commented 9 years ago

The Vagrantfile that is created when running vagrant init has an example of using the shell provisioner, but when the example is uncommented, it creates a syntax error.

sc68cal commented 9 years ago
   # Enable provisioning with a shell script. Additional provisioners such as
   # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
   # documentation for more information about their specific syntax and use.
-  # config.vm.provision "shell", inline <<-SHELL
-  #   sudo apt-get install apache2
-  # SHELL
+  config.vm.provision "shell",
+   inline: "sudo apt-get install -y apache2"
 end
sc68cal commented 9 years ago

This is on vagrant 1.7.1

sethvargo commented 9 years ago

Hi @sc68cal thank you for the report. This has already been fixed in https://github.com/mitchellh/vagrant/commit/5dfe323a2e6df504f576b2c60f2e034173f655a4.