Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aruba_module_installer.py error /usr/lib/python3/dist-packages/ansible/plugins/doc_fragments does not exist on Debian Linux 10 #127

Open
pixeldoc2000 opened this issue Jan 18, 2021 · 0 comments

Comments

@pixeldoc2000
Copy link

$ sudo python3 aruba_module_installer/aruba_module_installer.py
Copying modules/network/arubaoss to /usr/lib/python3/dist-packages/ansible/modules/network/arubaoss...

Copying module_utils/network/arubaoss to /usr/lib/python3/dist-packages/ansible/module_utils/network/arubaoss...

Copying plugins/action/arubaoss.py to /usr/lib/python3/dist-packages/ansible/plugins/action/arubaoss.py...

Copying plugins/cliconf/arubaoss.py to /usr/lib/python3/dist-packages/ansible/plugins/cliconf/arubaoss.py...

Copying plugins/terminal/arubaoss.py to /usr/lib/python3/dist-packages/ansible/plugins/terminal/arubaoss.py...

Copying plugins/doc_fragments/arubaoss_rest.py to /usr/lib/python3/dist-packages/ansible/plugins/doc_fragments/arubaoss_rest.py...

Traceback (most recent call last):
  File "aruba_module_installer/aruba_module_installer.py", line 403, in <module>
    install_sw_modules()
  File "aruba_module_installer/aruba_module_installer.py", line 204, in install_sw_modules
    copyfile(SRC_PATH+path, ANS_PATH+path)
  File "/usr/lib/python3.7/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/ansible/plugins/doc_fragments/arubaoss_rest.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aruba_module_installer/aruba_module_installer.py", line 407, in <module>
    if (e[0] == errno.EACCES):
TypeError: 'FileNotFoundError' object is not subscriptable

On Debian 10 with python3 the patch /usr/lib/python3/dist-packages/ansible/plugins/doc_fragments does not exist.

Maybe aruba_module_installer.py should check if path exist and create the directory if it doesn't?

Fixed it by manually creating the directory with: sudo mkdir /usr/lib/python3/dist-packages/ansible/plugins/doc_fragments

OS: Debian Linux 10 x64
Python: python3/stable,now 3.7.3-1 amd64 (Debian Package)
Ansible: ansible/stable,now 2.7.7+dfsg-1 all (Debian Package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant