Cloud Init not applying network settings?
Posted by lightnb11@reddit | linuxadmin | View on Reddit | 5 comments
I'm using the following network-config.yml
with the nocloud data source:
version: 2
ethernets:
enp1s0:
match:
name: enp1s0
addresses:
- 192.168.1.167/255.255.255.0
routes:
- to: default
via: 192.168.1.251 # Default gateway for IPv4
nameservers:
addresses: [192.168.1.131, 192.168.1.251]
I can confirm from the logs that cloud-init is finding this file and reading it, but it isn't being applied. It seems to be complaining about a missing MAC address, but being required to specify the MAC address would defeat the whole point of automatically assigning an IP.
Is there some way to apply the IP address to the first real interface, regardless of its name or MAC address?
jsrkamal@reddit
Can you share the more details on this
did you used ENI for this ??
lightnb11@reddit (OP)
I've updated the post with the resolution.
NoAssociation7938@reddit
I would explicitly define the renderer
jsrkamal@reddit
Can you tell me more on this
like how to define the render
bartvdbraak@reddit
Did you include netplan apply in the runcmd?