Hi,
Machines that are powered off but match the tags in the EC2 module are not recognised by exact_count.
Consider:
The current implementation of exact_count assumes having a stopped machine should behave as if it does not exist, and will therefore provision another.
I would prefer to see machine state be considered as part of the exact_count match. Use of the state tag as part of the exact_count criteria seems to be a good option. Current Ansible does not allow this — a parameters are mutually exclusive: ['exact_count', 'state']) exception is thrown.
Is there something I am missing, or perhaps another way to ensure that the machine is not reprovisioned when stopped.
Happy to attempt to modify the module and submit a PR, but wanted your thoughts first.
Thanks so much,
Steve