A custom modification of the virt-install-cloud.sh script located at https://github.com/clauded/virt-tools
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.

user-data 854B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #cloud-config
  2. users:
  3. - name: testuser
  4. lock-passwd: false
  5. passwd: hashed-passwd-here
  6. ssh_authorized_keys:
  7. - ssh-key-here
  8. sudo: ['ALL=(ALL) NOPASSWD:ALL']
  9. groups: sudo
  10. shell: /bin/bash
  11. ssh_pwauth: True
  12. package_upgrade: true
  13. apt_upgrade: false
  14. manage_etc_hosts: true
  15. fqdn: %FQDN%
  16. timezone: US/Mountain
  17. manage_resolv_conf: true
  18. resolv_conf:
  19. nameservers: ['%NAMESERVER1%', '%NAMESERVER2%']
  20. searchdomains:
  21. - %DOMAIN%
  22. domain: %DOMAIN%
  23. #datasource_list:
  24. # - ConfigDrive
  25. packages:
  26. - openssh-server
  27. - nano
  28. runcmd:
  29. - [ touch, /etc/cloud/cloud-init.disabled ]
  30. - [ rm, -f, /etc/sudoers.d/debian-cloud-init ]
  31. bootcmd:
  32. - 'mv -f /etc/network/interfaces.d/50-cloud-init.cfg /etc/network/interfaces'
  33. - 'echo -e "domain %DOMAIN%\nsearch %DOMAIN%\nnameserver %NAMESERVER1%\nnameserver %NAMESERVER2%" >/etc/resolv.conf'