diff --git a/example/cloud_init.cfg b/example/cloud_init.cfg deleted file mode 100644 index 17c3ed1..0000000 --- a/example/cloud_init.cfg +++ /dev/null @@ -1,10 +0,0 @@ -ssh_pwauth: true -chpasswd: - list: | - root:phyllome - expire: False -disable_root: false - -runcmd: - - sed -i '/PermitRootLogin/s/.*/PermitRootLogin yes/' /etc/ssh/sshd_config - - systemctl restart sshd \ No newline at end of file diff --git a/ubuntu-cloud-server-2404-bios/cloud_init.cfg b/ubuntu-cloud-server-2404-bios/cloud_init.cfg deleted file mode 100644 index 17c3ed1..0000000 --- a/ubuntu-cloud-server-2404-bios/cloud_init.cfg +++ /dev/null @@ -1,10 +0,0 @@ -ssh_pwauth: true -chpasswd: - list: | - root:phyllome - expire: False -disable_root: false - -runcmd: - - sed -i '/PermitRootLogin/s/.*/PermitRootLogin yes/' /etc/ssh/sshd_config - - systemctl restart sshd \ No newline at end of file diff --git a/ubuntu-cloud-server-2404-bios/ubuntu-cloud-server-2404-bios.tf b/ubuntu-cloud-server-2404-bios/ubuntu-cloud-server-2404-bios.tf deleted file mode 100644 index 1f25c50..0000000 --- a/ubuntu-cloud-server-2404-bios/ubuntu-cloud-server-2404-bios.tf +++ /dev/null @@ -1,75 +0,0 @@ -terraform { - required_version = ">= 0.13" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.8.3" - } - } -} - -provider "libvirt" { - uri = "qemu:///system" -} - -resource "libvirt_pool" "ubuntu-bios" { - name = "ubuntu-bios" - type = "dir" - target { - path = "/tmp/ubuntu-bios" - } -} - -resource "libvirt_volume" "ubuntu-bios" { - name = "ubuntu-bios-${count.index}" - pool = libvirt_pool.ubuntu-bios.name - source = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img" - format = "qcow2" - count = 2 -} - -data "template_file" "user_data" { - template = file("${path.module}/cloud_init.cfg") -} - -resource "libvirt_cloudinit_disk" "commoninit" { - name = "commoninit.iso" - user_data = data.template_file.user_data.rendered - pool = libvirt_pool.ubuntu-bios.name -} - -resource "libvirt_domain" "domain" { - count = 2 - name = "ubuntu-cloud-server-2404-${count.index}" - memory = "4092" - vcpu = 2 - cloudinit = libvirt_cloudinit_disk.commoninit.id - - cpu { - mode = "host-model" - } - - disk { - volume_id = element(libvirt_volume.ubuntu-bios.*.id, count.index) - } - - console { - type = "pty" - target_port = "0" - target_type = "virtio" - } - - video { - type = "virtio" - } - - tpm { - backend_type = "emulator" - backend_version = "2.0" - } - - network_interface { - network_name = "default" - } - -} \ No newline at end of file