EC2 dynamic inventory + windows hosts, any way to do a group_vars for that?

Hi

I was trying to use the EC2 dynamic inventory to manage a number of Windows and Linux instances and I am struggling trying to find a clean way to do something like a group_vars file in order to use winrm if the host is windows and ssh if the host is Linux

Of course, in a static inventory, I would create a [windows] group and a group_vars/windows.yml file and it works perfectly but I cannot find any group in the ec2.py output in order to achieve something similar in a dynamic inventory

In the ec2 instances list there is a variable called ec2_platform which is set to “windows” or an empty string but I think this cannot be used like for instances the EC2 tags, groups like the vpc or the region list.

Does anyone know a way to do something like this? If this is impossible unless we create an EC2 tag… are there any plans to include something like this in the ec2.py script or would something like tags be the way to go?

Thanks in advance

We wanted a way to combine static and dynamic inventories with a single
set of inventory variables, and wrote a script to do it; check out
https://github.com/caredotcom/ansible-quartermaster and see if it's any
help (either as-is, or as an example, or for humor value, or whatever).

                                      -Josh (jbs@care.com)

(apologies for the automatic corporate disclaimer that follows)

This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.