diff --git a/proxmox.tf b/proxmox.tf index 4ba03a0..03f0e5d 100644 --- a/proxmox.tf +++ b/proxmox.tf @@ -24,35 +24,28 @@ resource "proxmox_virtual_environment_download_file" "latest_ubunto_cloud_img" { } resource "proxmox_virtual_environment_file" "cloud_init_yaml" { - content_type = "snippets" - datastore_id = "local-snippets" node_name = "fenix" + datastore_id = "local-snippets" + content_type = "snippets" source_raw { + file_name = "user-data-cloud-config.yaml" data = <<-EOF #cloud-config - hostname: test-ubuntu - timezone: America/Toronto users: - default - name: testeuser - passwd: testepassword - groups: - - sudo + groups: sudo shell: /bin/bash sudo: ALL=(ALL) NOPASSWD:ALL - package_update: true - packages: - - qemu-guest-agent - - net-tools - - curl - runcmd: - - systemctl enable qemu-guest-agent - - systemctl start qemu-guest-agent - - echo "done" > /tmp/cloud-config.done - EOF - file_name = "user-data-cloud-config.yaml" + ssh_pwauth: true + + chpasswd: + list: | + testeuser:testepassword + expire: false + EOF } }