Issue:
ansible -version
Traceback (most recent call last):
File "/usr/bin/ansible", line 44, in <module>
import ansible.constants as C
File
"/usr/lib/python2.6/site-packages/ansible/constants.py", line 152, in
<module>
DEFAULT_LOCAL_TMP =
get_config(p, DEFAULTS, 'local_tmp',
'ANSIBLE_LOCAL_TEMP', '$HOME/.ansible/tmp',
istmppath=True)
File "/usr/lib/python2.6/site-packages/ansible/constants.py",
line 79, in get_config
value = tempfile.mkdtemp(prefix='ansible-local-tmp',
dir=value)
File "/usr/lib64/python2.6/tempfile.py", line 318, in
mkdtemp
_os.mkdir(file, 0700)
OSError: [Errno 13] Permission denied: '/home/.ansible/tmp/ansible-local-tmpbBEMre'
Solutions:
Change the value in /etc/ansible/ansible.cfg or if any in your current
directory:
#remote_tmp = $HOME/.ansible/tmp
#local_tmp = $HOME/.ansible/tmp
remote_tmp = Accessible directory for current user or just
do sudo or become_user
local_tmp = Accessible directory for current user or
just do sudo or become_user
Happy learning and implementation!!!
No comments:
Post a Comment