prepare configuration split
This commit is contained in:
parent
d5a49ae4ef
commit
4db49de2d9
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
container.json
|
@ -36,7 +36,7 @@ class Resolver
|
||||
end
|
||||
end
|
||||
|
||||
template_path = Lxc::CONFIG_ROOT.join("templates/higgsboson.tk.zone.erb")
|
||||
template_path = Lxc::CONFIG_ROOT.join("hooks/templates/higgsboson.tk.zone.erb")
|
||||
template = Lxc::Template.new(template_path)
|
||||
serial = Time.new.to_i
|
||||
resolver = Resolver.new
|
||||
|
@ -43,7 +43,7 @@ module Lxc
|
||||
end
|
||||
opts[:local_conf] = local_conf
|
||||
|
||||
templ = Template.new(CONFIG_ROOT.join("templates", "config.erb"))
|
||||
templ = Template.new(CONFIG_ROOT.join("hooks", "templates", "config.erb"))
|
||||
templ.write(config_path, opts)
|
||||
end
|
||||
|
||||
|
@ -31,7 +31,7 @@ module Lxc
|
||||
end
|
||||
|
||||
def write_zone_file(path)
|
||||
zone_template = Template.new(CONFIG_ROOT.join("templates/rdns-zone.erb"))
|
||||
zone_template = Template.new(CONFIG_ROOT.join("hooks/templates/rdns-zone.erb"))
|
||||
zone_template.write(path.join("zones", name), zone: self, data: data)
|
||||
end
|
||||
end
|
||||
|
@ -21,7 +21,7 @@ def main
|
||||
end
|
||||
|
||||
root_path = Pathname.new(File.expand_path("../..", __FILE__))
|
||||
zone_template = Lxc::Template.new(root_path.join("templates/lxc-zone.erb"))
|
||||
zone_template = Lxc::Template.new(root_path.join("hooks/templates/lxc-zone.erb"))
|
||||
zone = registry.data["zone"] || {}
|
||||
zone_name = registry.data["zone"]["domain"] || "lxc"
|
||||
zone_template.write(root_path.join("zones", "#{zone_name}.zone"), data: registry.data, zone: zone)
|
||||
|
Loading…
Reference in New Issue
Block a user