# python: can't open file '/home/openwhisk/openwhisk/ansible/tmp/ansible-tmp-\*/setup.py': Permission denied

**URL:** <https://forum.ansible.com/t/python-cant-open-file-home-openwhisk-openwhisk-ansible-tmp-ansible-tmp-setup-py-permission-denied/29499>\
**Category:** Ansible Project\
**Created:** [January 23, 2019, 6:59am UTC](https://forum.ansible.com/t/python-cant-open-file-home-openwhisk-openwhisk-ansible-tmp-ansible-tmp-setup-py-permission-denied/29499 "2019-01-23T06:59:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![axiqia](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@axiqia](https://forum.ansible.com/u/axiqia)\
**Post date:** [January 23, 2019, 6:59am UTC](https://forum.ansible.com/t/python-cant-open-file-home-openwhisk-openwhisk-ansible-tmp-ansible-tmp-setup-py-permission-denied/29499/1 "2019-01-23T06:59:17Z")

</div>

`  
$ ansible-playbook -i environments/distributed/hosts prereq\_build.yml --become-method=sudo --ask-sudo-pass  
[DEPRECATION WARNING]: The sudo command line option has been deprecated in favor of the “become” command line  
arguments. This feature will be removed in version 2.6. Deprecation warnings can be disabled by setting  
deprecation\_warnings=False in ansible.cfg.  
SUDO password:

PLAY [all:!ansible] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Wednesday 23 January 2019 14:55:33 +0800 (0:00:00.161) 0:00:00.161 \*\*\*\*\*  
fatal: [dell-09.epcc]: FAILED! =\> {“changed”: false, “module\_stderr”: “Shared connection to dell-09.epcc closed.\r\n”, “module\_stdout”: “\r\n/usr/bin/python: can’t open file ‘/home/openwhisk/openwhisk/ansible/tmp/ansible-tmp-1548226533.8319745-33287445496649/setup.py’: [Errno 13] Permission denied\r\n”, “msg”: “MODULE FAILURE”, “rc”: 2}

MODULE FAILURE  
fatal: [dell-08.epcc]: FAILED! =\> {“changed”: false, “module\_stderr”: “Shared connection to dell-08.epcc closed.\r\n”, “module\_stdout”: “\r\n/usr/bin/python: can’t open file ‘/home/openwhisk/openwhisk/ansible/tmp/ansible-tmp-1548226533.8287032-274573968105131/setup.py’: [Errno 13] Permission denied\r\n”, “msg”: “MODULE FAILURE”, “rc”: 2}

MODULE FAILURE

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
dell-08.epcc : ok=0 changed=0 unreachable=0 failed=1  
dell-09.epcc : ok=0 changed=0 unreachable=0 failed=1  
`

my ansible configure file :

`  
$ cat ansible.cfg  
[defaults]

callback\_whitelist = profile\_tasks  
retry\_files\_enabled = False  
host\_key\_checking = False  
inventory = environments/local  
callback\_plugins = callbacks  
hash\_behaviour = merge  
remote\_tmp = /tmp/${USER}/ansible

[ssh\_connection]  
scp\_if\_ssh = True  
`

My playbook file:

`  
$ cat prereq\_build.yml

- hosts: all:!ansible  
roles:
- whiskhost
- docker
- prereq  
become: yes  
`

According to this question， [https://stackoverflow.com/a/37880679/8119453，](https://stackoverflow.com/a/37880679/8119453%EF%BC%8C) I add

```auto
remote_tmp = /tmp/${USER}/ansible

```

but it didn’t help.
