Ansible template – Destination directory does not exist error

Question:

I am new to ansible and I am using a template statement in my playbook to copy a file from my local machine to a remote machine. I get an error saying the destination directory does not exist, but it is there very much.

I am using Centos 6.5 version (both my local and remote). Any help is appreciated.

Answer:

Create the destination directory with Ansible –

Ref: http://docs.ansible.com/file_module.html

Leave a Reply