{"id":17614709,"url":"https://github.com/joefitzgerald/inductor","last_synced_at":"2026-02-20T23:40:04.925Z","repository":{"id":12880536,"uuid":"15557039","full_name":"joefitzgerald/inductor","owner":"joefitzgerald","description":"Inductor Generates Packer (http://packer.io) Templates Using Inductor Templates","archived":false,"fork":false,"pushed_at":"2016-03-07T19:22:36.000Z","size":94,"stargazers_count":43,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T18:06:11.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joefitzgerald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-31T21:28:27.000Z","updated_at":"2024-05-03T11:27:10.000Z","dependencies_parsed_at":"2022-08-26T07:00:12.882Z","dependency_job_id":null,"html_url":"https://github.com/joefitzgerald/inductor","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/joefitzgerald/inductor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefitzgerald%2Finductor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefitzgerald%2Finductor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefitzgerald%2Finductor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefitzgerald%2Finductor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joefitzgerald","download_url":"https://codeload.github.com/joefitzgerald/inductor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefitzgerald%2Finductor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29667882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T23:24:07.480Z","status":"ssl_error","status_checked_at":"2026-02-20T23:24:06.202Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-22T18:44:28.005Z","updated_at":"2026-02-20T23:40:04.908Z","avatar_url":"https://github.com/joefitzgerald.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/joefitzgerald/inductor.svg?branch=master)](https://travis-ci.org/joefitzgerald/inductor)\n\n# Inductor\n\nInductor is a command line tool used in conjunction with packer-windows to\ncreate Windows Vagrant boxes.\n\n## Introduction\n\nInductor uses Go [text/template](http://golang.org/pkg/text/template/) templates\nto generate the files necessary to create Windows Vagrant boxes. Inductor is\nmeant to be used alongside the scripts and templates which comes with\n[packer-windows](https://github.com/joefitzgerald/packer-windows).\n\n## Basic Usage\n\nInstall inductor:\n\n`go get github.com/joefitzgerald/inductor`\n\nInductor only supports one action by default, which is to generate the files\nnecessary to build out a Windows Vagrant box via Packer:\n\n- packer.json\n- Autounattend.xml\n- Vagrantfile\n\nThe OSs available are driven by the osregistry.json in the packer-windows\nrepository. You see which OSs are configured by running inductor with no\narguments:\n\n```\n$ inductor\n\nAvailable OSs:\n\n  windows2012\n  windows81\n  windows2012r2core\n  windows10\n  windows2008r2\n  windows2012r2hyperv\n  windows2012r2\n  windows2008r2core\n  windows7\n\nYou must specify an operating system argument\n```\n\nTo execute inductor in preparation for a Packer build just pass in the OS you'd\nlike to use, for example:\n\n```\ninductor windows10\n```\n\nThis will generate an Autounattend.xml, packer.json, and Vagrantfile in the\ncurrent directory. To chain the inductor output into Packer do this:\n\n```\npacker build $(inductor windows10)\n```\n\nThis will execute inductor creating all the required artifacts for Packer and\nthen execute Packer using the generated templates.\n\n## Inductor Options\n\nInductor uses a lot of sane defaults to make the happy path very easy,\nhowever when you want to iterate on a box and/or need to build a production box\nyou'll need some flexibility. Inductor supports the following command line\noptions:\n\n- `--osregistry \u003cfile.json\u003e` This specifies the file path to a json file which\ncontains all the metadata for various Windows OSs. See OS Registry below.\n- `--autounattend \u003cautounattend.xml\u003e` The file path where inductor will write\nout the generated Autounattend.xml.\n- `--packer \u003cpacker.json\u003e` The file path where inductor will write out the\ngenerated packer.json.\n- `--vagrantfile \u003cVagantfile\u003e` The file path where inductor will write out the\ngenerated vagrantfile.\n- `--productkey \u003ckey\u003e` The Windows product key to be inserted into the\nAutounattend.xml\n- `--skipwindowsupdates` When specified the Windows Update step will be skipped.\n- `--gui` When specified Packer will run the VM in GUI mode (headless=false).\n- `--ssh` When specified Packer will use the SSH communicator with OpenSSH\ninstead of WinRM. WinRM will still be configured on the box for Vagrant.\n\n## Templates\n\nAll input templates are standard Golang text/templates. By default inductor will\nattempt to use the following template files in the current working directory:\n\n- Autounattend.tpl\n- packer.tpl\n- Vagrantfile.tpl\n\nInductor supports templates spread across multiple files as well as OS specific\ntemplates. There is a one/many to one relationship from an input template to an\noutput inductor generated file. Inductor also allows you to specialize or\noverride generic input templates by OS. This works for all 3 input templates.\n\n### Template Loading Convention\n\n(Autounattend|packer|Vagrantfile).tpl\nExample: Autounattend.tpl\n\n(Autounattend|packer|Vagrantfile)-OS.tpl\nExample: Autounattend-windows10.tpl\n\n(Autounattend|packer|Vagrantfile).subsection.tpl\nExample: Autounattend.oobe.tpl\n\n(Autounattend|packer|Vagrantfile)-OS.subsection.tpl\nExample: Autounattend-windows10.oobe.tpl\n\nAnything with an operating system in the template name that matches the\ncurrent system you're building will take precedence over the same named template\nwithout an OS in the file name. Any template with an OS in the name that\ndoesn't match the current system you're building is ignored.\n\nGiven the following files in the current directory, the bold files will be\nautomatically loaded and merged together to be rendered to produce the final\nAutounattend.xml file for Windows2012r2:\n\n- Autounattend.tpl\n- packer.tpl\n- __Autounattend-windows2012r2.tpl__\n- Autounattend-windows2008.tpl\n- __Autounattend-windows2012r2.windowsPE.tpl__\n- Autounattend-windows2008.windowsPE.tpl\n- Autounattend.windowsPE.tpl\n- __Autounattend.offlineServicing.tpl__\n\n### Template Variables\n- OSName\n-\tProductKey\n- WindowsImageName\n-\tVirtualboxGuestOsType\n-\tVmwareGuestOsType\n-\tIsoURL\n-\tIsoChecksumType\n-\tIsoChecksum\n-\tCommunicator\n-\tUsername\n-\tPassword\n-\tDiskSize\n-\tRAM\n-\tCPU\n-\tHeadless\n-\tWindowsUpdates\n\n### Template Functions\n- Contains\n- Replace\n- ToUpper\n- ToLower\n- SafeComputerName\n\n## OS Registry\n\nThe OS registry contains predefined attributes for each OS that inductor can\ngenerate Packer templates for. Packer-windows has its own registry which by\ndefault contains various Windows OS trial editions. This is perfect if you\nquickly need a Vagrant box for testing Windows.\n\nYou may find that you want to build your own box using your own ISO or OS flavor\nnot supported by packer-windows. This is where creating your own custom OS\nregistry file comes into play. The JSON file format is pretty self explanatory\nso here it is:\n\n```json\n{\n  \"windows10\": {\n    \"iso_url\": \"./iso/CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.ISO\",\n    \"iso_checksum_type\": \"sha1\",\n    \"iso_checksum\": \"56ab095075be28a90bc0b510835280975c6bb2ce\",\n    \"windows_image_name\": \"Windows 10 Enterprise\",\n    \"virtualbox_guest_os_type\": \"Windows81_64\",\n    \"vmware_guest_os_type\": \"windows8srv-64\",\n    \"product_key\": \"FEED-ME2D\"\n  }\n}\n```\n\nExcept for product_key all other fields are required.\n\nBy default inductor looks in the current working directory for a file named\nosregistry.json. If you name it something else or is in another directory\nyou can specify the location using the --osregistry flag.\n\n## Contributing\n\nPull requests welcomed. Please ensure you create your edits in a branch off of\nthe `master` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoefitzgerald%2Finductor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoefitzgerald%2Finductor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoefitzgerald%2Finductor/lists"}