Unverified Commit 8f416c79 authored by Stefan Scherer's avatar Stefan Scherer
Browse files

Run packer fix to reformat all templates

parent 20a298f0
#!/bin/bash
for template in $(ls -1 *.json); do
echo $template
packer fix $template >/tmp/$$.json
mv /tmp/$$.json $template
done
{ {
"builders": [ "builders": [
{ {
"type": "hyperv-iso",
"vm_name":"windows_10",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"boot_wait": "6m", "boot_wait": "6m",
"communicator":"winrm", "communicator": "winrm",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"ram_size": "2048",
"cpu": "2", "cpu": "2",
"switch_name": "{{user `switch_name`}}",
"guest_additions_mode": "none",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"disk_size": "{{user `disk_size`}}", "disk_size": "{{user `disk_size`}}",
"floppy_files": [ "floppy_files": [
"{{user `autounattend`}}", "{{user `autounattend`}}",
...@@ -27,28 +15,26 @@ ...@@ -27,28 +15,26 @@
"./scripts/enable-winrm.ps1", "./scripts/enable-winrm.ps1",
"./scripts/microsoft-updates.bat", "./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1" "./scripts/win-updates.ps1"
] ],
"guest_additions_mode": "none",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": "2048",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `switch_name`}}",
"type": "hyperv-iso",
"vm_name": "windows_10",
"winrm_password": "vagrant",
"winrm_timeout": "{{user `winrm_timeout`}}",
"winrm_username": "vagrant"
}, },
{ {
"type": "vmware-iso",
"vm_name":"windows_10",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": "{{user `headless`}}",
"boot_wait": "6m",
"boot_command": "", "boot_command": "",
"winrm_username": "vagrant", "boot_wait": "6m",
"winrm_password": "vagrant", "communicator": "winrm",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows9-64",
"disk_size": "{{user `disk_size`}}", "disk_size": "{{user `disk_size`}}",
"disk_type_id": "{{user `disk_type_id`}}", "disk_type_id": "{{user `disk_type_id`}}",
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"version": 11,
"floppy_files": [ "floppy_files": [
"{{user `autounattend`}}", "{{user `autounattend`}}",
"./floppy/WindowsPowershell.lnk", "./floppy/WindowsPowershell.lnk",
...@@ -60,31 +46,33 @@ ...@@ -60,31 +46,33 @@
"./scripts/microsoft-updates.bat", "./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1" "./scripts/win-updates.ps1"
], ],
"vmx_remove_ethernet_interfaces": true, "guest_os_type": "windows9-64",
"headless": "{{user `headless`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"type": "vmware-iso",
"version": 11,
"vm_name": "windows_10",
"vmx_data": { "vmx_data": {
"RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900", "RemoteDisplay.vnc.port": "5900",
"memsize": "2048", "memsize": "2048",
"numvcpus": "2", "numvcpus": "2",
"scsi0.virtualDev": "lsisas1068" "scsi0.virtualDev": "lsisas1068"
} },
"vmx_remove_ethernet_interfaces": true,
"vnc_port_max": 5980,
"vnc_port_min": 5900,
"winrm_password": "vagrant",
"winrm_timeout": "{{user `winrm_timeout`}}",
"winrm_username": "vagrant"
}, },
{ {
"type": "virtualbox-iso",
"vm_name":"windows_10",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": "{{user `headless`}}",
"boot_wait": "6m",
"boot_command": "", "boot_command": "",
"winrm_username": "vagrant", "boot_wait": "6m",
"winrm_password": "vagrant", "communicator": "winrm",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows10_64",
"guest_additions_mode": "disable",
"disk_size": "{{user `disk_size`}}", "disk_size": "{{user `disk_size`}}",
"floppy_files": [ "floppy_files": [
"{{user `autounattend`}}", "{{user `autounattend`}}",
...@@ -97,6 +85,14 @@ ...@@ -97,6 +85,14 @@
"./scripts/microsoft-updates.bat", "./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1" "./scripts/win-updates.ps1"
], ],
"guest_additions_mode": "disable",
"guest_os_type": "Windows10_64",
"headless": "{{user `headless`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"type": "virtualbox-iso",
"vboxmanage": [ "vboxmanage": [
[ [
"modifyvm", "modifyvm",
...@@ -110,67 +106,72 @@ ...@@ -110,67 +106,72 @@
"--cpus", "--cpus",
"2" "2"
] ]
] ],
"vm_name": "windows_10",
"winrm_password": "vagrant",
"winrm_timeout": "{{user `winrm_timeout`}}",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_10_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_10.template"
} }
], ],
"provisioners": [ "provisioners": [
{ {
"type": "windows-shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"remote_path": "/tmp/script.bat",
"scripts": [ "scripts": [
"./scripts/vm-guest-tools.bat", "./scripts/vm-guest-tools.bat",
"./scripts/enable-rdp.bat" "./scripts/enable-rdp.bat"
] ],
"type": "windows-shell"
}, },
{ {
"type": "powershell",
"scripts": [ "scripts": [
"./scripts/debloat-windows.ps1" "./scripts/debloat-windows.ps1"
] ],
"type": "powershell"
}, },
{ {
"type": "windows-restart", "restart_timeout": "{{user `restart_timeout`}}",
"restart_timeout": "{{user `restart_timeout`}}" "type": "windows-restart"
}, },
{ {
"type": "powershell",
"scripts": [ "scripts": [
"./scripts/set-powerplan.ps1", "./scripts/set-powerplan.ps1",
"./scripts/docker/disable-windows-defender.ps1" "./scripts/docker/disable-windows-defender.ps1"
] ],
"type": "powershell"
}, },
{ {
"type": "windows-shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"remote_path": "/tmp/script.bat",
"scripts": [ "scripts": [
"./scripts/pin-powershell.bat", "./scripts/pin-powershell.bat",
"./scripts/set-winrm-automatic.bat", "./scripts/set-winrm-automatic.bat",
"./scripts/uac-enable.bat", "./scripts/uac-enable.bat",
"./scripts/dis-updates.bat", "./scripts/dis-updates.bat",
"./scripts/compact.bat" "./scripts/compact.bat"
] ],
} "type": "windows-shell"
],
"post-processors": [
{
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_10_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_10.template"
} }
], ],
"variables": { "variables": {
"headless": "false", "autounattend": "./answer_files/10/Autounattend.xml",
"disk_size": "61440", "disk_size": "61440",
"disk_type_id": "1", "disk_type_id": "1",
"vhv_enable": "false", "headless": "false",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/5/D/65D18931-F626-4A35-AD5B-F5DA41FE6B76/16299.15.170928-1534.rs3_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",
"iso_checksum_type": "sha256",
"iso_checksum": "3d39dd9bd37db5b3c80801ae44003802a9c770a7400a1b33027ca474a1a7c691", "iso_checksum": "3d39dd9bd37db5b3c80801ae44003802a9c770a7400a1b33027ca474a1a7c691",
"autounattend": "./answer_files/10/Autounattend.xml", "iso_checksum_type": "sha256",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/5/D/65D18931-F626-4A35-AD5B-F5DA41FE6B76/16299.15.170928-1534.rs3_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",
"restart_timeout": "5m", "restart_timeout": "5m",
"vhv_enable": "false",
"winrm_timeout": "6h" "winrm_timeout": "6h"
} }
} }
{ {
"builders": [ "builders": [
{ {
"type": "vmware-vmx", "boot_command": "",
"vm_name": "windows_10_docker", "boot_wait": "5s",
"communicator": "winrm", "communicator": "winrm",
"source_path": "{{user `source_path`}}",
"headless": false, "headless": false,
"boot_wait": "5s",
"boot_command": "",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "15m",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"vnc_port_min": 5900, "source_path": "{{user `source_path`}}",
"vnc_port_max": 5980, "type": "vmware-vmx",
"vmx_remove_ethernet_interfaces": true, "vm_name": "windows_10_docker",
"vmx_data": { "vmx_data": {
"RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900", "RemoteDisplay.vnc.port": "5900",
"memsize": "2048", "memsize": "2048",
"numvcpus": "2", "numvcpus": "2",
"scsi0.virtualDev": "lsisas1068" "scsi0.virtualDev": "lsisas1068"
} },
"vmx_remove_ethernet_interfaces": true,
"vnc_port_max": 5980,
"vnc_port_min": 5900,
"winrm_password": "vagrant",
"winrm_timeout": "15m",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_10_docker_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_10.template"
} }
], ],
"provisioners": [ "provisioners": [
{ {
"type": "powershell",
"scripts": [ "scripts": [
"./scripts/docker/10/install-containers-feature.ps1" "./scripts/docker/10/install-containers-feature.ps1"
] ],
"type": "powershell"
}, },
{ {
"type": "windows-restart" "type": "windows-restart"
}, },
{ {
"type": "powershell",
"scripts": [ "scripts": [
"./scripts/docker/add-docker-group.ps1", "./scripts/docker/add-docker-group.ps1",
"./scripts/docker/10/install-docker.ps1", "./scripts/docker/10/install-docker.ps1",
...@@ -44,26 +51,20 @@ ...@@ -44,26 +51,20 @@
"./scripts/docker/open-docker-swarm-ports.ps1", "./scripts/docker/open-docker-swarm-ports.ps1",
"./scripts/docker/remove-docker-key-json.ps1", "./scripts/docker/remove-docker-key-json.ps1",
"./scripts/docker/disable-windows-defender.ps1" "./scripts/docker/disable-windows-defender.ps1"
] ],
"type": "powershell"
}, },
{ {
"type": "windows-shell",
"scripts": [ "scripts": [
"./scripts/uac-enable.bat", "./scripts/uac-enable.bat",
"./scripts/set-winrm-automatic.bat", "./scripts/set-winrm-automatic.bat",
"./scripts/compact.bat" "./scripts/compact.bat"
] ],
} "type": "windows-shell"
],
"post-processors": [
{
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_10_docker_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_10.template"
} }
], ],
"variables": { "variables": {
"source_path": "path-to.vmx" "source_path": "path-to.vmx"
} }
} }
{ {
"builders": [ "builders": [
{ {
"type": "vmware-iso",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": false,
"boot_wait": "6m",
"boot_command": "", "boot_command": "",
"winrm_username": "vagrant", "boot_wait": "6m",
"winrm_password": "vagrant", "communicator": "winrm",
"winrm_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows9-64",
"disk_size": "{{user `disk_size`}}", "disk_size": "{{user `disk_size`}}",
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"version": 11,
"floppy_files": [ "floppy_files": [
"{{user `autounattend`}}", "{{user `autounattend`}}",
"./floppy/WindowsPowershell.lnk", "./floppy/WindowsPowershell.lnk",
...@@ -29,30 +16,32 @@ ...@@ -29,30 +16,32 @@
"./scripts/microsoft-updates.bat", "./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1" "./scripts/win-updates.ps1"
], ],
"vmx_remove_ethernet_interfaces": true, "guest_os_type": "windows9-64",
"headless": false,
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"type": "vmware-iso",
"version": 11,
"vmx_data": { "vmx_data": {
"RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900", "RemoteDisplay.vnc.port": "5900",
"memsize": "2048", "memsize": "2048",
"numvcpus": "2", "numvcpus": "2",
"scsi0.virtualDev": "lsisas1068" "scsi0.virtualDev": "lsisas1068"
} },
"vmx_remove_ethernet_interfaces": true,
"vnc_port_max": 5980,
"vnc_port_min": 5900,
"winrm_password": "vagrant",
"winrm_timeout": "2h",
"winrm_username": "vagrant"
}, },
{ {
"type": "virtualbox-iso",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": false,
"boot_wait": "6m",
"boot_command": "", "boot_command": "",
"winrm_username": "vagrant", "boot_wait": "6m",
"winrm_password": "vagrant", "communicator": "winrm",
"winrm_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows10_64",
"guest_additions_mode": "disable",
"disk_size": "{{user `disk_size`}}", "disk_size": "{{user `disk_size`}}",
"floppy_files": [ "floppy_files": [
"{{user `autounattend`}}", "{{user `autounattend`}}",
...@@ -65,6 +54,14 @@ ...@@ -65,6 +54,14 @@
"./scripts/microsoft-updates.bat", "./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1" "./scripts/win-updates.ps1"
], ],
"guest_additions_mode": "disable",
"guest_os_type": "Windows10_64",
"headless": false,
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"type": "virtualbox-iso",
"vboxmanage": [ "vboxmanage": [
[ [
"modifyvm", "modifyvm",
...@@ -78,21 +75,18 @@ ...@@ -78,21 +75,18 @@
"--cpus", "--cpus",
"2" "2"
] ]
] ],
"winrm_password": "vagrant",
"winrm_timeout": "2h",
"winrm_username": "vagrant"
}, },
{ {
"type": "hyperv-iso",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"boot_wait": "0s", "boot_wait": "0s",
"guest_additions_mode":"disable", "communicator": "winrm",
"winrm_username": "vagrant", "cpu": 2,
"winrm_password": "vagrant",
"winrm_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"disk_size": "{{user `disk_size`}}", "disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
"floppy_files": [ "floppy_files": [
"{{user `autounattend`}}", "{{user `autounattend`}}",
"./floppy/WindowsPowershell.lnk", "./floppy/WindowsPowershell.lnk",
...@@ -104,66 +98,73 @@ ...@@ -104,66 +98,73 @@
"./scripts/microsoft-updates.bat", "./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1" "./scripts/win-updates.ps1"
], ],
"guest_additions_mode": "disable",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048, "ram_size": 2048,
"cpu": 2, "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name":"{{user `hyperv_switchname`}}", "switch_name": "{{user `hyperv_switchname`}}",
"enable_secure_boot":true, "type": "hyperv-iso",
"enable_virtualization_extensions":true "winrm_password": "vagrant",
"winrm_timeout": "2h",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_10_insider_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_10.template"
} }
], ],
"provisioners": [ "provisioners": [
{ {
"type": "windows-shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"remote_path": "/tmp/script.bat",
"scripts": [ "scripts": [
"./scripts/vm-guest-tools.bat", "./scripts/vm-guest-tools.bat",
"./scripts/enable-rdp.bat",