Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.17 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.17 KB

Template Rendering 101

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.

Python Script Usage

user@linux> python demo_render.py

output looks like this.

Ansible Playbook Usage

[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.

Further Reading