Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
wget -O ~/template_dry_run.py https://raw.githubusercontent.com/SUNET/cnaas-nms/develop/src/cnaas_nms/tools/template_dry_run.py
wget -O ~/jinja_helpers.py https://raw.githubusercontent.com/SUNET/cnaas-nms/develop/src/cnaas_nms/tools/jinja_helpers.py
export CNAASURL=https://localhost
export JWT_AUTH_TOKEN=mytoken
export TEMPLATE_SECRET_ADMIN_HASH=dummyvalue
cd git/cnaas-templates/
~/template_dry_run.py <hostname>

...

You can use include blocks (or extend blocks) in Jinja to divide your templates up into multiple parts for easier maintenance. Remember to always end your templates with a newline since you might run in to issues where two parts might end up on the same line when you do includes otherwise.


Device / OS specific templates

...