On Tuesday, May 6, 2014 12:45:41 PM UTC-4, Adam Morris wrote:
>
>
> It's not saying that the directory doesn't exist, it's saying that it is
> not writable, do you have write permission to /srv/sp/web/core on the
> delegate_to machine? ls -ld /srv/sp/web/core should show what I'm
> interested in...
>
>>
>>
The directory exists and is writable (it's owned by ubuntu) on the
delegate_to machine. It does not exist on localhost.
As an additional test, I added the directory on localhost and made it
writable, at which point the task no longer failed indicating that it is
running on localhost and not on the delegate_to IP:
(sp_devops)GoatRodeo:devops anderson$ sudo chmod aoug+w /srv/sp/web/core
Password:
(sp_devops)GoatRodeo:devops anderson$ ls -Faxl /srv/sp/web/core
total 0
drwxrwxrwx 2 root wheel 68 May 6 14:14 ./
drwxr-xr-x 3 root wheel 102 May 6 14:14 ../
TASK: [debug msg="retrieved_instance.public_ip is
{{retrieved_instance.public_ip}}"] ***
ok: [127.0.0.1] => {
"msg": "retrieved_instance.public_ip is 54.215.196.1"
}
TASK: [Copy override file for database information]
***************************
<54.215.196.1> EXEC ['/bin/sh', '-c', 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463 && echo
$HOME/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463']
<54.215.196.1> EXEC ['/bin/sh', '-c', u'rc=0; [ -r
"/srv/sp/web/core/AWS_OVERRIDE.json" ] || rc=2; [ -f
"/srv/sp/web/core/AWS_OVERRIDE.json" ] || rc=1; [ -d
"/srv/sp/web/core/AWS_OVERRIDE.json" ] && echo 3 && exit 0;
(/usr/bin/md5sum /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) ||
(/sbin/md5sum -q /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) ||
(/usr/bin/digest -a md5 /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) ||
(/sbin/md5 -q /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) ||
(/usr/bin/md5 -n /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) ||
(/bin/md5 -q /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) ||
(/usr/bin/csum -h MD5 /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) ||
(/bin/csum -h MD5 /srv/sp/web/core/AWS_OVERRIDE.json 2>/dev/null) || (echo
"${rc} /srv/sp/web/core/AWS_OVERRIDE.json")']
<54.215.196.1> PUT
/var/folders/m4/mk3x6q_50dj_50jpx0763lm80000gn/T/tmp68MzNT TO
/Users/anderson/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463/source
<54.215.196.1> PUT
/var/folders/m4/mk3x6q_50dj_50jpx0763lm80000gn/T/tmpZah9PU TO
/Users/anderson/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463/copy
<54.215.196.1> EXEC ['/bin/sh', '-c', '/usr/bin/python
/Users/anderson/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463/copy;
rm -rf
/Users/anderson/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463/
>/dev/null 2>&1']
changed: [127.0.0.1] => {"changed": true, "dest":
"/srv/sp/web/core/AWS_OVERRIDE.json", "gid": 20, "group": "staff",
"md5sum": "f1f374872c6ddab3a2b38c1176df2a0a", "mode": "0644", "owner":
"anderson", "size": 312, "src":
"/Users/anderson/.ansible/tmp/ansible-tmp-1399400706.01-38026459986463/source",
"state": "file", "uid": 501}
The task is clearly running on 127.0.0.1 and not 54.215.196.1. The "is not
writable" error apparently is returned for both non-existent and
non-writable directories.
Regards,
-scott
--
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/5a68c66b-c84a-462f-a1c1-c999a373f38b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.