-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrhel-7.9-BM.json
51 lines (51 loc) · 1.53 KB
/
rhel-7.9-BM.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
{
"variables": {
"ORG_ID": "{{env `RHEL_ORG_ID`}}",
"KEY": "{{env `RHEL_KEY`}}"
},
"builders": [
{
"boot_command": "<up>e<wait><down><down><end> ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel-7.9-BM-ks.cfg<wait><f10>",
"boot_wait": "10s",
"disk_size": "40960",
"guest_os_type": "RedHat_64",
"headless": false,
"http_directory": "http",
"iso_checksum": "sha256:19d653ce2f04f202e79773a0cbeda82070e7527557e814ebbce658773fbe8191",
"iso_interface": "sata",
"iso_url": "iso/rhel-server-7.9-x86_64-dvd.iso",
"keep_registered": "true",
"output_directory": "packer-rhel7.9-BM-virtualbox",
"shutdown_command": "echo 'opc'|sudo -S /sbin/halt -h -p",
"ssh_password": "opc",
"ssh_port": 22,
"ssh_timeout": "3600s",
"ssh_username": "opc",
"type": "virtualbox-iso",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--firmware", "EFI" ]
],
"vm_name": "rhel-7.9-BM-{{ isotime \"19970804021400\" }}"
}
],
"provisioners": [
{
"type": "file",
"source": "scripts/rhel_7.9_BM/BM.sh",
"destination": "/tmp/BM.sh"
},
{
"type": "shell",
"execute_command": "echo 'opc' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"inline": [
"chmod u+x /tmp/BM.sh",
"/tmp/BM.sh {{user `ORG_ID`}} {{user `KEY`}}"
]
},
{
"type": "shell",
"execute_command": "echo 'opc' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "scripts/rhel_7.9/cleanup.sh"
}
]
}