Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
packer-centos-7/centos7-vbox.json
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jim Van Fleet
Adding dumb copy of VirtualBox specific packer command
51 lines (51 sloc)
1.42 KB
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
{ | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"execute_command": "echo 'packer' | {{.Vars}} sudo -S -E bash '{{.Path}}'", | |
"script": "scripts/ansible.sh" | |
}, | |
{ | |
"type": "ansible-local", | |
"playbook_file": "ansible/main.yml" | |
}, | |
{ | |
"type": "shell", | |
"execute_command": "echo 'packer' | {{.Vars}} sudo -S -E bash '{{.Path}}'", | |
"script": "scripts/cleanup.sh" | |
} | |
], | |
"builders": [ | |
{ | |
"type": "virtualbox-iso", | |
"name": "centos-7-vmx", | |
"boot_command": [ | |
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" | |
], | |
"boot_wait": "10s", | |
"disk_size": 81920, | |
"guest_os_type": "RedHat_64", | |
"headless": true, | |
"http_directory": "http", | |
"iso_urls": [ | |
"CentOS-7-x86_64-Minimal-1511.iso", | |
"http://mirror.vcu.edu/pub/gnu+linux/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso" | |
], | |
"iso_checksum_type": "md5", | |
"iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67", | |
"output_directory": "img-centos-7-vmware", | |
"ssh_username": "packer", | |
"ssh_password": "changeme1234", | |
"ssh_port": 22, | |
"ssh_wait_timeout": "10000s", | |
"shutdown_command": "echo 'packer'|sudo -S /sbin/halt -h -p", | |
"vm_name": "packer-centos-7-x86_64" | |
} | |
], | |
"post-processors": [ | |
{ | |
"output": "builds/packer_centos7_{{.BuilderType}}.tar", | |
"type": "compress" | |
} | |
] | |
} |