Last active
September 7, 2017 13:44
-
-
Save soulsearcher/1a0afa4bcc459ce3dc0111a1dd855b32 to your computer and use it in GitHub Desktop.
packer post-processors
This file contains hidden or 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
{ | |
"variables": { | |
"iso_url": "http://ftp.daumkakao.com/centos/7.3.1611/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso", | |
"iso_checksum": "27bd866242ee058b7a5754e83d8ee8403e216b93d130d800852a96f41c34d86a", | |
"iso_checksum_type": "sha256", | |
"ssh_username": "root", | |
"ssh_password": "vagrant", | |
"disk_size": "8192" | |
}, | |
"builders": [ | |
{ | |
"type": "virtualbox-iso", | |
"guest_os_type": "RedHat_64", | |
"iso_url": "{{ user `iso_url` }}", | |
"iso_checksum": "{{ user `iso_checksum` }}", | |
"iso_checksum_type": "{{ user `iso_checksum_type` }}", | |
"http_directory": "http", | |
"boot_command": "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks-centos73-1611.cfg<enter><wait>", | |
"ssh_username": "{{ user `ssh_username` }}", | |
"ssh_password": "{{ user `ssh_password` }}", | |
"disk_size": "{{ user `disk_size` }}", | |
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now", | |
"format": "ova", | |
"output_directory": "packer-parallel-virtualbox", | |
"vm_name": "centos7-1611-provision" | |
}, | |
{ | |
"type": "vmware-iso", | |
"guest_os_type": "rhel7-64", | |
"iso_url": "{{ user `iso_url` }}", | |
"iso_checksum": "{{ user `iso_checksum` }}", | |
"iso_checksum_type": "{{ user `iso_checksum_type` }}", | |
"http_directory": "http", | |
"boot_command": "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks-centos73-1611.cfg<enter><wait>", | |
"ssh_username": "{{ user `ssh_username` }}", | |
"ssh_password": "{{ user `ssh_password` }}", | |
"disk_size": "{{ user `disk_size` }}", | |
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now", | |
"format": "ova", | |
"output_directory": "packer-parallel-vmware", | |
"vm_name": "centos7-1611-provision" | |
} | |
], | |
"provisioners" : [ | |
{ | |
"type": "shell", | |
"inline": [ | |
"sleep 30", | |
"sudo yum -y update" | |
] | |
} | |
], | |
"post-processors" : [ | |
"vagrant" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment