Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ansible template - Destination directory does not exist error

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.

like image 451
Anirudh Kashyap Avatar asked Jul 11 '15 00:07

Anirudh Kashyap


1 Answers

Create the destination directory with Ansible -

- name: Create target directory
  file: path=/etc/some_directory state=directory mode=0755

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

like image 132
user2182349 Avatar answered Oct 17 '22 18:10

user2182349