Automation Ninja's Dojo

Ansible – Using template lookup

For some of actions / modules / roles it might be that you would like to use your Jinja template as variable. I have been looking some time for this lookup module. Therefore to save you from crawling over internet this is how could you use it

Example of Jinja template

And then within our playbook we define it as following

 

Are you using this in other way ? Comment whats your approach 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: