mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-10 06:04:15 +00:00
Vagrantfile: helpful VM name + fix ansible.inventory.path
This makes it easier to identify the vm with `vagrant global-status`, to find its image on disk, etc.. Also, move the ansible.inventory.path to be part of the provisioning section, being in the general vm config section causes a vagrant error.
This commit is contained in:
parent
127d8014fa
commit
31b993fc0f
1 changed files with 14 additions and 12 deletions
26
Vagrantfile
vendored
26
Vagrantfile
vendored
|
@ -1,18 +1,20 @@
|
|||
Vagrant.require_version ">= 2.2.2"
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
config.vm.box = "ubuntu/bionic64"
|
||||
config.vm.network "private_network", ip: "172.30.1.5"
|
||||
config.ssh.insert_key = false
|
||||
ansible.inventory_path = "tests/inventories/integration_testing/inventory"
|
||||
config.vm.define "ansible-nas-test" do
|
||||
config.vm.box = "ubuntu/bionic64"
|
||||
config.vm.network "private_network", ip: "172.30.1.5"
|
||||
config.ssh.insert_key = false
|
||||
|
||||
config.vm.provision "ansible_local" do |ansible|
|
||||
ansible.compatibility_mode = "2.0"
|
||||
ansible.galaxy_role_file = "requirements.yml"
|
||||
ansible.playbook = "nas.yml"
|
||||
ansible.become = true
|
||||
ansible.raw_arguments = [
|
||||
"--extra-vars @tests/test.yml"
|
||||
]
|
||||
config.vm.provision "ansible_local" do |ansible|
|
||||
ansible.compatibility_mode = "2.0"
|
||||
ansible.galaxy_role_file = "requirements.yml"
|
||||
ansible.inventory_path = "tests/inventories/integration_testing/inventory"
|
||||
ansible.playbook = "nas.yml"
|
||||
ansible.become = true
|
||||
ansible.raw_arguments = [
|
||||
"--extra-vars @tests/test.yml"
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue