From 2046c09bf47e56b174845e5e8677968be8ea023b Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 10 Apr 2017 14:08:36 +0200 Subject: [ubuntu] support root password via ROOTPW env --- ubuntu-16.04-amd64.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'ubuntu-16.04-amd64.json') diff --git a/ubuntu-16.04-amd64.json b/ubuntu-16.04-amd64.json index 208b088..79276fa 100644 --- a/ubuntu-16.04-amd64.json +++ b/ubuntu-16.04-amd64.json @@ -3,17 +3,18 @@ "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso", "iso_checksum": "737ae7041212c628de5751d15c3016058b0e833fdc32e7420209b76ca3d0a535", "iso_checksum_type": "sha256", - "vm_name": "packer-ubuntu-amd64", + "vm_name": "ubuntu-amd64", "http_dir": "http", "preseed_path": "ubuntu-16.04/preseed.cfg", - "shutdown_command": "systemctl poweroff" + "shutdown_command": "systemctl poweroff", + "ssh_password":"{{ env `ROOTPW` }}" }, "builders": [{ "type": "qemu", "iso_url": "{{ user `iso_url` }}", "iso_checksum": "{{ user `iso_checksum` }}", "iso_checksum_type": "{{ user `iso_checksum_type` }}", - "output_directory": "output-ubuntu-amd64-{{ build_type }}-{{ timestamp }}", + "output_directory": "qemu/output-ubuntu-amd64-{{ build_type }}-{{ timestamp }}", "vm_name": "{{ user `vm_name` }}", "disk_size": "{{ user `disk_size` }}", "format": "qcow2", @@ -34,6 +35,8 @@ "/install/vmlinuz ", "initrd=/install/initrd.gz ", "auto=true ", + "passwd/root-password={{ user `ssh_password` }} ", + "passwd/root-password-again={{ user `ssh_password` }} ", "debconf/priority=critical ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_path` }} ", "" @@ -73,6 +76,8 @@ "/install/vmlinuz ", "initrd=/install/initrd.gz ", "auto=true ", + "passwd/root-password={{ user `ssh_password` }} ", + "passwd/root-password-again={{ user `ssh_password` }} ", "debconf/priority=critical ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_path` }} ", "" @@ -112,6 +117,8 @@ "/install/vmlinuz ", "initrd=/install/initrd.gz ", "auto=true ", + "passwd/root-password={{ user `ssh_password` }} ", + "passwd/root-password-again={{ user `ssh_password` }} ", "debconf/priority=critical ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_path` }} ", "" -- cgit v1.2.3-55-g7522