I have the following task:
- name: create tmp dir to copy db sql to
  file: path=/tmp/sql state=directory

When I run it, I get the error:
TASK [mysql-data : create tmp dir to copy db sql to] 
***************************
fatal: [default]: FAILED! => {"changed": false, "failed": true, "gid": 0, 
"group": "root", "mode": "0644", "msg": "/tmp/sql already exists as a file", 
"owner": "root", "path": "/tmp/sql", "size": 794097, "state": "file", "uid": 
0}

The file /tmp/sql does exist, so the error is correct in that /tmp/sql 
already exists as a file, but in the task I'm specifying that the directory 
/tmp/sql should exist, not a file (and if it did exist it shouldn't be 
throwing an error anyway).

This is with ansible 2.3.1.0 and python version = 2.7.6 on an Ubuntu 
14.04.5 VM. (On a windows host, but /tmp isn't mapped to the host file 
system).

Anyone know what the problem is?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1af8a93d-cecf-4a99-940b-794af112c894%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to