Files
warewulf/internal/pkg/config/buildconfig.go.in
Christian Goll 5e94766895 do not export version and rc
create also a new warewulf.conf so that the compiled
in paths are in sync with the configuration

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-16 17:38:34 -07:00

49 lines
1.8 KiB
Go

package config
var ConfigFile = "@SYSCONFDIR@/warewulf/warewulf.conf"
type BuildConfig struct {
Bindir string `default:"@BINDIR@"`
Sysconfdir string `default:"@SYSCONFDIR@"`
Localstatedir string `default:"@LOCALSTATEDIR@"`
Ipxesource string `default:"@IPXESOURCE@"`
Srvdir string `default:"@SRVDIR@"`
Firewallddir string `default:"@FIREWALLDDIR@"`
Systemddir string `default:"@SYSTEMDDIR@"`
WWOverlaydir string `default:"@WWOVERLAYDIR@"`
WWChrootdir string `default:"@WWCHROOTDIR@"`
WWProvisiondir string `default:"@WWPROVISIONDIR@"`
WWClientdir string `default:"@WWCLIENTDIR@"`
version string `default:"@VERSION@"`
release string `default:"@RELEASE@"`
}
func (conf BuildConfig) Version() string {
return conf.version
}
func (conf BuildConfig) Release() string {
return conf.release
}
type TFTPConf struct {
Enabled bool `yaml:"enabled" default:"true"`
TftpRoot string `yaml:"tftproot" default:"@TFTPDIR@"`
SystemdName string `yaml:"systemd name" default:"tftp"`
IpxeBinaries map[string]string `yaml:"ipxe" default:"{\"00:09\": \"ipxe-snponly-x86_64.efi\",\"00:00\": \"undionly.kpxe\",\"00:0B\": \"arm64-efi/snponly.efi\",\"00:07\": \"ipxe-snponly-x86_64.efi\"}"`
}
// WarewulfConf adds additional Warewulf-specific configuration to
// BaseConf.
type WarewulfConf struct {
Port int `yaml:"port" default:"9983"`
Secure bool `yaml:"secure" default:"true"`
UpdateInterval int `yaml:"update interval" default:"60"`
AutobuildOverlays bool `yaml:"autobuild overlays" default:"true"`
EnableHostOverlay bool `yaml:"host overlay" default:"true"`
Syslog bool `yaml:"syslog" default:"false"`
DataStore string `yaml:"datastore" default:"@DATADIR@"`
GrubBoot bool `yaml:"grubboot" default:"false"`
}