Vagrantfile: always recreate inventory symlink (#7245)

Fixes 7244

Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
pull/7248/head
Maciej 2021-02-05 09:50:52 +01:00 committed by GitHub
parent fc8551bcba
commit 59541de437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

6
Vagrantfile vendored
View File

@ -86,9 +86,9 @@ $inventory = File.absolute_path($inventory, File.dirname(__FILE__))
if ! File.exist?(File.join(File.dirname($inventory), "hosts.ini")) if ! File.exist?(File.join(File.dirname($inventory), "hosts.ini"))
$vagrant_ansible = File.join(File.dirname(__FILE__), ".vagrant", "provisioners", "ansible") $vagrant_ansible = File.join(File.dirname(__FILE__), ".vagrant", "provisioners", "ansible")
FileUtils.mkdir_p($vagrant_ansible) if ! File.exist?($vagrant_ansible) FileUtils.mkdir_p($vagrant_ansible) if ! File.exist?($vagrant_ansible)
if ! File.exist?(File.join($vagrant_ansible,"inventory")) $vagrant_inventory = File.join($vagrant_ansible,"inventory")
FileUtils.ln_s($inventory, File.join($vagrant_ansible,"inventory")) FileUtils.rm_f($vagrant_inventory)
end FileUtils.ln_s($inventory, $vagrant_inventory)
end end
if Vagrant.has_plugin?("vagrant-proxyconf") if Vagrant.has_plugin?("vagrant-proxyconf")