Created
June 22, 2017 21:37
-
-
Save samirprakash/78d599a78e1282d9137b2b7d45a61c4a to your computer and use it in GitHub Desktop.
This is the template file being used to create a hyperv-iso based vagrant image.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"type": "hyperv-iso", | |
"communicator":"ssh", | |
"iso_url": "{{user `mirror`}}/16.04/ubuntu-16.04.2-server-amd64.iso", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"output_directory": "output-ubuntu-16.04-amd64-{{build_type}}", | |
"vm_name": "tcdev-hyperv-ubuntu-16.04-amd64", | |
"disk_size": "{{user `disk_size`}}", | |
"http_directory": "./http/", | |
"boot_wait": "5s", | |
"generation": 2, | |
"enable_secure_boot":false, | |
"boot_command": [ | |
"<enter><wait>", | |
"<f6><esc>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs>", | |
"/install/vmlinuz ", | |
"initrd=/install/initrd.gz ", | |
"net.ifnames=0 ", | |
"auto-install/enable=true ", | |
"debconf/priority=critical ", | |
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed.cfg ", | |
"<enter>" | |
], | |
"ssh_timeout": "{{user `ssh_timeout`}}", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"shutdown_command": "echo 'vagrant' | sudo -S -E shutdown -P now" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", | |
"script": "scripts/setup.sh" | |
}, | |
{ | |
"type": "ansible-local", | |
"playbook_file": "ansible/setup.yml", | |
"playbook_dir": "ansible" | |
} | |
], | |
"post-processors": [ | |
{ | |
"compression_level": "9", | |
"output": "build/tcdev-{{build_type}}.box", | |
"type": "vagrant" | |
} | |
], | |
"variables": { | |
"compression_level": "6", | |
"cpus": "1", | |
"disk_size": "40000", | |
"headless": "false", | |
"iso_checksum": "737ae7041212c628de5751d15c3016058b0e833fdc32e7420209b76ca3d0a535", | |
"iso_checksum_type": "sha256", | |
"memory": "512", | |
"mirror": "http://releases.ubuntu.com", | |
"ssh_timeout": "60m" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment