forked from goffinet/packer-kvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
almalinux8.json
72 lines (72 loc) · 2.33 KB
/
almalinux8.json
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
"variables":
{
"cpu": "2",
"ram": "2048",
"name": "almalinux",
"disk_size": "40000",
"version": "8",
"iso_checksum_type": "sha256",
"iso_urls": "https://repo.almalinux.org/almalinux/8.4/isos/x86_64/AlmaLinux-8.4-x86_64-boot.iso",
"iso_checksum": "76e8f56892e6d90706b142868eec51b6b8c015ec3792f8d9e0730da93a2d1162",
"headless": "true",
"config_file": "almalinux8-kickstart.cfg",
"ssh_username": "root",
"ssh_password": "testtest",
"destination_server": "download.goffinet.org"
},
"builders": [
{
"name": "{{user `name`}}{{user `version`}}",
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"qemu_binary": "/usr/bin/qemu-system-x86_64",
"net_device": "virtio-net",
"disk_interface": "virtio",
"disk_cache": "none",
"qemuargs": [[ "-m", "{{user `ram`}}M" ],[ "-smp", "{{user `cpu`}}" ]],
"ssh_wait_timeout": "30m",
"http_directory": ".",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"iso_urls": "{{user `iso_urls`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"boot_wait": "40s",
"boot_command": [
"<up><wait><tab><wait> net.ifnames=0 biosdevname=0 text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/http/{{user `config_file`}}<enter><wait>"
],
"disk_size": "{{user `disk_size`}}",
"disk_discard": "unmap",
"disk_compression": true,
"headless": "{{user `headless`}}",
"shutdown_command": "sudo /usr/sbin/shutdown -h now",
"output_directory": "artifacts/qemu/{{user `name`}}{{user `version`}}"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "{{ .Vars }} sudo -E bash '{{ .Path }}'",
"inline": [
"yum -y install epel-release",
"yum repolist",
"yum -y install ansible"
]
},
{
"type": "ansible-local",
"playbook_file": "ansible/playbook.yml",
"playbook_dir": "ansible"
}
],
"post-processors": [
{
"type": "shell-local",
"script": "scripts/push-image.sh",
"environment_vars": ["IMAGE_NAME={{user `name`}}",
"IMAGE_VERSION={{user `version`}}",
"DESTINATION_SERVER={{user `destination_server`}}"]
}
]
}