1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

systemd-networkd support for wan static ip address

This commit is contained in:
Jerry Vonau 2018-05-13 21:12:25 -05:00
parent 450a346839
commit 7d0cfc0f93
2 changed files with 24 additions and 0 deletions

View file

@ -49,6 +49,18 @@
backup: no
when: (wan_ip != "dhcp" or gui_static_wan_ip == "undefined") and is_ubuntu_18
- name: Remove static WAN template
file:
state: absent
dest: /etc/systemd/network/IIAB-Static.network
when: wan_ip == "dhcp" and not is_ubuntu_18
- name: Supply static WAN template
template:
dest: /etc/systemd/network/IIAB-Static.network
src: network/systemd-static-net.j2
when: wan_ip != "dhcp" and not is_ubuntu_18
- name: Reload systemd
systemd:
daemon_reload: yes

View file

@ -0,0 +1,12 @@
# /etc/systemd/network/IIAB-static.network
[Match]
Name={{ iiab_wan_iface }}
[Network]
Address={{ wan_ip }}/{{ wan_cidr }}
Gateway={{ wan_gateway }}
LinkLocalAddressing=yes
DNS={{ wan_namserver }}
Domains={{ iiab_domain }}