![Creative The name of the picture]()
ansible combination of “template” and “synchronize”?
We have a large number of jinja
templates and have been using Ansible's template_module to render them and deploy them locally, or on a remote nfs (mounted locally).
jinja
We now need to deply them on a remote machine's local disc, and the only thing comes to mind is Ansible synchronize_module. However, I cannot see a direct way to ask the synchronize
module to render jina templates before rsyncing them remotely.
synchronize
What is the best way to do this under Ansible?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I am not shure, if I understood your question correctly. As far as I understood it, you want to place a rendered template file on a remote machine. But this is exactly what the template module can be used for: - template: src: /mytemplates/foo.j2 dest: /etc/file.conf will place the file on /etc/file.conf on the remote machine.
– Stefan Wegener
5 hours ago