-
Notifications
You must be signed in to change notification settings - Fork 0
/
centos7_esxi.json
54 lines (54 loc) · 1.81 KB
/
centos7_esxi.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
{
"variables": {
"HOME": "{{env `HOME`}}",
"USER": "{{env `USER`}}",
"remote_datastore": "{{env `ESXI_DS`}}",
"remote_username": "{{env `ESXI_USER`}}",
"remote_password": "{{env `ESXI_PASS`}}",
"remote_host": "{{env `ESXI_IP`}}",
"remote_hostname": "{{env `ESXI_HOST`}}",
"output_directory": "{{env `GO_PIPELINE_COUNTER`}}",
"vm_name": "centos7"
},
"builders": [{
"type": "vmware-iso",
"boot_command": [
"<tab> text ks=https://raw.githubusercontent.com/trilitheus/centos7-base/master/kickstart/kickstart.cfg<enter><wait>"
],
"boot_wait": "5s",
"guest_os_type": "centos-64",
"disk_size": 61440,
"iso_url": "http://repo.bigstepcloud.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso",
"iso_checksum": "27bd866242ee058b7a5754e83d8ee8403e216b93d130d800852a96f41c34d86a",
"iso_checksum_type": "sha256",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo '{{user `USER`}}' | sudo -S shutdown -P now",
"name": "{{user `vm_name`}}",
"remote_type": "esx5",
"remote_host": "{{user `remote_host`}}",
"remote_username": "{{user `remote_username`}}",
"remote_password": "{{user `remote_password`}}",
"remote_datastore": "{{user `remote_datastore`}}",
"output_directory": "{{user `output_directory`}}",
"vmx_data": {
"format": "vmx",
"ethernet0.networkName": "VM Network"
}
}],
"provisioners": [{
"type": "chef-solo",
"cookbook_paths": ["cookbooks"],
"run_list": ["recipe[base_hardening::default]"]
}, {
"type": "shell",
"environment_vars": [
"HOME_DIR=/home/vagrant"
],
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
"scripts": [
"scripts/vagrant.sh"
]
}]
}