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

47 lines
1.5 KiB
HCL

provider "proxmox" { # description de la connexion au serveur proxmox
pm_tls_insecure = true
pm_api_url = "https://pxlab1.sio.lan:8006/api2/json"
pm_user = "root@pam"
pm_password = "Azerty1+"
}
resource "proxmox_vm_qemu" "s-adm" {
name = "s-adm"
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.201/24" # ou bien ip=dhcp
ipconfig1 = "ip=192.168.99.99/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"
}
}