diff --git a/bundles/radvd/items.py b/bundles/radvd/items.py index 6c59bce..4c221f7 100644 --- a/bundles/radvd/items.py +++ b/bundles/radvd/items.py @@ -1,4 +1,4 @@ -if node.metadata.get('radvd', {}).get('integrate-with-pppd', False): +if node.has_bundle('pppd'): files['/etc/ppp/ip-up.d/radvd'] = { 'source': 'ip-up', 'mode': '0755', diff --git a/bundles/radvd/metadata.py b/bundles/radvd/metadata.py index 56be74d..1f7071c 100644 --- a/bundles/radvd/metadata.py +++ b/bundles/radvd/metadata.py @@ -6,16 +6,11 @@ defaults = { }, } - -@metadata_reactor -def pppd(metadata): - if metadata.get('wide-dhcp6c/integrate-with-pppd', False): - return { - 'pppd': { - 'wait-until-stopped': { - 'radvd.service', - }, - } +if node.has_bundle('pppd'): + defaults.update({ + 'pppd': { + 'wait-until-stopped': { + 'radvd.service', + }, } - - return {} + }) diff --git a/bundles/wide-dhcp6c/items.py b/bundles/wide-dhcp6c/items.py index 5dc7a1f..7645aba 100644 --- a/bundles/wide-dhcp6c/items.py +++ b/bundles/wide-dhcp6c/items.py @@ -1,4 +1,4 @@ -if node.metadata.get('wide-dhcp6c', {}).get('integrate-with-pppd', False): +if node.has_bundle('pppd'): files['/etc/ppp/ip-up.d/wide-dhcp6c'] = { 'source': 'ip-up', 'content_type': 'mako', diff --git a/bundles/wide-dhcp6c/metadata.py b/bundles/wide-dhcp6c/metadata.py index aadae1c..6811c0f 100644 --- a/bundles/wide-dhcp6c/metadata.py +++ b/bundles/wide-dhcp6c/metadata.py @@ -17,16 +17,11 @@ defaults = { }, } - -@metadata_reactor -def pppd(metadata): - if metadata.get('wide-dhcp6c/integrate-with-pppd', False): - return { - 'pppd': { - 'wait-until-stopped': { - 'wide-dhcpv6-client.service', - }, - } +if node.has_bundle('pppd'): + defaults.update({ + 'pppd': { + 'wait-until-stopped': { + 'wide-dhcpv6-client.service', + }, } - - return {} + }) diff --git a/nodes/home/router.py b/nodes/home/router.py index d139dc0..5248079 100644 --- a/nodes/home/router.py +++ b/nodes/home/router.py @@ -95,7 +95,6 @@ nodes['home.router'] = { }, }, 'radvd': { - 'integrate-with-pppd': True, 'interfaces': { 'enp1s0.42': {}, }, @@ -140,7 +139,6 @@ nodes['home.router'] = { 'ram': 2, }, 'wide-dhcp6c': { - 'integrate-with-pppd': True, 'source': 'ppp0', 'targets': { 'enp1s0.42': '1',