libyaml = True
I am logged into the Mac as user xxxx with administrator privileges.
when I run the ansible version without sudo I get the following backtrace. (I don't know why it is referencing python 3.7. It initially installed with module location of 3.7 but that was fixed and from output above it has the 3.11 module location).
% ansible --version
Unhandled error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 605, in update_config_data
value, origin = self.get_config_value_and_origin(config, configfile)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 543, in get_config_value_and_origin
value = ensure_type(value, defs[config].get('type'), origin=origin)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 124, in ensure_type
value = tempfile.mkdtemp(prefix=prefix, dir=value)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py", line 366, in mkdtemp
_os.mkdir(file, 0o700)
PermissionError: [Errno 13] Permission denied: '/Users/xxxx/.ansible/tmp/ansible-local-506222opmhr9x'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 605, in update_config_data
value, origin = self.get_config_value_and_origin(config, configfile)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 543, in get_config_value_and_origin
value = ensure_type(value, defs[config].get('type'), origin=origin)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 124, in ensure_type
value = tempfile.mkdtemp(prefix=prefix, dir=value)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py", line 366, in mkdtemp
_os.mkdir(file, 0o700)
PermissionError: [Errno 13] Permission denied: '/Users/xxxx/.ansible/tmp/ansible-local-506222opmhr9x'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin//ansible", line 63, in <module>
import ansible.constants as C
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/constants.py", line 181, in <module>
config = ConfigManager()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 310, in __init__
self.update_config_data()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/config/manager.py", line 617, in update_config_data
raise AnsibleError("Invalid settings supplied for %s: %s\n" % (config, to_native(e)), orig_exc=e)
ansible.errors.AnsibleError: Invalid settings supplied for DEFAULT_LOCAL_TMP: [Errno 13] Permission denied: '/Users/xxxx/.ansible/tmp/ansible-local-506222opmhr9x'
. [Errno 13] Permission denied: '/Users/xxxx/.ansible/tmp/ansible-local-506222opmhr9x'
It seems to be an issue with this tmp directory:
'/Users/xxxx/.ansible/tmp/ansible-local-506222opmhr9x'
I tried getting into the this tmp directory and get permission denied as it is owned by root
% ls -la
total 0
drwxr-xr-x 4 root staff 128 May 23 18:01 .
drwxr-xr-x+ 50 xxx staff 1600 Aug 3 18:08 ..
drwx------ 2 root staff 64 May 23 18:02 cp
drwx------ 2 root staff 64 Aug 3 18:23 tmp
Is there a fix for this?
warm regards
Dave
Proceed (Y/n)? y
ERROR: Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 825, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ansible-8.2.0.dist-info/' -> '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/~nsible-8.2.0.dist-info'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/commands/uninstall.py", line 105, in run
uninstall_pathset = req.uninstall(
^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/req/req_install.py", line 680, in uninstall
uninstalled_pathset.remove(auto_confirm, verbose)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/req/req_uninstall.py", line 381, in remove
moved.stash(path)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/req/req_uninstall.py", line 272, in stash
renames(path, new_path)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 313, in renames
shutil.move(old, new)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 838, in move
raise PermissionError("Cannot move the non-empty directory "
PermissionError: Cannot move the non-empty directory '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ansible-8.2.0.dist-info/': Lacking write permission to '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ansible-8.2.0.dist-info/'.