Adds am_lighthouse warning msg (#43)
* add warning message when am_lighthouse is enabled; update config templating
This commit is contained in:
parent
94441789d5
commit
61d9f241b9
|
@ -42,8 +42,10 @@ lighthouse:
|
||||||
am_lighthouse: false
|
am_lighthouse: false
|
||||||
{% endif %}
|
{% endif %}
|
||||||
interval: 60
|
interval: 60
|
||||||
|
{% if 'generic' in group_names %}
|
||||||
hosts:
|
hosts:
|
||||||
- {{ hostvars[groups['lighthouse'][0]][vagrant_ifce]['ipv4']['address'] | to_nebula_ip }}
|
- {{ hostvars[groups['lighthouse'][0]][vagrant_ifce]['ipv4']['address'] | to_nebula_ip }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Configure the private interface
|
# Configure the private interface
|
||||||
tun:
|
tun:
|
||||||
|
|
7
main.go
7
main.go
|
@ -188,6 +188,13 @@ func Main(configPath string, configTest bool, buildVersion string) {
|
||||||
|
|
||||||
punchBack := config.GetBool("punch_back", false)
|
punchBack := config.GetBool("punch_back", false)
|
||||||
amLighthouse := config.GetBool("lighthouse.am_lighthouse", false)
|
amLighthouse := config.GetBool("lighthouse.am_lighthouse", false)
|
||||||
|
|
||||||
|
// warn if am_lighthouse is enabled but upstream lighthouses exists
|
||||||
|
lighthouseHosts := config.GetStringSlice("lighthouse.hosts", []string{})
|
||||||
|
if amLighthouse && len(lighthouseHosts) != 0 {
|
||||||
|
l.Warn("lighthouse.am_lighthouse enabled on node but upstream lighthouses exist in config")
|
||||||
|
}
|
||||||
|
|
||||||
serveDns := config.GetBool("lighthouse.serve_dns", false)
|
serveDns := config.GetBool("lighthouse.serve_dns", false)
|
||||||
lightHouse := NewLightHouse(
|
lightHouse := NewLightHouse(
|
||||||
amLighthouse,
|
amLighthouse,
|
||||||
|
|
Loading…
Reference in New Issue