forked from zentralwerk/network
ipv6-tunnel: migrate to systemd-networkd
This commit is contained in:
parent
96c9a2d2f9
commit
d52e9e6fe7
|
@ -12,5 +12,5 @@ port-forwarding:
|
||||||
|
|
||||||
ipv6-tunnel:
|
ipv6-tunnel:
|
||||||
endpoint: 216.66.80.30
|
endpoint: 216.66.80.30
|
||||||
address: 2001:470:1f0a:12b2::2
|
address: 2001:470:1f0a:12b2::2/64
|
||||||
gateway: 2001:470:1f0a:12b2::1
|
gateway: 2001:470:1f0a:12b2::1
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
auto ipv6
|
|
||||||
iface ipv6 inet6 v4tunnel
|
|
||||||
address {{ address }}
|
|
||||||
netmask 64
|
|
||||||
endpoint {{ endpoint }}
|
|
||||||
ttl 255
|
|
||||||
gateway {{ gateway }}
|
|
|
@ -1,18 +1,36 @@
|
||||||
ifupdown:
|
ifupdown:
|
||||||
pkg.installed: []
|
pkg.installed: []
|
||||||
|
|
||||||
/etc/network/interfaces.d/ipv6-tunnel.conf:
|
/etc/systemd/network/ipv6.netdev:
|
||||||
file.managed:
|
file.append:
|
||||||
- source: salt://upstream/ipv6-tunnel.conf
|
- text: |
|
||||||
- template: 'jinja'
|
[NetDev]
|
||||||
- context:
|
Name=ipv6
|
||||||
endpoint: {{ pillar['ipv6-tunnel'].get('endpoint') }}
|
Kind=sit
|
||||||
address: {{ pillar['ipv6-tunnel'].get('address') }}
|
[Tunnel]
|
||||||
gateway: {{ pillar['ipv6-tunnel'].get('gateway') }}
|
Remote={{ pillar['ipv6-tunnel']['endpoint'] }}
|
||||||
- require:
|
|
||||||
- pkg: ifupdown
|
|
||||||
|
|
||||||
'ifdown ipv6; ifup ipv6':
|
/etc/systemd/network/ipv6.network:
|
||||||
cmd.run:
|
file.append:
|
||||||
- onchanges:
|
- text: |
|
||||||
- file: /etc/network/interfaces.d/ipv6-tunnel.conf
|
[Match]
|
||||||
|
Name=ipv6
|
||||||
|
[Network]
|
||||||
|
Address={{ pillar['ipv6-tunnel']['address'] }}
|
||||||
|
Gateway={{ pillar['ipv6-tunnel']['gateway'] }}
|
||||||
|
|
||||||
|
/etc/systemd/network/ipv6-up.network:
|
||||||
|
file.append:
|
||||||
|
- text: |
|
||||||
|
[Match]
|
||||||
|
Name={{ pillar['upstream']['interface'] }}
|
||||||
|
[Network]
|
||||||
|
Tunnel=ipv6
|
||||||
|
|
||||||
|
systemd-networkd:
|
||||||
|
service:
|
||||||
|
- running
|
||||||
|
- watch:
|
||||||
|
- file: /etc/systemd/network/ipv6.netdev
|
||||||
|
- file: /etc/systemd/network/ipv6.network
|
||||||
|
- file: /etc/systemd/network/ipv6-up.network
|
||||||
|
|
Loading…
Reference in New Issue
Block a user