Hey,
It feels like that all-important beginner’s Ansible example github.com/ansible/ansible-examples/tree/master/lamp_haproxy can only be used, as written, with static inventory.
For example, I modified the example’s site.yml to use the ec2.py tag_ option for all named hosts, but the example already chokes on a Jinja template where the following expression is used: {% if (inventory_hostname in groups[‘webservers’]) or (inventory_hostname in groups[‘monitoring’]) %}. My suspicion is that this will only be a first conflict that users of dynamic inventory will face when attempting to execute the example.
So, is there some simple modification or approach to executing lamp_haproxy with dynamic inventory?
Thanks, G