Compare commits
4 commits
060ee37c88
...
f94e4080e3
| Author | SHA1 | Date | |
|---|---|---|---|
| f94e4080e3 | |||
| 0bd2230e1d | |||
| 7ecd3f31af | |||
| fb26678435 |
4 changed files with 9 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
network_interface: link1
|
||||
network_mac: 00:1b:21:3b:50:e2
|
||||
network_pci_path: pci-0000:04:00.0
|
||||
|
||||
lan_ip: 192.168.2.1
|
||||
lan_gateway: 192.168.2.254
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
- src: "templates/network/link1.network.j2"
|
||||
dest: "/etc/systemd/network/98-link1.network"
|
||||
notify:
|
||||
- restart systemd-networkd
|
||||
- regenerate initramfs # copies the files into the initramfs for when udev needs them
|
||||
- Restart systemd-networkd
|
||||
- Regenerate initramfs # copies the files into the initramfs for when udev needs them
|
||||
|
||||
- name: Set hostname
|
||||
become: true
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
dest: "/etc/systemd/resolved.conf"
|
||||
mode: "0644"
|
||||
owner: root
|
||||
notify: restart systemd-resolved
|
||||
notify: Restart systemd-resolved
|
||||
|
||||
- name: Copy firewall template
|
||||
become: true
|
||||
|
|
@ -49,5 +49,5 @@
|
|||
group: root
|
||||
mode: "0644"
|
||||
notify:
|
||||
- restart nftables
|
||||
- restart docker service
|
||||
- Restart nftables
|
||||
- Restart docker service
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[Match]
|
||||
MACAddress={{ network_mac }}
|
||||
Path={{ network_pci_path }}
|
||||
|
||||
[Link]
|
||||
NamePolicy=
|
||||
Name={{ network_interface }}
|
||||
RequiredForOnline=routable
|
||||
|
|
|
|||
|
|
@ -4,12 +4,9 @@
|
|||
Name={{ network_interface }}
|
||||
|
||||
[Network]
|
||||
Address={{ lan_ip }}/{{ lan_prefix }}
|
||||
Gateway={{ lan_gateway }}
|
||||
|
||||
DNS={{ lan_dns }}
|
||||
DNSOverTLS=yes
|
||||
DNSSEC=yes
|
||||
DHCP=ipv4
|
||||
|
||||
RequiredForOnline=routable
|
||||
IgnoreCarrierLoss=yes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue