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.

35 lines
767 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/20-internal-network.yaml
  8. content: |
  9. network:
  10. version: 2
  11. ethernets:
  12. "lo:0":
  13. match:
  14. name: lo
  15. dhcp4: false
  16. addresses:
  17. - 172.17.0.100/32
  18. - path: /etc/netplan/10-user-network.yaml
  19. content: |
  20. network:
  21. version: 2
  22. ethernets:
  23. ens192:
  24. dhcp4: false #true to use dhcp
  25. addresses:
  26. - ${ip}
  27. gateway4: ${gw} # Set gw here
  28. nameservers:
  29. addresses:
  30. - ${dns} # Set DNS ip address here
  31. runcmd:
  32. - netplan apply