- 22 May 2023
-
DarkLight
-
PDF
Template Builder Dependencies
- Updated on 22 May 2023
-
DarkLight
-
PDF
Dependency Sets for Template Builder
There are two sets of dependencies for Template Builder. The first set, python
, textfsm
, and jinja2
, are required for Template Builder to function. The second set, chroot
, sudo
, and ldd
are required to allow Template Builder to execute Jinja2 templates in a contained context. Without this second set of dependencies available and the appropriate configuration in place to allow the IAP process to execute them in a subshell, Jinja2 templates will have access to environment variables from the parent process and the file system. It is highly recommended that you configure Template Builder to execute Jinja2 templates in a contained context.
Installing the Base Dependencies
To install base dependencies:
-
Install Python 3.
Note: Starting with Python version 3.4, pip has been included as part of the Python installers.
sudo yum install -y python3
-
Verify the Python version installed.
python3 --version
-
Verify pip3 version installed.
pip3 --version
-
Run the following commands. Once TextFSM and Jinja2 are available, the template parser will be able to function properly.
sudo pip3 install textfsm sudo pip3 install jinja2
-
Verify the versions of Jinja2 and TextFSM installed.
pip3 freeze