I’m rendering configuration files from Jinja templates in one of my playbooks and would like to access the resulting files in a different playbook run later.
Is this achievable?
I’ve looked for design suggestions on how to implement rendering files and using them in multi-stage playbook scenarios with AWX but haven’t found any.
Rendering with the template lookup might be a solution, or you might be able to fetch the files you templated out to a node and re-use them, though this seems “expensive”.
I haven’t tried it on AWX yet but I’ve done something similar with ansible-navigator: it may be possible to use a volume mount on kubernetes in the same way it is on docker.
Then you can save your templated files there so they persist on the pod’s storage volume after the AWX job’s container deletion. This way yo could retrieve them later from another AWX Job, etc etc
It’s nice to see we could help you with our suggestions!
May I ask you to tick the solved check on any of the answers provided? Since you implemented both successfully, I believe it doesn’t matter which one. Anyway, since @jpmens’s one came first, it’s only fair if you check his post as the “official” solution This way, this thread will appear as solved on the forum’s Get Help category.