Browse Source

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
pull/4164/head
Peter Metz 5 years ago
committed by Kubernetes Prow Robot
parent
commit
e245e935aa
1 changed files with 3 additions and 2 deletions
  1. 5
      Vagrantfile

5
Vagrantfile

@ -177,8 +177,9 @@ Vagrant.configure("2") do |config|
if i == $num_instances
node.vm.provision "ansible" do |ansible|
ansible.playbook = $playbook
if File.exist?(File.join( $inventory, "hosts.ini"))
ansible.inventory_path = $inventory
$ansible_inventory_path = File.join( $inventory, "hosts.ini")
if File.exist?($ansible_inventory_path)
ansible.inventory_path = $ansible_inventory_path
end
ansible.become = true
ansible.limit = "all"

Loading…
Cancel
Save