Can we Run Command in Jinja2 Template

Hi Team,

I was curious can we run command in jinja2 template say example

{{pwd}} === here pwd is a shell command.

Template only run on localhost aka Ansible controller.
So if the command you wanna run is against localhost you can use lookup plugin with pipe
https://docs.ansible.com/ansible/latest/plugins/lookup/pipe.html