You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
536 B

  1. #cloud-config
  2. ssh_authorized_keys:
  3. %{ for ssh_public_key in ssh_public_keys ~}
  4. - ${ssh_public_key}
  5. %{ endfor ~}
  6. write_files:
  7. - path: /etc/netplan/10-user-network.yaml
  8. content: |.
  9. network:
  10. version: 2
  11. ethernets:
  12. ${interface_name}:
  13. dhcp4: false #true to use dhcp
  14. addresses:
  15. - ${ip}/${netmask}
  16. gateway4: ${gw} # Set gw here
  17. nameservers:
  18. addresses:
  19. - ${dns} # Set DNS ip address here
  20. runcmd:
  21. - netplan apply