1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{
"variables": {
"ssh_password": "{{ env `ROOTPW` }}"
},
"builders": [
{
"type": "qemu",
"iso_url": "{{ user `base_image` }}",
"iso_checksum": "none",
"output_directory": "{{ user `output_directory` }}",
"vm_name": "{{ user `vm_name` }}",
"accelerator": "kvm",
"disk_image": "true",
"skip_compaction": "true",
"use_backing_file": "false",
"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` }}",
"ansible_ssh_extra_args": [
"-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa"
]
}]
}
|