This repo contains very simple demos that illustrates the bare-basics needed to load a YAML data file and render it with a Jinja2 template. The "subject matter" was taken from a blog post by Ethan Banks, here.
Be sure to read more from Ethan on his blog site, The Peering Introvert and on Packet Pushers.
user@linux> python demo_render.py
output looks like this.
[jeremy@linux]$ ansible-playbook ansible.pb.yml
PLAY [simple template render] *************************************************
TASK: [build demo_render.conf] ************************************************
changed: [localhost]
PLAY RECAP ********************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
creates file demo_render.conf.