Skip to content
Snippets Groups Projects
Commit e245e935 authored by Peter Metz's avatar Peter Metz Committed by Kubernetes Prow Robot
Browse files

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
parent 143e2272
No related branches found
No related tags found
No related merge requests found
...@@ -177,8 +177,9 @@ Vagrant.configure("2") do |config| ...@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment