only set vars and group, if non-nil
This commit is contained in:
parent
dfd703afde
commit
4d42b9bfcd
@ -233,8 +233,6 @@
|
||||
"teamspeak": {
|
||||
"ipv4": "192.168.66.21/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::15/128",
|
||||
"group": null,
|
||||
"vars": null,
|
||||
"backup-paths": [
|
||||
"var/lib/teamspeak3-server"
|
||||
]
|
||||
@ -242,8 +240,6 @@
|
||||
"prosody": {
|
||||
"ipv4": "192.168.66.22/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::16/128",
|
||||
"group": null,
|
||||
"vars": null,
|
||||
"rdns6": "jabber.higgsboson.tk",
|
||||
"backup-paths": [
|
||||
"var/lib/prosody"
|
||||
@ -279,55 +275,37 @@
|
||||
"etherpad": {
|
||||
"ipv4": "192.168.66.25/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::19/128",
|
||||
"group": null,
|
||||
"vars": null
|
||||
},
|
||||
"pyload": {
|
||||
"ipv4": "192.168.66.26/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::1a/128",
|
||||
"group": null,
|
||||
"vars": null
|
||||
},
|
||||
"squid": {
|
||||
"ipv4": "192.168.66.27/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::1b/128",
|
||||
"group": null,
|
||||
"vars": null
|
||||
},
|
||||
"classifier": {
|
||||
"ipv4": "192.168.66.28/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::1c/128",
|
||||
"group": null,
|
||||
"vars": null
|
||||
},
|
||||
"seafile": {
|
||||
"ipv4": "192.168.66.29/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::1d/128",
|
||||
"group": null,
|
||||
"vars": null
|
||||
},
|
||||
"login": {
|
||||
"ipv4": "192.168.66.30/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::1e/128",
|
||||
"group": null,
|
||||
"rdns6": "login.higgsboson.tk",
|
||||
"vars": {
|
||||
"ssh_ldap": true
|
||||
}
|
||||
},
|
||||
"dn42": {
|
||||
"ipv4": "192.168.66.31/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::1f/128",
|
||||
"group": null,
|
||||
"vars": null
|
||||
},
|
||||
"halfcode": {
|
||||
"ipv4": "192.168.66.32/32",
|
||||
"ipv6": "2a01:4f8:210:31fd:1::20/128",
|
||||
"group": "php",
|
||||
"vars": {
|
||||
"php_extensions": [
|
||||
|
||||
]
|
||||
"php_extensions": []
|
||||
}
|
||||
},
|
||||
"phonefinder": {
|
||||
@ -335,9 +313,7 @@
|
||||
"ipv6": "2a01:4f8:210:31fd:1::21/128",
|
||||
"group": "php",
|
||||
"vars": {
|
||||
"php_extensions": [
|
||||
"[@]"
|
||||
]
|
||||
"php_extensions": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,8 +40,8 @@ module Lxc
|
||||
c = @data["network"][@name] || {}
|
||||
c["ipv4"] = NetAddr::CIDR.create(@ipv4).to_s(Short: true)
|
||||
c["ipv6"] = NetAddr::CIDR.create(@ipv6).to_s(Short: true)
|
||||
c["group"] = @options[:group]
|
||||
c["vars"] = @options[:vars]
|
||||
c["group"] = @options[:group] if @options[:group]
|
||||
c["vars"] = @options[:vars] if @options[:vars]
|
||||
opts = @options.merge(name: @name,
|
||||
ipv4: format_address(@ipv4, @ipv4_subnet.to_i(:netmask)),
|
||||
ipv6: format_address(@ipv6, @ipv6_subnet.to_i(:netmask)))
|
||||
|
Loading…
Reference in New Issue
Block a user