{
  "builders": [
    {
      "accelerator": "kvm",
      "boot_command": [
        "<tab>",
        "linux ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos7-anaconda-ks.cfg biosdevname=0 net.ifnames=0",
        "<enter>",
        "<wait>"
      ],
      "boot_wait": "2s",
      "disk_size": "{{ user `disk_size`}}000",
      "format": "qcow2",
      "headless": true,
      "http_directory": "http",
      "iso_checksum": "sha256:3ee3f4ea1538e026fff763e2b284a6f20b259d91d1ad5688f5783a67d279423b",
      "iso_url": "http://mirrors.ircam.fr/pub/CentOS/8.1.1911/isos/x86_64/CentOS-8.1.1911-x86_64-dvd1.iso",
      "name": "centos8-{{ user `disk_size`}}G-{{ user `name`}}",
      "shutdown_command": "sudo poweroff",
      "ssh_password": "{{user `password`}}",
      "ssh_timeout": "1800s",
      "ssh_username": "{{user `user`}}",
      "type": "qemu"
    }
  ],
  "provisioners": [
    {
      "execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
      "scripts": [
        "scripts/update-centos.sh",
        "scripts/packages-centos.sh",
        "scripts/cleanup-centos.sh",
        "scripts/centos7-install-base.sh",
        "{{ user `custom_script` }}"
      ],
      "type": "shell"
    }
  ],
  "variables": {
    "custom_script": "scripts/empty.sh",
    "disk_size": "100",
    "domain": "",
    "name": "image",
    "password": "slapos",
    "user": "slapos"
  }
}

