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

5 views
Skip to first unread message

axiqia

unread,
Jan 23, 2019, 1:59:17 AM1/23/19
to Ansible Project
$ 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, I add 
remote_tmp      = /tmp/${USER}/ansible
but it didn't help.

Reply all
Reply to author
Forward
0 new messages