first commit
This commit is contained in:
commit
6cb709bc3a
16 changed files with 1142 additions and 0 deletions
77
centos8/packer.json
Normal file
77
centos8/packer.json
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"variables": {
|
||||
"proxmox_username": "",
|
||||
"proxmox_password": "",
|
||||
"proxmox_url": "",
|
||||
"proxmox_node": "",
|
||||
"proxmox_storage_pool": "local-lvm",
|
||||
"proxmox_storage_pool_type": "lvm-thin",
|
||||
"proxmox_storage_format": "raw",
|
||||
"proxmox_iso_pool": "local:iso",
|
||||
"centos_image": "CentOS-8.1.1911-x86_64-dvd1.iso",
|
||||
"template_name": "CentOS8-Template",
|
||||
"template_description": "CentOS 8 Template",
|
||||
"version": ""
|
||||
},
|
||||
"builders": [
|
||||
{
|
||||
"type": "proxmox",
|
||||
"username": "{{user `proxmox_username`}}",
|
||||
"password": "{{user `proxmox_password`}}",
|
||||
"proxmox_url": "{{ user `proxmox_url`}}",
|
||||
"insecure_skip_tls_verify": true,
|
||||
"node": "{{user `proxmox_node`}}",
|
||||
"os": "l26",
|
||||
"boot_command": [
|
||||
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
|
||||
],
|
||||
"network_adapters": [
|
||||
{
|
||||
"bridge": "vmbr0",
|
||||
"model": "virtio"
|
||||
}
|
||||
],
|
||||
"disks": [
|
||||
{
|
||||
"type": "scsi",
|
||||
"disk_size": "8G",
|
||||
"storage_pool": "{{user `proxmox_storage_pool`}}",
|
||||
"storage_pool_type": "{{user `proxmox_storage_pool_type`}}",
|
||||
"format": "{{user `proxmox_storage_format`}}"
|
||||
}
|
||||
],
|
||||
"scsi_controller": "virtio-scsi-single",
|
||||
"iso_file": "{{user `proxmox_iso_pool`}}/{{user `centos_image`}}",
|
||||
"boot_wait": "10s",
|
||||
"cores": "2",
|
||||
"memory": "2048",
|
||||
"http_directory": "centos8",
|
||||
"ssh_username": "root",
|
||||
"ssh_password": "Packer",
|
||||
"ssh_port": 22,
|
||||
"ssh_timeout": "15m",
|
||||
"unmount_iso": true,
|
||||
"template_name": "{{user `template_name`}}",
|
||||
"template_description": "{{user `template_description`}}"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"yum install -y cloud-init qemu-guest-agent cloud-utils-growpart gdisk",
|
||||
"shred -u /etc/ssh/*_key /etc/ssh/*_key.pub",
|
||||
"rm -f /var/run/utmp",
|
||||
">/var/log/lastlog",
|
||||
">/var/log/wtmp",
|
||||
">/var/log/btmp",
|
||||
"rm -rf /tmp/* /var/tmp/*",
|
||||
"unset HISTFILE; rm -rf /home/*/.*history /root/.*history",
|
||||
"rm -f /root/*ks",
|
||||
"passwd -d root",
|
||||
"passwd -l root"
|
||||
],
|
||||
"only": ["proxmox"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue