How to use eval() method in ansible?

Hello Team,

I would like to use eval() method which we use in python to be used in Ansible or in jinja templating. So far, I didn’t get any module for it in Ansible. There is no filter called eval which can be used in jinja templating. Is there any way to achieve it?

Regards,
Sindhuja D

Basically, the script module is there to run arbitrary code, or if you
need to use inline in a play, you can use pipe lookup : lookup('pipe',
'python -c '<eval stuff here....')