$ 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.

-- 
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/91309711-0779-439d-88cc-f4a4575eccba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to