Thanks for any help you can give.  Let me know if you need any more info. 
 I also see it happening in the template module:

{"msg": "Could not replace file: 
/tmp/.ansible/tmp/ansible-tmp-1398978322.77-92955034866020/source to 
/opt/adtools-local-data/jira8/atlassian-jira-6.2.3-standalone/conf/server.xml: 
[Errno 13] Permission denied: 
'/tmp/.ansible/tmp/ansible-tmp-1398978322.77-92955034866020/source'", 
"failed": true}
Exception OSError: (2, 'No such file or directory', 
'/opt/adtools-local-data/jira8/atlassian-jira-6.2.3-standalone/conf/.ansible_tmpf2zuKKserver.xml')
 
in <bound method _TemporaryFileWrapper.__del__ of <closed file '<fdopen>', 
mode 'w+b' at 0x7f5225a3ad20>> ignored

On Thursday, May 1, 2014 8:56:44 AM UTC-5, Paul Durivage wrote:
>
> Hi George,
>
> Since I'm responsible for this feature, its edge cases, and bugs :( I'll 
> see what I can do to replicate your issue.  I may or may not be able to get 
> to it before the weekend but I'll follow up.
>
> I thought I tested for this scenario but I may have missed it.
>
>
> On Tue, Apr 29, 2014 at 8:52 PM, George Simpson 
> <[email protected]<javascript:>
> > wrote:
>
>> Thanks for this feature, I absolutely need it.  I do seem to have an 
>> issue using it.
>>
>> I am using ansible 1.6 (devel eb090ad4a2) on RHEL 6.  When I use su with 
>> the copy module I get a permission denied error. 
>> I use a remote user to login to the server then su to another acccount. 
>>  This is required in my environment.  The remote user has no home directory 
>> so I have  remote_tmp set in my ansible.cfg to /tmp/.ansible/tmp. It 
>> appears that the su user doesn't have permission to .ansible/tmp created by 
>> the remote user.  I saw this 
>> issue<https://github.com/ansible/ansible/issues/2837> that 
>> is similar, but I could not find anything specifically for su.
>> Should I file a bug for this?
>>
>> ansible command line:  ansible-playbook upgrade.yml -i hosts.yml -u 
>> remoteuser -k -S -R a_user --ask-su-pass
>>
>> Output:
>> fatal: hostname] => failed to parse:
>> SUDO-SUCCESS-ulnzuflbdcdwddmombacdjeerhjdfgoy
>> {"msg": "Could not replace file: 
>> /tmp/.ansible/tmp/ansible-tmp-1398820873.22-273887835083885/source to 
>> /opt/local-data/apphome/caches/remove_me.txt: [Errno 13] Permission denied: 
>> '/tmp/.ansible/tmp/ansible-tmp-1398820873.22-273887835083885/source'", 
>> "failed": true}
>> Exception OSError: (2, 'No such file or directory', 
>> '/opt/local-data/apphome/caches/.ansible_tmpzRLO88remove_me.txt') in <bound 
>> method _TemporaryFileWrapper.__del__ of <closed file '<fdopen>', mode 'w+b' 
>> at 0x7fd090bbbdb0>> ignored
>>
>> fatal: [vsin3u544.svr.us.jpmchase.net] => failed to parse:
>> SUDO-SUCCESS-ulnzuflbdcdwddmombacdjeerhjdfgoy
>> {"msg": "Could not replace file: 
>> /tmp/.ansible/tmp/ansible-tmp-1398820873.22-273887835083885/source to 
>> /opt/adtools-local-data/jira8/jira_home/c              aches/remove_me.txt: 
>> [Errno 13] Permission denied: 
>> '/tmp/.ansible/tmp/ansible-tmp-1398820873.22-273887835083885/source'", 
>> "failed": true}
>> Exception OSError: (2, 'No such file or directory', 
>> '/opt/adtools-local-data/jira8/jira_home/caches/.ansible_tmpzRLO88remove_me.txt')
>>  in <bound                       method _TemporaryFileWrapper.__del__ of 
>> <closed file '<fdopen>', mode 'w+b' at 0x7fd090bbbdb0>> ignored
>>
>> fatal: [vsin3u544.svr.us.jpmchase.net] => failed to parse:
>> SUDO-SUCCESS-ulnzuflbdcdwddmombacdjeerhjdfgoy
>> {"msg": "Could not replace file: 
>> /tmp/.ansible/tmp/ansible-tmp-1398820873.22-273887835083885/source to 
>> /opt/adtools-local-data/jira8/jira_home/c              aches/remove_me.txt: 
>> [Errno 13] Permission denied: 
>> '/tmp/.ansible/tmp/ansible-tmp-1398820873.22-273887835083885/source'", 
>> "failed": true}
>> Exception OSError: (2, 'No such file or directory', 
>> '/opt/adtools-local-data/jira8/jira_home/caches/.ansible_tmpzRLO88remove_me.txt')
>>  in <bound                       method _TemporaryFileWrapper.__del__ of 
>> <closed file '<fdopen>', mode 'w+b' at 0x7fd090bbbdb0>> ignored
>>
>>
>>
>> On Tuesday, January 21, 2014 12:03:22 PM UTC-6, James Tanner wrote:
>>>
>>> Thanks to Paul for this one!
>>>
>>> Basic usage is similar to sudo …
>>>
>>> - hosts: el6.lab.net
>>>   gather_facts: False
>>>   su: yes
>>>   su_user: root
>>>   tasks:
>>>     - shell: whoami
>>>
>>> or pass as command line parameters …
>>>
>>> ansible-playbook  --su --su-user=root --ask-su-pass -i inventory site.yml
>>>
>>> Begin forwarded message:
>>>
>>> *From: *Paul Durivage <[email protected]>
>>> *Subject: **[ansible] Add su support (#5694)*
>>> *Date: *January 20, 2014 at 8:28:44 PM EST
>>> *To: *ansible/ansible <[email protected]>
>>> *Reply-To: *ansible/ansible <reply+i-25958790-
>>> 3751e6bbbad5091591e631844309f77bd2841915-1869...@reply.github.com>
>>>
>>> Continuing from PR #5325 <https://github.com/ansible/ansible/pull/5325>. 
>>> This reverts the revert, and is therefore known as revertception. The su 
>>> bug is resolved -- looks like I missed it when resolving the rebase/merge 
>>> conflicts. :( Also, I had missed that there was now an additional paramiko 
>>> lib, "paramiko_alt.py", so I've gone ahead and fixed that as well.
>>> ------------------------------
>>> You can merge this Pull Request by running 
>>>
>>>   git pull https://github.com/angstwad/ansible add-su-support-revert
>>>
>>> Or view, comment on, or merge it at:
>>>
>>>   https://github.com/ansible/ansible/pull/5694
>>> Commit Summary 
>>>    
>>>    - Resolve su bug in paramiko libs 
>>>    - Revert "Revert "Merge pull request #5325 from 
>>>    angstwad/add-su-support"" 
>>>
>>> File Changes 
>>>    
>>>    - *M* 
>>> bin/ansible<https://github.com/ansible/ansible/pull/5694/files#diff-0>(41) 
>>>    - *M* 
>>> bin/ansible-playbook<https://github.com/ansible/ansible/pull/5694/files#diff-1>(18)
>>>  
>>>    - *M* 
>>> lib/ansible/constants.py<https://github.com/ansible/ansible/pull/5694/files#diff-2>(6)
>>>  
>>>    - *M* 
>>> lib/ansible/playbook/__init__.py<https://github.com/ansible/ansible/pull/5694/files#diff-3>(85)
>>>  
>>>    - *M* 
>>> lib/ansible/playbook/play.py<https://github.com/ansible/ansible/pull/5694/files#diff-4>(20)
>>>  
>>>    - *M* 
>>> lib/ansible/playbook/task.py<https://github.com/ansible/ansible/pull/5694/files#diff-5>(20)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/__init__.py<https://github.com/ansible/ansible/pull/5694/files#diff-6>(60)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/accelerate.py<https://github.com/ansible/ansible/pull/5694/files#diff-7>(5)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/chroot.py<https://github.com/ansible/ansible/pull/5694/files#diff-8>(5)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/fireball.py<https://github.com/ansible/ansible/pull/5694/files#diff-9>(6)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/funcd.py<https://github.com/ansible/ansible/pull/5694/files#diff-10>(7)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/jail.py<https://github.com/ansible/ansible/pull/5694/files#diff-11>(5)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/local.py<https://github.com/ansible/ansible/pull/5694/files#diff-12>(6)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/paramiko_alt.py<https://github.com/ansible/ansible/pull/5694/files#diff-13>(11)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/paramiko_ssh.py<https://github.com/ansible/ansible/pull/5694/files#diff-14>(16)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/ssh.py<https://github.com/ansible/ansible/pull/5694/files#diff-15>(33)
>>>  
>>>    - *M* 
>>> lib/ansible/runner/connection_plugins/ssh_old.py<https://github.com/ansible/ansible/pull/5694/files#diff-16>(31)
>>>  
>>>    - *M* 
>>> lib/ansible/utils/__init__.py<https://github.com/ansible/ansible/pull/5694/files#diff-17>(38)
>>>  
>>>
>>> Patch Links: 
>>>    
>>>    - https://github.com/ansible/ansible/pull/5694.patch 
>>>    - https://github.com/ansible/ansible/pull/5694.diff 
>>>
>>> —
>>> Reply to this email directly or view it on 
>>> GitHub<https://github.com/ansible/ansible/pull/5694>
>>> .
>>>
>>>
>>>  -- 
>> 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] <javascript:>.
>>
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/2512a6c3-881d-4d76-bfd0-b94a4826fea7%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/2512a6c3-881d-4d76-bfd0-b94a4826fea7%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/551952ba-d0fd-459c-a580-4b051dc2eabe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to