CloudInit does not set gateway for Ubuntu 18.04 LTS (netplan)

genesio

New Member
Jul 25, 2018
18
0
1
43
I am using cloud-init to set up some Ubuntu 18.04 VM's (uses netplan for net config)

They are all configured using static IPv4 address like 192.168.0.x/24
The gateway is 192.168.0.254

The generated /etc/netplan/50-cloud-init.yaml file does not contain gateway4 attribute