{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/2957","repository_url":"https://api.github.com/repos/mitchellh/packer","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/2957/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/2957/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/2957/events","html_url":"https://github.com/mitchellh/packer/issues/2957","id":117888624,"number":2957,"title":"Ansible + Windows","user":{"login":"josh-padnick","id":4295964,"avatar_url":"https://avatars.githubusercontent.com/u/4295964?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-padnick","html_url":"https://github.com/josh-padnick","followers_url":"https://api.github.com/users/josh-padnick/followers","following_url":"https://api.github.com/users/josh-padnick/following{/other_user}","gists_url":"https://api.github.com/users/josh-padnick/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-padnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-padnick/subscriptions","organizations_url":"https://api.github.com/users/josh-padnick/orgs","repos_url":"https://api.github.com/users/josh-padnick/repos","events_url":"https://api.github.com/users/josh-padnick/events{/privacy}","received_events_url":"https://api.github.com/users/josh-padnick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/provisioner/ansible","name":"provisioner/ansible","color":"c7def8"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/windows-guest","name":"windows-guest","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-19T19:27:08Z","updated_at":"2016-03-04T18:16:22Z","closed_at":null,"body":"Am I correct in understanding that it is not possible to use the `ansible-local` provisioner with Windows?  My understanding is that `ansible-local` is attempting to run ansible on the remote machine, which, [according to the Ansible Docs](http://docs.ansible.com/ansible/intro_windows.html#reminder-you-must-have-a-linux-control-machine) is not permitted.\r\n\r\nOne idea I have for using Packer + Ansible + Windows is:\r\n- Use Packer to launch a linux EC2 instance\r\n  - Run Remote Shell provisioners (`shell`) whose job is to install ansible.\r\n  - Run `file` provisioners to copy all necessary ansible playbooks, the inventory file, etc.\r\n  - Run a `shell` provisioner that then installs Packer itself and launches a Windows remote machine.\r\n- On that new Packer build, run `local-shell` provisioners which run the `ansible-playbook` command against the new remote Windows machine\r\n\r\nThis is obviously pretty convoluted and has some issues with it (e.g. the provisioner machine will get an AMI created). Is there a better way to do this beyond writing a custom plugin?"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/192389954","html_url":"https://github.com/mitchellh/packer/issues/2957#issuecomment-192389954","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/2957","id":192389954,"user":{"login":"johnjelinek","id":873610,"avatar_url":"https://avatars.githubusercontent.com/u/873610?v=3","gravatar_id":"","url":"https://api.github.com/users/johnjelinek","html_url":"https://github.com/johnjelinek","followers_url":"https://api.github.com/users/johnjelinek/followers","following_url":"https://api.github.com/users/johnjelinek/following{/other_user}","gists_url":"https://api.github.com/users/johnjelinek/gists{/gist_id}","starred_url":"https://api.github.com/users/johnjelinek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnjelinek/subscriptions","organizations_url":"https://api.github.com/users/johnjelinek/orgs","repos_url":"https://api.github.com/users/johnjelinek/repos","events_url":"https://api.github.com/users/johnjelinek/events{/privacy}","received_events_url":"https://api.github.com/users/johnjelinek/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T18:16:22Z","updated_at":"2016-03-04T18:16:22Z","body":"@josh-padnick: As of Ansible 2.0, Windows is considered a first-class target, just like linux. The controller still needs to be a linux server. Also, the new `ansible` remote provisioner might soon provide support w/ packer. I don't see that it supports winrm yet though."}}