-
Notifications
You must be signed in to change notification settings - Fork 26
/
centos-stream-8-x86_64-powervs.json.pkr.hcl
88 lines (78 loc) · 2.07 KB
/
centos-stream-8-x86_64-powervs.json.pkr.hcl
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
source "vagrant" "centos-stream-8" {
source_path = "https://ftp.osuosl.org/pub/osl/vagrant/centos-stream-8.box"
communicator = "ssh"
provider = "virtualbox"
}
source "qemu" "centos-stream-8" {
accelerator = "kvm"
boot_command = [
"<tab> text biosdevname=0 net.ifnames=0 ",
"inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos-stream-8/ks-x86_64.cfg<enter><wait>"
]
boot_wait = "10s"
disk_interface = "virtio-scsi"
disk_size = 4096
format = "raw"
headless = true
http_directory = "http"
iso_checksum = "file:https://centos.osuosl.org/8-stream/isos/x86_64/CHECKSUM"
iso_url = "${var.mirror}/8-stream/isos/x86_64/CentOS-Stream-8-x86_64-latest-dvd1.iso"
qemu_binary = "qemu-kvm"
qemuargs = [
[
"-m",
"2048M"
]
]
shutdown_command = "/sbin/halt -h -p"
ssh_password = "osuadmin"
ssh_port = 22
ssh_username = "root"
ssh_wait_timeout = "10000s"
vnc_bind_address = "0.0.0.0"
}
build {
sources = [
"source.vagrant.centos-stream-8",
"source.qemu.centos-stream-8"
]
provisioner "shell-local" {
scripts = [
"scripts/common/berks-vendor.sh"
]
}
provisioner "shell" {
execute_command = "{{ .Vars }} sudo -S -E bash '{{ .Path }}'"
scripts = [
"scripts/common/install-cinc.sh"
]
}
provisioner "file" {
source = "cookbooks"
destination = "/tmp/cinc/"
}
provisioner "file" {
source = "inspec"
destination = "/tmp/cinc/"
}
provisioner "file" {
source = "chef/client.rb"
destination = "/tmp/cinc/client.rb"
}
provisioner "file" {
source = "chef/runlist/powervs.json"
destination = "/tmp/cinc/dna.json"
}
provisioner "shell" {
execute_command = "{{ .Vars }} sudo -S -E bash '{{ .Path }}'"
scripts = [
"scripts/common/converge-cinc.sh",
"scripts/common/remove-cinc.sh",
"scripts/common/minimize.sh"
]
}
}
variable "mirror" {
type = string
default = "https://centos.osuosl.org"
}