Loading xml through xsl file instead
This commit is contained in:
parent
f9433ad477
commit
c19dc59a3f
3 changed files with 26 additions and 18 deletions
|
|
@ -1,17 +0,0 @@
|
|||
<network ipv6='yes'>
|
||||
<name>my-talos-net</name>
|
||||
<bridge name="talos-bridge" stp="on" delay="0"/>
|
||||
<forward mode='nat'>
|
||||
<nat ipv6='yes'/>
|
||||
</forward>
|
||||
<ip address="10.5.0.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="10.5.0.2" end="10.5.0.254"/>
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip family='ipv6' address='2001:db8:b84b:5::1' prefix='64'>
|
||||
<dhcp>
|
||||
<range start='2001:db8:b84b:5::2' end='2001:db8:b84b:5::ffff'/>
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network>
|
||||
25
control-plane/control-plane-net.xsl
Normal file
25
control-plane/control-plane-net.xsl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<xsl:stylesheet version="1." xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<!-- This template completely replaces the generated XML with our custom XML -->
|
||||
<xsl:template match="/">
|
||||
<network ipv6='yes'>
|
||||
<name>my-talos-net</name>
|
||||
<bridge name="talos-bridge" stp="on" delay="0"/>
|
||||
<forward mode='nat'>
|
||||
<nat ipv6='yes'/>
|
||||
</forward>
|
||||
<ip address="10.5.0.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="10.5.0.2" end="10.5.0.254"/>
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip family='ipv6' address='2001:db8:b84b:5::1' prefix='64'>
|
||||
<dhcp>
|
||||
<range start='2001:db8:b84b:5::2' end='2001:db8:b84b:5::ffff'/>
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
|
@ -46,6 +46,6 @@ resource "libvirt_network" "talos_bridge" {
|
|||
autostart = true
|
||||
|
||||
xml {
|
||||
file = "control-plane-net.xml"
|
||||
xslt = file("control-plane-net.xsl")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue