{ "push": { "name": "", "vcs": true }, "variables": { "atlas_username": "LEAP", "atlas_name": "jessie", "disk_size": "10000", "password": "vagrant", "user": "vagrant", "hostname": "leap-jessie", "domain": "local", "boxversion": "1.2.7" }, "provisioners": [ { "type": "file", "source": "files/leap-archive.gpg", "destination": "/tmp/leap-archive.gpg" }, { "type": "file", "source": "files/leap-experimental-archive.gpg", "destination": "/tmp/leap-experimental-archive.gpg" }, { "type": "shell", "inline": [ "echo {{user `password`}} | sudo -S cp /tmp/leap-archive.gpg /etc/apt/trusted.gpg.d/leap-archive.gpg", "sudo cp /tmp/leap-experimental-archive.gpg /etc/apt/trusted.gpg.d/leap-experimental-archive.gpg", "sudo chown root:root /etc/apt/trusted.gpg.d/leap-archive.gpg /etc/apt/trusted.gpg.d/leap-experimental-archive.gpg" ] }, { "type": "shell", "scripts": [ "scripts/base.sh", "scripts/custom.sh", "scripts/virtualbox.sh", "scripts/vagrant.sh", "scripts/dep.sh", "scripts/cleanup.sh" ], "override": { "qemu": { "execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'" }, "virtualbox-iso": { "execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'" } } }, { "type": "shell", "scripts": [ "scripts/zerodisk.sh" ], "except": ["lxc"] } ], "builders": [ { "type": "lxc", "config_file": "lxc/debian", "template_name": "debian", "template_environment_vars": [ "MIRROR=http://deb.debian.org/debian/", "SUITE=jessie" ], "target_runlevel": 3 }, { "type": "qemu", "accelerator": "kvm", "boot_command": [ "", "install auto ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", "debian-installer=en_US locale=en_US.UTF-8 keymap=us ", "netcfg/get_hostname={{ .Name }} ", "netcfg/get_domain={{ user `domain`}} ", "hostname={{user `hostname`}} ", "fb=false debconf/frontend=noninteractive ", "passwd/user-fullname={{user `user`}} ", "passwd/user-password={{user `password`}} ", "passwd/user-password-again={{user `password`}} ", "passwd/username={{user `user`}} ", "" ], "boot_wait": "5s", "disk_cache": "none", "disk_interface": "virtio", "disk_size": "{{ user `disk_size`}}", "format": "qcow2", "headless": "true", "http_directory": "http", "iso_checksum": "749a15b7690769dd99e85d6104182a03d370b04b36106ec7cfaf6a551aa89fb4", "iso_checksum_type": "sha256", "iso_url": "http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso", "net_device": "virtio-net", "qemuargs": [ [ "-m", "1024M" ] ], "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now", "ssh_password": "{{user `password`}}", "ssh_username": "{{user `user`}}", "ssh_wait_timeout": "15m" }, { "type": "virtualbox-iso", "boot_command": [ "", "install auto ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", "debian-installer=en_US locale=en_US.UTF-8 keymap=us ", "netcfg/get_hostname={{ .Name }} ", "netcfg/get_domain={{ user `domain`}} ", "hostname={{user `hostname`}} ", "fb=false debconf/frontend=noninteractive ", "passwd/user-fullname={{user `user`}} ", "passwd/user-password={{user `password`}} ", "passwd/user-password-again={{user `password`}} ", "passwd/username={{user `user`}} ", "" ], "headless": true, "boot_wait": "10s", "disk_size": "{{ user `disk_size`}}", "guest_os_type": "Debian_64", "http_directory": "http", "iso_checksum": "749a15b7690769dd99e85d6104182a03d370b04b36106ec7cfaf6a551aa89fb4", "iso_checksum_type": "sha256", "iso_url": "http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, "ssh_wait_timeout": "15m", "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'", "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "virtualbox_version_file": ".vbox_version" } ], "post-processors": [ [{ "type": "vagrant", "keep_input_artifact": false, "except": ["lxc"] }, { "type": "compress", "output": "output-vagrant/jessie64-lxc.box", "only": ["lxc"] }, { "type": "atlas", "only": ["lxc"], "artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}", "artifact_type": "vagrant.box", "metadata": { "provider": "lxc", "created_at": "{{timestamp}}", "version": "{{user `boxversion`}}" } }, { "type": "atlas", "only": ["virtualbox-iso"], "artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}", "artifact_type": "vagrant.box", "metadata": { "provider": "virtualbox", "created_at": "{{timestamp}}", "version": "{{user `boxversion`}}" } }, { "type": "atlas", "only": ["qemu"], "artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}", "artifact_type": "vagrant.box", "metadata": { "provider": "libvirt", "created_at": "{{timestamp}}", "version": "{{user `boxversion`}}" } }] ] }