Skip to content

Instantly share code, notes, and snippets.

@Wenzel
Created July 3, 2018 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wenzel/302ffb9074170459d04dd0dbe9cf2a81 to your computer and use it in GitHub Desktop.
Save Wenzel/302ffb9074170459d04dd0dbe9cf2a81 to your computer and use it in GitHub Desktop.
Packer WinRM connection_plugin for Ansible - Ansible v2.2.0 - ./packer build windows10.json
qemu output will be in this color.
==> qemu: Downloading or copying ISO
qemu: Found already downloaded, initial checksum matched, no download needed: http://care.dlservice.microsoft.com/dl/download/C/3/9/C399EEA8-135D-4207-92C9-6AAB3259F6EF/10240.16384.150709-1700.TH1_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.ISO
==> qemu: Creating floppy disk...
qemu: Copying files flatly from floppy_files
qemu: Copying file: ./answer_files/10/Autounattend.xml
qemu: Copying file: scripts/fixnetwork.ps1
qemu: Copying file: scripts/setup_winrm_public.bat
qemu: Done copying files from floppy_files
qemu: Collecting paths from floppy_dirs
qemu: Resulting paths from floppy_dirs : []
qemu: Done copying paths from floppy_dirs
==> qemu: Creating hard drive...
==> qemu: Found port for communicator (SSH, WinRM, etc): 2919.
==> qemu: Looking for available port between 5900 and 6000 on 127.0.0.1
==> qemu: Starting VM, booting from CD-ROM
qemu: The VM will be run headless, without a GUI. If you want to
qemu: view the screen of the VM, connect via VNC without a password to
qemu: vnc://127.0.0.1:5924
==> qemu: Overriding defaults Qemu arguments with QemuArgs...
==> qemu: Waiting 10s for boot...
==> qemu: Connecting to VM via VNC
==> qemu: Typing the boot command over VNC...
==> qemu: Waiting for WinRM to become available...
qemu: WinRM connected.
qemu: #< CLIXML
qemu: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><Obj S="progress" RefId="1"><TNRef RefId="0" /><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>
==> qemu: Connected to WinRM!
==> qemu: Provisioning with Ansible...
==> qemu: Executing Ansible: ansible-playbook --extra-vars packer_build_name=qemu packer_builder_type=qemu -i /tmp/packer-provisioner-ansible509125917 /home/tarrma/tmp/bug_packer/ansible/site.yml -e ansible_ssh_private_key_file=/tmp/ansible-key942610230 --connection=packer --extra-vars ansible_shell_type=powershell ansible_shell_executable=None -v
qemu: No config file found; using defaults
qemu:
qemu: PLAY [all] *********************************************************************
qemu:
qemu: TASK [setup] *******************************************************************
qemu: ok: [default] => {"ansible_facts": {"ansible_architecture": "64-bit", "ansible_bios_date": "03/31/2014", "ansible_bios_version": "rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org", "ansible_date_time": {"date": "2018-07-03", "day": "03", "epoch": "1530592614.46929", "hour": "04", "iso8601": "2018-07-03T11:36:54Z", "iso8601_basic": "20180703T043654454151", "iso8601_basic_short": "20180703T043654", "iso8601_micro": "2018-07-03T11:36:54.454151Z", "minute": "36", "month": "07", "second": "54", "time": "04:36:54", "tz": "Pacific Standard Time", "tz_offset": "-07:00", "weekday": "Tuesday", "weekday_number": "2", "weeknumber": "26", "year": "2018"}, "ansible_distribution": "Microsoft Windows 10 Enterprise Evaluation", "ansible_distribution_major_version": "10", "ansible_distribution_version": "10.0.10240.0", "ansible_domain": "", "ansible_env": {"ALLUSERSPROFILE": "C:\\ProgramData", "APPDATA": "C:\\Users\\vagrant\\AppData\\Roaming", "COMPUTERNAME": "VAGRANT-10", "ComSpec": "C:\\Windows\\system32\\cmd.exe", "CommonProgramFiles": "C:\\Program Files\\Common Files", "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files", "CommonProgramW6432": "C:\\Program Files\\Common Files", "HOMEDRIVE": "C:", "HOMEPATH": "\\Users\\vagrant", "LOCALAPPDATA": "C:\\Users\\vagrant\\AppData\\Local", "LOGONSERVER": "\\\\VAGRANT-10", "MODULE_COMPLEX_ARGS": "{\"_ansible_version\": \"2.2.0.0\", \"_ansible_selinux_special_fs\": [\"fuse\", \"nfs\", \"vboxsf\", \"ramfs\"], \"_ansible_no_log\": false, \"gather_timeout\": 10, \"_ansible_module_name\": \"setup\", \"_ansible_verbosity\": 1, \"_ansible_syslog_facility\": \"LOG_USER\", \"gather_subset\": \"all\", \"_ansible_diff\": false, \"_ansible_debug\": false, \"_ansible_check_mode\": false}", "NUMBER_OF_PROCESSORS": "2", "OS": "Windows_NT", "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL", "PROCESSOR_ARCHITECTURE": "AMD64", "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 6 Stepping 3, GenuineIntel", "PROCESSOR_LEVEL": "6", "PROCESSOR_REVISION": "0603", "PROMPT": "$P$G", "PSExecutionPolicyPreference": "Unrestricted", "PSModulePath": "C:\\Users\\vagrant\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "PUBLIC": "C:\\Users\\Public", "Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0", "ProgramData": "C:\\ProgramData", "ProgramFiles": "C:\\Program Files", "ProgramFiles(x86)": "C:\\Program Files (x86)", "ProgramW6432": "C:\\Program Files", "SystemDrive": "C:", "SystemRoot": "C:\\Windows", "TEMP": "C:\\Users\\vagrant\\AppData\\Local\\Temp", "TMP": "C:\\Users\\vagrant\\AppData\\Local\\Temp", "USERDOMAIN": "VAGRANT-10", "USERDOMAIN_ROAMINGPROFILE": "VAGRANT-10", "USERNAME": "vagrant", "USERPROFILE": "C:\\Users\\vagrant", "windir": "C:\\Windows"}, "ansible_fqdn": "vagrant-10.", "ansible_hostname": "VAGRANT-10", "ansible_interfaces": [{"default_gateway": "10.0.2.2", "dns_domain": null, "interface_index": 2, "interface_name": "Intel(R) PRO/1000 MT Network Connection"}], "ansible_ip_addresses": ["10.0.2.15", "fe80::e5c9:e23:e56c:7021", "fec0::e5c9:e23:e56c:7021"], "ansible_kernel": "10.0.10240.0", "ansible_lastboot": "2018-07-03 04:34:56Z", "ansible_machine_id": "S-1-5-21-2287932447-1424723391-2356099274", "ansible_memtotal_mb": 4095, "ansible_nodename": "vagrant-10.", "ansible_os_family": "Windows", "ansible_os_name": "Microsoft Windows 10 Enterprise Evaluation", "ansible_owner_contact": "", "ansible_owner_name": "", "ansible_powershell_version": 5, "ansible_processor": [], "ansible_processor_cores": 1, "ansible_processor_count": 2, "ansible_processor_threads_per_core": 0.5, "ansible_processor_vcpus": 0.5, "ansible_product_name": "Standard PC (i440FX + PIIX, 1996)", "ansible_product_serial": null, "ansible_reboot_pending": false, "ansible_swaptotal_mb": 0, "ansible_system": "Win32NT", "ansible_system_description": "", "ansible_system_vendor": "QEMU", "ansible_uptime_seconds": 118, "ansible_user_dir": "C:\\Users\\vagrant", "ansible_user_gecos": "", "ansible_user_id": "vagrant", "ansible_user_sid": "S-1-5-21-2287932447-1424723391-2356099274-1000", "ansible_windows_domain": "WORKGROUP", "module_setup": true}, "changed": false}
qemu:
qemu: TASK [ping] ********************************************************************
qemu: ok: [default] => {"changed": false, "ping": "pong"}
qemu:
qemu: PLAY RECAP *********************************************************************
qemu: default : ok=2 changed=0 unreachable=0 failed=0
qemu:
==> qemu: Gracefully halting virtual machine...
Build 'qemu' finished.
==> Builds finished. The artifacts of successful builds are:
--> qemu: VM files in directory: output-qemu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment