Hi Mark,
I'm using ubuntu 12.04 LTS and I can ssh as "root" in localhost and enabled PermitRootLogin in ssh_config file
olga@ubuntu:~/ansible/try/02$ ansible localhost -u root -k -m file -a 'path=/tmp/test11 state=directory mode=0700 owner=root' -vvv
SSH password:
<localhost> REMOTE_MODULE file path=/tmp/test11 state=directory mode=0700 owner=root
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412246841.03-7250721660070 && echo $HOME/.ansible/tmp/ansible-tmp-1412246841.03-7250721660070']
<localhost> PUT /tmp/tmptdYxcv TO /home/olga/.ansible/tmp/ansible-tmp-1412246841.03-7250721660070/file
<localhost> EXEC ['/bin/sh', '-c', u'LANG=C LC_CTYPE=C /usr/bin/python /home/olga/.ansible/tmp/ansible-tmp-1412246841.03-7250721660070/file; rm -rf /home/olga/.ansible/tmp/ansible-tmp-1412246841.03-7250721660070/ >/dev/null 2>&1']
root@ubuntu:/tmp# ls -ld /tmp
drwxrwxrwt 12 root root 4096 Oct 2 16:23 /tmp
root@ubuntu:/tmp#
I tried with a wrong "ssh" password for root ( -k option ) , it created the dir in /tmp and the error was same. I was not expecting this and the command should not have created the dir.
Regards,
Olga