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