-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f227cf7
commit eb06ab4
Showing
7 changed files
with
157 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{} | ||
{"/home/sam/Deployment_Linux/Packer/packer-terraform-vmware/packer-vsphere-iso-windows/win2016.base/autounattend.xml":[14846,1631301008435.3188,"d2d82f997add4f612bc6c02cb99a69e9696b6b223ca755ca2116f9825508723a"],"/home/sam/Deployment_Linux/Packer/packer-terraform-vmware/packer-vsphere-iso-windows/win2019.base/autounattend.xml":[11928,1631301008445.3188,"a5642d0381fdf1fb0be3bbd27cd2f96b20b02692868450d301e6594a2a175fab"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Packer Template for Ubuntu 16.04 LTS | ||
|
||
To create the template execute **packer build -force -debug -on-error=ask -var-file variables.json ubuntu16-thick.json** for debugging. | ||
|
||
Or execute **packer build -force -var-file variables.json ubuntu16-thick.json** for regular deployment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Setting the locales, country | ||
# Supported locales available in /usr/share/i18n/SUPPORTED | ||
d-i debian-installer/language string en | ||
d-i debian-installer/country string us | ||
d-i debian-installer/locale string en_US.UTF-8 | ||
|
||
# Keyboard setting | ||
d-i console-setup/ask_detect boolean false | ||
d-i keyboard-configuration/layoutcode string us | ||
d-i keyboard-configuration/xkb-keymap us | ||
d-i keyboard-configuration/modelcode string pc105 | ||
|
||
# User creation | ||
d-i passwd/user-fullname string username | ||
d-i passwd/username string username | ||
d-i passwd/user-password password xxxx | ||
d-i passwd/user-password-again password xxxx | ||
d-i user-setup/allow-password-weak boolean true | ||
|
||
# Disk and Partitioning setup | ||
d-i partman-auto/disk string /dev/sda | ||
d-i partman-auto/method string regular | ||
d-i partman-partitioning/confirm_write_new_label boolean true | ||
d-i partman/choose_partition select finish | ||
d-i partman/confirm boolean true | ||
d-i partman/confirm_nooverwrite boolean true | ||
|
||
# Set root password | ||
d-i passwd/root-login boolean true | ||
d-i passwd/root-password password SecretPass | ||
d-i passwd/root-password-again password SecretPass | ||
|
||
# Package installations | ||
d-i pkgsel/include string open-vm-tools openssh-server net-tools perl vim | ||
# d-i pkgsel/include string open-vm-tools openssh-server net-tools perl perl-modules-5.26 | ||
|
||
d-i grub-installer/only_debian boolean true | ||
|
||
d-i preseed/late_command string \ | ||
echo 'username ALL=(ALL) NOPASSWD: ALL' > /target/etc/sudoers.d/username ; \ | ||
in-target chmod 440 /etc/sudoers.d/username ; | ||
|
||
d-i finish-install/reboot_in_progress note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"builders": [ | ||
{ | ||
"type": "vsphere-iso", | ||
|
||
"vcenter_server": "{{user `vcenter-server`}}", | ||
"username": "{{user `vcenter-username`}}", | ||
"password": "{{user `vcenter-password`}}", | ||
"insecure_connection": "true", | ||
"datacenter": "{{user `datacenter`}}", | ||
|
||
"vm_name": "{{user `vm-name`}}", | ||
|
||
"datastore": "{{user `datastore`}}", | ||
"folder": "{{user `folder`}}", | ||
"host": "{{user `host`}}", | ||
"cluster": "{{user `cluster`}}", | ||
|
||
"convert_to_template": "true", | ||
|
||
|
||
"network_adapters": [ | ||
{ | ||
"network": "{{user `network`}}", | ||
"network_card": "vmxnet3" | ||
} | ||
], | ||
|
||
"boot_order": "disk,cdrom", | ||
|
||
"guest_os_type": "ubuntu64Guest", | ||
|
||
"ssh_username": "{{user `ssh-username`}}", | ||
"ssh_password": "{{user `ssh-password`}}", | ||
|
||
"CPUs": "{{user `vm-cpu-num`}}", | ||
"RAM": "{{user `vm-mem-size`}}", | ||
"RAM_reserve_all": true, | ||
|
||
"disk_controller_type": "pvscsi", | ||
"storage": [ | ||
{ | ||
"disk_size": "{{user `vm-disk-size`}}", | ||
"disk_thin_provisioned": false | ||
} | ||
], | ||
|
||
"iso_urls": "{{user `iso-url`}}", | ||
"iso_checksum": "{{user `iso-checksum-type`}}:{{user `iso-checksum`}}", | ||
|
||
"floppy_files": ["./preseed.cfg"], | ||
"boot_command": [ | ||
"<enter><wait><f6><wait><esc><wait>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | ||
"<bs><bs><bs>", | ||
"/install/vmlinuz", | ||
" initrd=/install/initrd.gz", | ||
" priority=critical", | ||
" locale=en_US", | ||
" file=/media/preseed.cfg", | ||
"<enter>" | ||
] | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "shell", | ||
"inline": [ | ||
"sudo rm /etc/machine-id", | ||
"sudo touch /etc/machine-id", | ||
"echo 'Packer Template Build -- Complete'" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"vm-name": "Ubuntu-1604-Template", | ||
|
||
"vcenter-server":"192.168.x.x", | ||
"vcenter-username":"[email protected]", | ||
"vcenter-password": "xxxxx", | ||
|
||
"datacenter": "Datacenter", | ||
"datastore": "Datastore2_NonSSD", | ||
"folder": "Templates", | ||
"cluster": "Cluster01", | ||
"network": "VM Network", | ||
|
||
"vm-cpu-num": "1", | ||
"vm-mem-size": "1024", | ||
"vm-disk-size": "10240", | ||
|
||
"ssh-username": "username", | ||
"ssh-password": "xxxx", | ||
|
||
"iso-url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.7-server-amd64.iso", | ||
"iso-checksum": "b23488689e16cad7a269eb2d3a3bf725d3457ee6b0868e00c8762d3816e25848", | ||
"iso-checksum-type": "sha256" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters