alpine: Use absolute paths for network configuration templates
This commit is contained in:
parent
29362d8af4
commit
77616b22b3
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue