I want to write a simple python 2.7 jinja2 writer that writes out text config files for WL AccessPoints
I have the following structure in my directory ~/Documents/PyCharmProjects:
config-data.csv
mk-wl-ap-configs.py
shadow.jinja
network.jinja
wireless,jinja
and I ultimatley I want it to write the jinja2 rendered output to subdirs named after the AccessPoints
ap1:
shadow
network
wireless
ap2:
shadow
network
wireless
How do I write my python jinja processor so I have my csv data in the right python dictionary (config-data read from my csv file), so I can iterate over the config -data dictionary and write out the jinja rendered resulting files to subdirs?
When I run my
mk-wl-ap-configs.py
code it tells me that AP_Name is not defined as it tries rendering the very first value in the first file.jinja2.exceptions.UndefinedError: 'AP_Name' is undefined
full trace back