gsbt/miniinf.tf
2022-12-17 00:03:03 +01:00

40 lines
1.3 KiB
HCL

resource "proxmox_vm_qemu" "miniinf" {
name = "miniinf"
os_type = "cloudinit"
desc = "Serveur install s-adm"
target_node = "pxlab1" # la machine Proxmox cible
clone = "Debian-11.5-Template" # le nom de la template a cloner
cores = 1
sockets = 1
memory = 1024
ipconfig0 = "gw=172.16.0.254,ip=172.16.0.202/24" # ou bien ip=dhcp
ipconfig1 = "ip=192.168.99.100/24" #
ssh_user = "debian" # le compte SSH de connexion par défaut
sshkeys = <<-EOT
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDd97G/Uw3zlnhVByjpHZFw9FDa88phFUMtYfstTq7wYlUOJB2rdLPpU0bAjIpvpYmHOmBNseWYKaOT7EXNdxWPWJGuoen23tqdSzhnOV0LJz8zbCIA0Ykz/XOqRyJkq6qUw+L3atDxVC5pSSSY279yJtuQ2nmVld2KWDY4lnyZzZT5eQsrxCbT57hVMLCKcMKNb4QnYlLgnyHW8DyWHGG5GEWF9skFSPlmwY5s5H3OYg3u8ijuGjenjDTzLfRUzFltGJ2kBYbIn1iailArKpCiasmJyyja+YuYn3WwaNcl8Tpqa8eI52/LtOXDMwUKzvRJ6D6INEr/1duGYP/fQSEH root@ansible
EOT
network {
# id = 0
model = "virtio"
bridge = "vmbr0" # le bridge standard pour l'interface réseau
}
network {
# id = 1
model = "virtio"
bridge = "vmbr1" # le bridge standard pour l'interface réseau
}
disk {
type = "scsi"
storage = "local-lvm"
# storage_type = "qcow2"
size = "6G"
format = "raw"
}
}