Is there a way to render Ansible template into the fact? I tried to find a solution but it looks like temp file is the the only way.
Rendering Ansible template into the fact variable
ansibleansible-templatejinja2
ansibleansible-templatejinja2
Is there a way to render Ansible template into the fact? I tried to find a solution but it looks like temp file is the the only way.
Best Answer
I think you might be just looking for the
template
lookup plugin:Usage example:
template.j2
playbook.yml
The result: