# Multiple EC2 Windows hosts

**URL:** <https://forum.ansible.com/t/multiple-ec2-windows-hosts/18566>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 22, 2015, 6:53pm UTC](https://forum.ansible.com/t/multiple-ec2-windows-hosts/18566 "2015-06-22T18:53:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean\_Mills](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@Dean\_Mills](https://forum.ansible.com/u/Dean_Mills)\
**Post date:** [June 22, 2015, 6:53pm UTC](https://forum.ansible.com/t/multiple-ec2-windows-hosts/18566/1 "2015-06-22T18:53:34Z")

</div>

HI all,

Am trying to admin/setup multiple EC2 Windows hosts and have hit a bit of a snag. I have playbooks that create the initial instances just fine, along with one that creates a list of the Instance IDs of the Windows hosts I need using the ec2 module, and one that gets the default Administrator passwords using the ec2\_win\_password module. My quandry is, I have any number of different Windows machines that I need to admin inside another specific task, and I need to iterate over the list of Windows hosts and their correlating passwords, and then run the task on them. So my question is, how do I combine the two lists into one indexed one that pairs the right instance ID with the correct password? Or is there a simpler/better way of doing what I am trying to do? Switching to all Linux hosts would be great but not a viable option at this point. 🙂 Any and all help greatly appreciated!

D
