When I look at the Vagrant docs https://www.vagrantup.com/docs/networking/forwarded_ports.html it gives an example like this:
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 2003, host: 12003, protocol: "tcp"
config.vm.network "forwarded_port", guest: 2003, host: 12003, protocol: "udp"
end
However, the following also seem to be valid:
Single quotes
Vagrant.configure("2") do |config|
config.vm.network 'forwarded_port', guest: 2003, host: 12003, protocol: "tcp"
config.vm.network 'forwarded_port', guest: 2003, host: 12003, protocol: "udp"
end
Colon Prefix
Vagrant.configure("2") do |config|
config.vm.network :forwarded_port, guest: 2003, host: 12003, protocol: "tcp"
config.vm.network :forwarded_port, guest: 2003, host: 12003, protocol: "udp"
end
What is the difference in these syntax's? Are double quotes only supposed to be used when you have variables like in puppet?
What is the colon prefix syntax? It is confusing because the rest of the keywords on the line have colons suffixed.
Is there a style guide for Vagranfiles?