How to loop over variables so task "template" can generate 1 file per variable

Hello friends.

Given a list of variables like this:

use 2nd option (with_items: nginx_vhosts) and use this template:

server_name {{ item.domain }} www.{{ item.domain }};
root /home/{{ item.usname }}/public_html/;

Thank you Brian! It worked!