core: add interface argument to peer configuration template
This commit is contained in:
parent
4665a26098
commit
e0a9887a9f
|
@ -511,6 +511,7 @@ class WeegeeConnection(WeegeeBase):
|
|||
|
||||
template = Template.load(self.context.instance, template_meta.get_name())
|
||||
config = template_meta.make_config(self.context.instance,
|
||||
interface=target.interface.item,
|
||||
connection=self.item,
|
||||
peers={p.name: p.item for p in peers},
|
||||
)
|
||||
|
|
|
@ -193,7 +193,7 @@ AllowedIPs = {{ ((peer.interface.addresses | map(attribute='network') | list) +
|
|||
PersistentKeepalive = 30
|
||||
{% endfor -%}
|
||||
""".strip(),
|
||||
variables={'connection': WEEGEE_CONNECTION, 'peers': {str: WEEGEE_PEER}},
|
||||
variables={'interface': WEEGEE_INTERFACE, 'connection': WEEGEE_CONNECTION, 'peers': {str: WEEGEE_PEER}},
|
||||
)
|
||||
|
||||
WEEGEE_CONF_WG = WeegeeTemplate(
|
||||
|
|
Loading…
Reference in New Issue