platon: Set the MAC address that is registered in the router

This commit is contained in:
Stefan Haun 2022-07-23 16:17:13 +02:00
parent dabf3f6b5f
commit cf1fed21cb
3 changed files with 17 additions and 0 deletions

View file

@ -76,6 +76,7 @@ all:
server_admin: "admin+unicorn@netz39.de" server_admin: "admin+unicorn@netz39.de"
platon.n39.eu: platon.n39.eu:
server_admin: "admin+platon@netz39.de" server_admin: "admin+platon@netz39.de"
mac: "b8:27:eb:8f:98:2f"
radon.n39.eu: radon.n39.eu:
server_admin: "admin+radon@netz39.de" server_admin: "admin+radon@netz39.de"
krypton.n39.eu: krypton.n39.eu:

View file

@ -18,3 +18,13 @@
# Should come from ble-keeper-role # Should come from ble-keeper-role
# see https://github.com/netz39/ble-keykeeper-role/issues/4 # see https://github.com/netz39/ble-keykeeper-role/issues/4
- python3-pip - python3-pip
- name: Set MAC address for proper DHCP recognition
# Uses mac variable from inventory
ansible.builtin.template:
src: templates/network-interfaces-dhcp-mac.j2
dest: /etc/network/interfaces.d/platon-mac
owner: root
group: root
mode: '0644'

View file

@ -0,0 +1,6 @@
# Set a specific MAC address to enable DHCP recognition
allow-hotplug eth0
iface eth0 inet dhcp
hwaddress ether {{ mac }}
# THIS FILE IS MANAGED VIA ANSIBLE!