2021-02-26 12:20:15 +00:00
|
|
|
#cloud-config
|
|
|
|
|
|
|
|
ssh_authorized_keys:
|
|
|
|
%{ for ssh_public_key in ssh_public_keys ~}
|
|
|
|
- ${ssh_public_key}
|
|
|
|
%{ endfor ~}
|
|
|
|
|
|
|
|
write_files:
|
|
|
|
- path: /etc/netplan/10-user-network.yaml
|
2022-01-25 13:24:30 +00:00
|
|
|
content: |.
|
2021-02-26 12:20:15 +00:00
|
|
|
network:
|
|
|
|
version: 2
|
|
|
|
ethernets:
|
2022-01-25 13:24:30 +00:00
|
|
|
${interface_name}:
|
2021-02-26 12:20:15 +00:00
|
|
|
dhcp4: false #true to use dhcp
|
|
|
|
addresses:
|
2021-11-12 19:40:29 +00:00
|
|
|
- ${ip}/${netmask}
|
2021-02-26 12:20:15 +00:00
|
|
|
gateway4: ${gw} # Set gw here
|
|
|
|
nameservers:
|
|
|
|
addresses:
|
|
|
|
- ${dns} # Set DNS ip address here
|
|
|
|
|
|
|
|
runcmd:
|
|
|
|
- netplan apply
|