Do not set NetworkName by default
This commit is contained in:
parent
689d377683
commit
a429621e42
5
main.py
5
main.py
@ -81,7 +81,8 @@ def write_network_units(args, yaml_dict):
|
||||
unit_file["Unit"]["Description"] = f"{network_name.capitalize()} network"
|
||||
|
||||
unit_file["Network"] = {}
|
||||
unit_file["Network"]["NetworkName"] = network_name
|
||||
if "name" in network:
|
||||
unit_file["Network"]["NetworkName"] = network_name
|
||||
unit_file["Network"]["Internal"] = str(network.get("internal", True)).lower()
|
||||
if "enable_ipv6" in network:
|
||||
unit_file["Network"]["IPv6"] = str(network["enable_ipv6"]).lower()
|
||||
@ -153,7 +154,7 @@ def write_service_units(args, yaml_dict):
|
||||
unit_file["Container"]["Volume"] = service["volumes"]
|
||||
if "networks" in service:
|
||||
enforce_list("networks", service)
|
||||
unit_file["Container"]["Network"] = service["networks"]
|
||||
unit_file["Container"]["Network"] = list(map(lambda x: f"{x}.network", service["networks"]))
|
||||
else:
|
||||
unit_file["Container"]["Network"] = ["default"]
|
||||
if "devices" in service:
|
||||
|
Loading…
Reference in New Issue
Block a user