newbie question about conditionals/variables in j2

Desired result:
Servers in [someservers] get a template that parses out to:
foo=barn
foo=house

But I can't figure out the right syntax based on jinja or ansible
docs/examples....
Can anyone help a newbie out?

You should store your variables in group_vars files as shown in
https://github.com/ansible/ansible/blob/devel/docsite/rst/bestpractices.rst
as that will let you store lists instead of just strings.

The INI file variables don't allow complex variables but group_vars does.