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_pathpull/4164/head
parent
143e2272ff
commit
e245e935aa
|
@ -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 New Issue