On 10.07.2019 22:35, Bishwajit Samanta wrote:
> 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
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5228e423-dff8-d041-349a-1fe26d06db8f%40olstad.com.
For more options, visit https://groups.google.com/d/optout.