What is the difference between Ansible template module and Ansible copy module?
While very similar, template serves an extra function.
You could use template to copy a file without template formatting from host to the remote destination.
An example of copy over template is when you need to import a custom config file based on parameters from the host (or elsewhere), such as a web config file that takes host/credential properties from a database instance. Note the same could be achieved by using copy/lineinfile--this is just a different way of doing so.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With