regex search capability within Jinja template #1785
Unanswered
rajeshbadveti
asked this question in
Q&A
Replies: 1 comment 2 replies
-
We managed to get around it with jinja2 custom filters but would like to hear if there are any other solutions ? Thanks, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Team,
I am looking for help to perform regex operation within jinja template.
For example, below are the commands that will be included in template:
sms all status:
sms server rate:
sms server status:
Jinja template:
When the node_commands are executed, we store the output of each into the variable as node_command_output(X)
The output of the command sms server status will be stored in variable node_command_output2
We want to apply regex to get the value Enabled flag
Expected output, when we print the node_regex_commands:
Please let us know if this can this be achieved ?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions