- hosts: zookeepers
tasks:
- shell: do something with {{ item }}
with_items: groups.webservers
This is a way to run something on each zookeeper with the name of each webserver, you could also invert this pattern to do something on each webserver with a reference to each zookeeper.
Though ultimately I'll still say I don't completely understand the question, but if you have a per-environment list of hosts, like stage vs production, keeping different variables and lists of hosts for them, and different inventories, is always a good practice.
If you are using Jinja2 too much, it usually means you are over-using Jinja2, and should instead use the primatives that Ansible provides.
If conditionals in Ansible playbooks that use Jinja2 are not something in intended usage, simple variable substitution is what they are there for.
Templates can obviously get more complicated, but it's usually users coming from Chef that try to program in YAML and have a bad experience.
Ansible wishes to describe processes, but it's not programming.
Apologies if I'm talking past you here, but Ansible does have a certain aesthethic and it feels you are trying to hammer something in sideways a little bit.