This commit is contained in:
Philippe Caseiro 2023-01-04 15:54:51 +01:00
parent 6196c22acf
commit 0bef57b467
3 changed files with 23 additions and 11 deletions

View File

@ -9,6 +9,13 @@ locals {
owner = "root"
group = "root"
},
{
destination = "/etc/dnsmasq-hosts.conf"
source = "dnsmasq.d/dnsmasq-hosts.conf.pktpl.hcl"
mode = "600"
owner = "root"
group = "root"
},
{
destination = "/etc/conf.d/matchbox"
source = "conf.d/matchbox.conf.pktpl.hcl"
@ -77,6 +84,9 @@ locals {
DNS = ""
GATEWAY = ""
}
Set = {
Hostname = "matchbox"
}
}
Users = {}
Daemons = {

View File

@ -5,8 +5,11 @@ log-dhcp
listen-address=0.0.0.0
interface=${Vars.PXE.ListenInterface}
no-resolv
domain-needed
bogus-priv
expand-hosts
server=${Vars.ETH0.DNS}
strict-order
addn-hosts=/etc/dnsmasq-hosts.conf
domain=${Vars.PXE.DNSDomain}

View File

@ -1,14 +1,13 @@
NAME = "<%= template_name %>"
CONTEXT = [
DHCPLEASEDURATION = "$DHCPLEASEDURATION",
DHCPMODE = "$DHCPMODE",
DNSDOMAIN = "$DNSDOMAIN",
MATCHBOX_URL = "http://$NAME",
NETWORK = "YES",
PXE_DHCPLEASEDURATION = "$DHCPLEASEDURATION",
PXE_DHCPMODE = "$DHCPMODE",
PXE_DHCPRANGESTART = "$ADHCPRANGESTART",
PXE_DHCPRANGEEND = "$BDHCPRANGEEND",
PXE_DHCPMODE = "$ADHCPMODE",
PXE_DNSDOMAIN = "$BDNSDOMAIN",
PXE_DHCPRANGESTART = "$CDHCPRANGESTART",
PXE_DHCPRANGEEND = "$DDHCPRANGEEND",
PXE_DHCPLEASEDURATION = "$EDHCPLEASEDURATION",
REPORT_READY = "YES",
SET_HOSTNAME = "$NAME",
SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]",
@ -38,9 +37,9 @@ OS = [
BOOT = "",
SD_DISK_BUS = "scsi" ]
USER_INPUTS = [
DHCPLEASEDURATION = "M|list|DHCP lease duration|1h,2h,4h,6h,8h,10h,12h,14h,24h|1h",
DHCPMODE = "M|list|DHCP Mode|proxy,direct|proxy",
DNSDOMAIN = "M|text|Nom de la zone DNS (ex: cadol.es)",
ADHCPRANGESTART = "O|text|DNSMASQ DHCP Range First IP",
BDHCPRANGEEND = "O|text|DNSMASQ DHCP Range Last IP" ]
ADHCPMODE = "M|list|DHCP Mode|proxy,direct|proxy",
BNSDOMAIN = "M|text|Nom de la zone DNS (ex: cadol.es)",
CADHCPRANGESTART = "O|text|DNSMASQ DHCP Range First IP",
DBDHCPRANGEEND = "O|text|DNSMASQ DHCP Range Last IP",
EDHCPLEASEDURATION = "M|list|DHCP lease duration|1h,2h,4h,6h,8h,10h,12h,14h,24h|1h" ]
VCPU = "2"