alpine: Use absolute paths for network configuration templates

This commit is contained in:
Tim Schumacher 2019-07-18 04:07:15 +02:00
parent 29362d8af4
commit 77616b22b3
1 changed files with 1 additions and 4 deletions

View File

@ -13,9 +13,6 @@ module VagrantPlugins
module GuestAlpine module GuestAlpine
module Cap module Cap
class ConfigureNetworks class ConfigureNetworks
def self.source_root
@source_root ||= Pathname.new(File.expand_path('../../../../', __FILE__))
end
include Vagrant::Util include Vagrant::Util
def self.configure_networks(machine, networks) def self.configure_networks(machine, networks)
machine.communicate.tap do |comm| machine.communicate.tap do |comm|
@ -31,7 +28,7 @@ module VagrantPlugins
entries = [] entries = []
networks.each do |network| networks.each do |network|
interfaces.add(network[:interface]) interfaces.add(network[:interface])
entry = TemplateRenderer.render("guests/alpine/network_#{network[:type]}", { options: network, template_root: source_root.join('templates') }) entry = TemplateRenderer.render("guests/alpine/network_#{network[:type]}", { options: network })
entries << entry entries << entry
end end