Always use a string for Vagrantfile version
This commit is contained in:
parent
95ffde0938
commit
b24e69eb60
|
@ -5,7 +5,7 @@
|
|||
# configures the configuration version (we support older styles for
|
||||
# backwards compatibility). Please don't change it unless you know what
|
||||
# you're doing.
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
# The most common configuration options are documented and commented below.
|
||||
# For a complete reference, please see the online documentation at
|
||||
# https://docs.vagrantup.com.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "<%= box_name %>"
|
||||
<% if box_url -%>
|
||||
config.vm.box_url = "<%= box_url %>"
|
||||
|
|
|
@ -104,7 +104,7 @@ describe VagrantPlugins::AtlasPush::Push do
|
|||
let(:env) do
|
||||
iso_env = isolated_environment
|
||||
iso_env.vagrantfile <<-EOH
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "hashicorp/precise64"
|
||||
config.vm.box_url = "https://atlas.hashicorp.com/hashicorp/precise64"
|
||||
end
|
||||
|
|
|
@ -40,7 +40,7 @@ describe Vagrant::Config do
|
|||
receiver.one
|
||||
end
|
||||
|
||||
Vagrant.configure(2) do
|
||||
Vagrant.configure("2") do
|
||||
receiver.two
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ sudo su -l -c 'gem install bundler' vagrant
|
|||
sudo su -l -c 'cd /vagrant && bundle install --jobs 2' vagrant
|
||||
SCRIPT
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "hashicorp/precise64"
|
||||
config.vm.network "private_network", ip: "33.33.33.10"
|
||||
config.vm.provision "shell", inline: $script, privileged: false
|
||||
|
|
|
@ -37,7 +37,7 @@ This page only documents the specific parts of the `ansible` (remote) provisione
|
|||
To run Ansible against your Vagrant guest, the basic `Vagrantfile` configuration looks like:
|
||||
|
||||
```ruby
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
#
|
||||
# Run Ansible from the Vagrant Host
|
||||
|
|
|
@ -48,7 +48,7 @@ You can of course target other operating systems that do not have YUM by changin
|
|||
The `playbook` option is strictly required by both Ansible provisioners ([`ansible`](/docs/provisioning/ansible.html) and [`ansible_local`](/docs/provisioning/ansible_local.html)), as illustrated in this basic Vagrantfile` configuration:
|
||||
|
||||
```ruby
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
# Use :ansible or :ansible_local to
|
||||
# select the provisioner of your choice
|
||||
|
@ -75,7 +75,7 @@ Since an Ansible playbook can include many files, you may also collect the relat
|
|||
In such an arrangement, the `ansible.playbook` path should be adjusted accordingly:
|
||||
|
||||
```ruby
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
ansible.playbook = "provisioning/playbook.yml"
|
||||
end
|
||||
|
@ -116,7 +116,7 @@ Note that the generated inventory file is uploaded to the guest VM in a subdirec
|
|||
As of Vagrant 1.8.0, the [`host_vars`](/docs/provisioning/ansible_common.html) option can be used to set [variables for individual hosts](https://docs.ansible.com/ansible/intro_inventory.html#host-variables) in the generated inventory file (see also the notes on group variables below).
|
||||
|
||||
```
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.define "host1"
|
||||
config.vm.define "host2"
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
|
@ -149,7 +149,7 @@ As of Vagrant 1.8.0, it is also possible to specify [group variables](https://do
|
|||
With this configuration example:
|
||||
|
||||
```
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
config.vm.box = "ubuntu/trusty64"
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ The Ansible Local provisioner requires that all the Ansible Playbook files are a
|
|||
To run Ansible from your Vagrant guest, the basic `Vagrantfile` configuration looks like:
|
||||
|
||||
```ruby
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
# Run Ansible from the Vagrant VM
|
||||
config.vm.provision "ansible_local" do |ansible|
|
||||
ansible.playbook = "playbook.yml"
|
||||
|
@ -96,7 +96,7 @@ This section lists the specific options for the Ansible Local provisioner. In ad
|
|||
With the following configuration pattern, you can install and execute Ansible only on a single guest machine (the `"controller"`) to provision all your machines.
|
||||
|
||||
```ruby
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
config.vm.box = "ubuntu/trusty64"
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ is override locale in the `Vagrantfile`:
|
|||
```ruby
|
||||
ENV["LC_ALL"] = "en_US.UTF-8"
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
# ...
|
||||
end
|
||||
```
|
||||
|
|
|
@ -19,7 +19,7 @@ If you run `vagrant init` today, the Vagrantfile will be in roughly the
|
|||
following format:
|
||||
|
||||
```ruby
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
# ...
|
||||
end
|
||||
```
|
||||
|
|
|
@ -34,7 +34,7 @@ sed -i.bak 's/answer AUTO_KMODS_ENABLED_ANSWER no/answer AUTO_KMODS_ENABLED_ANSW
|
|||
sed -i 's/answer AUTO_KMODS_ENABLED no/answer AUTO_KMODS_ENABLED yes/g' /etc/vmware-tools/locations
|
||||
SCRIPT
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
# ...
|
||||
|
||||
config.vm.provision "shell", inline: $fix_vmware_tools_script
|
||||
|
|
|
@ -23,7 +23,7 @@ To get started, create a new `Vagrantfile` that points to a VMware box:
|
|||
|
||||
```ruby
|
||||
# vagrant init hashicorp/precise64
|
||||
Vagrant.configure(2) do |config|
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "hashicorp/precise64"
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue