platon: Set the MAC address that is registered in the router
This commit is contained in:
parent
dabf3f6b5f
commit
cf1fed21cb
3 changed files with 17 additions and 0 deletions
|
@ -76,6 +76,7 @@ all:
|
|||
server_admin: "admin+unicorn@netz39.de"
|
||||
platon.n39.eu:
|
||||
server_admin: "admin+platon@netz39.de"
|
||||
mac: "b8:27:eb:8f:98:2f"
|
||||
radon.n39.eu:
|
||||
server_admin: "admin+radon@netz39.de"
|
||||
krypton.n39.eu:
|
||||
|
|
10
platon.yml
10
platon.yml
|
@ -18,3 +18,13 @@
|
|||
# Should come from ble-keeper-role
|
||||
# see https://github.com/netz39/ble-keykeeper-role/issues/4
|
||||
- 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'
|
||||
|
|
6
templates/network-interfaces-dhcp-mac.j2
Normal file
6
templates/network-interfaces-dhcp-mac.j2
Normal 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!
|
Loading…
Reference in a new issue