fix(vagrant): sets ansible.inventory_path to file not dir (#4153)
This fixes the issue where if there was a hosts.ini file present in the inventory directory, then Vagrant would set an incorrect path as ansible.inventory_path
This commit is contained in:
parent
143e2272ff
commit
e245e935aa
1 changed files with 3 additions and 2 deletions
5
Vagrantfile
vendored
5
Vagrantfile
vendored
|
@ -177,8 +177,9 @@ Vagrant.configure("2") do |config|
|
||||||
if i == $num_instances
|
if i == $num_instances
|
||||||
node.vm.provision "ansible" do |ansible|
|
node.vm.provision "ansible" do |ansible|
|
||||||
ansible.playbook = $playbook
|
ansible.playbook = $playbook
|
||||||
if File.exist?(File.join( $inventory, "hosts.ini"))
|
$ansible_inventory_path = File.join( $inventory, "hosts.ini")
|
||||||
ansible.inventory_path = $inventory
|
if File.exist?($ansible_inventory_path)
|
||||||
|
ansible.inventory_path = $ansible_inventory_path
|
||||||
end
|
end
|
||||||
ansible.become = true
|
ansible.become = true
|
||||||
ansible.limit = "all"
|
ansible.limit = "all"
|
||||||
|
|
Loading…
Reference in a new issue