Skip to content

Instantly share code, notes, and snippets.

@johnLate
Created April 14, 2016 20:27
Show Gist options
  • Save johnLate/d9f532b984d7dee5c7956109f11fde44 to your computer and use it in GitHub Desktop.
Save johnLate/d9f532b984d7dee5c7956109f11fde44 to your computer and use it in GitHub Desktop.
Packer file with misspelled variable name ssh_pw vs. ssh_ps
{
"variables": {
"ssh_user": "x",
"ssh_pw": "y"
},
"builders": [{
"type": "virtualbox-iso",
"guest_os_type": "Debian_64",
"vm_name": "bug-test-ssh",
"iso_urls": [
"debian-8.4.0-amd64-netinst.iso",
"http://ftp.debian.de/debian-cd/8.4.0/amd64/iso-cd/debian-8.4.0-amd64-netinst.iso"
],
"iso_checksum": "92cb8946618e3ed776827e7fcb56e452d993dbf8",
"iso_checksum_type": "sha1",
"boot_command": [
"<esc><wait>",
"install",
" auto",
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
" debian-installer=en_US",
" locale=en_US.UTF-8",
" keymap=us",
" netcfg/get_hostname=test1",
" netcfg/get_domain=test",
"<enter>"
],
"http_directory": "http",
"ssh_username": "{{user `ssh_user`}}",
"ssh_password": "{{user `ssh_ps`}}",
"shutdown_command": "echo '{{user `ssh_ps`}}' | sudo -S shutdown -P now"
}]
}
d-i debian-installer/locale string en_US.UTF-8
d-i keyboard-configuration/xkb-keymap select us
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string
apt-cdrom-setup apt-setup/cdrom/set-first boolean false
apt-cdrom-setup apt-setup/cdrom/set-next boolean false
apt-cdrom-setup apt-setup/cdrom/set-failed boolean false
d-i apt-setup/use_mirror boolean false
d-i mirror/protocol string http
d-i mirror/country string Germany
d-i mirror/http/hostname string ftp.debian.de
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i passwd/root-login boolean false
d-i passwd/user-fullname string x
d-i passwd/username string x
d-i passwd/user-password password y
d-i passwd/user-password-again password y
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Berlin
d-i clock-setup/ntp boolean true
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/choose_recipe select atomic
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
d-i partman-md/confirm boolean true
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
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
tasksel tasksel/first multiselect ssh-server
d-i pkgsel/include string openssh-server
popularity-contest popularity-contest/participate boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string /dev/sda
d-i finish-install/reboot_in_progress note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment