summaryrefslogblamecommitdiffstats
path: root/ansible-provisioner.json
blob: 6dec7a8b86d0922b2ddc31b3b712158b9be920d3 (plain) (tree)




















                                                                            
                                                 


























                                                                                               
{
	"variables": {
		"ssh_password": "{{ env `ROOTPW` }}"
	},
	"builders": [
		{
			"type": "qemu",
			"iso_url": "{{ user `base_image` }}",
			"iso_checksum_type": "none",
			"output_directory": "{{ user `output_directory` }}",
			"vm_name": "{{ user `vm_name` }}",
			"accelerator": "kvm",
			"disk_image": "true",
			"disk_size": "{{ user `disk_size` }}",
			"format": "qcow2",
			"headless": "{{ user `headless` }}",
			"ssh_timeout": "{{ user `ssh_timeout` }}",
			"ssh_username": "{{ user `ssh_username` }}",
			"ssh_password": "{{ user `ssh_password` }}",
			"shutdown_command": "systemctl poweroff",
			"qemuargs": [
				["-cpu", "host"],
				["-m", "{{ user `memory` }}"],
				["-smp", "{{ user `cpus` }}"]
			]
		},
		{
			"type": "virtualbox-ovf",
			"source_path": "{{ user `base_image` }}.ovf",
			"output_directory": "{{ user `output_directory` }}",
			"vm_name": "{{ user `vm_name` }}",
			"headless": "{{ user `headless` }}",
			"ssh_timeout": "{{ user `ssh_timeout` }}",
			"ssh_username": "{{ user `ssh_username` }}",
			"ssh_password": "{{ user `ssh_password` }}",
			"shutdown_command": "systemctl poweroff",
			"guest_additions_mode": "disable",
			"vboxmanage": [
				["modifyvm", "{{ .Name }}", "--memory", "{{ user `memory` }}"],
				["modifyvm", "{{ .Name }}", "--cpus", "{{ user `cpus` }}"]
			]
		}
	],
	"provisioners": [{
		"type": "ansible",
		"playbook_file": "{{ user `playbook` }}",
		"extra_arguments": "{{ user `extra_ansible_args` }}"
	}]
}