The main error is "[Errno 13] Permission denied: '/var/www/.ansible'". Ensure you are escalating to root privileges with --become, more info at https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html .
I hope this helps. On Thu, 30 Mar 2023 at 05:09, Logunath K <[email protected]> wrote: > TASK [openwisp.openwisp2-dev : migrate] > ******************************************************************************************************************************************************************** > [WARNING]: Unable to use /var/www/.ansible/tmp as temporary directory, > failing back to system: [Errno 13] Permission denied: '/var/www/.ansible' > fatal: [---------------]: FAILED! => {"changed": false, "cmd": > "./manage.py migrate --noinput", "msg": "\n:stderr: Traceback (most recent > call last):\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", > line 354, in run_from_argv\n self.execute(*args, **cmd_options)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", > line 398, in execute\n output = self.handle(*args, **options)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", > line 86, in wrapped\n saved_locale = translation.get_language()\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/translation/__init__.py\", > line 254, in get_language\n return _trans.get_language()\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/translation/__init__.py\", > line 57, in __getattr__\n if settings.USE_I18N:\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", > line 82, in __getattr__\n self._setup(name)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", > line 69, in _setup\n self._wrapped = Settings(settings_module)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", > line 170, in __init__\n mod = > importlib.import_module(self.SETTINGS_MODULE)\n File > \"/opt/openwisp2/env/lib/python3.7/importlib/__init__.py\", line 127, in > import_module\n return _bootstrap._gcd_import(name[level:], package, > level)\n File \"<frozen importlib._bootstrap>\", line 1006, in > _gcd_import\n File \"<frozen importlib._bootstrap>\", line 983, in > _find_and_load\n File \"<frozen importlib._bootstrap>\", line 953, in > _find_and_load_unlocked\n File \"<frozen importlib._bootstrap>\", line > 219, in _call_with_frames_removed\n File \"<frozen > importlib._bootstrap>\", line 1006, in _gcd_import\n File \"<frozen > importlib._bootstrap>\", line 983, in _find_and_load\n File \"<frozen > importlib._bootstrap>\", line 967, in _find_and_load_unlocked\n File > \"<frozen importlib._bootstrap>\", line 677, in _load_unlocked\n File > \"<frozen importlib._bootstrap_external>\", line 728, in exec_module\n > File \"<frozen importlib._bootstrap>\", line 219, in > _call_with_frames_removed\n File \"/opt/openwisp2/openwisp2/__init__.py\", > line 1, in <module>\n from .celery import app as celery_app\n File > \"/opt/openwisp2/openwisp2/celery.py\", line 3, in <module>\n from > celery import Celery\nImportError: cannot import name 'Celery' from > 'celery' > (/opt/openwisp2/env/lib/python3.7/site-packages/celery/__init__.py)\n\nDuring > handling of the above exception, another exception occurred:\n\nTraceback > (most recent call last):\n File \"./manage.py\", line 10, in <module>\n > execute_from_command_line(sys.argv)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/__init__.py\", > line 419, in execute_from_command_line\n utility.execute()\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/__init__.py\", > line 413, in execute\n > self.fetch_command(subcommand).run_from_argv(self.argv)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", > line 367, in run_from_argv\n connections.close_all()\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/db/utils.py\", line > 208, in close_all\n for alias in self:\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/connection.py\", > line 73, in __iter__\n return iter(self.settings)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/functional.py\", > line 48, in __get__\n res = instance.__dict__[self.name] = > self.func(instance)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/connection.py\", > line 45, in settings\n self._settings = > self.configure_settings(self._settings)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/db/utils.py\", line > 144, in configure_settings\n databases = > super().configure_settings(databases)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/connection.py\", > line 50, in configure_settings\n settings = getattr(django_settings, > self.settings_name)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", > line 82, in __getattr__\n self._setup(name)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", > line 69, in _setup\n self._wrapped = Settings(settings_module)\n File > \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", > line 170, in __init__\n mod = > importlib.import_module(self.SETTINGS_MODULE)\n File > \"/opt/openwisp2/env/lib/python3.7/importlib/__init__.py\", line 127, in > import_module\n return _bootstrap._gcd_import(name[level:], package, > level)\n File \"<frozen importlib._bootstrap>\", line 1006, in > _gcd_import\n File \"<frozen importlib._bootstrap>\", line 983, in > _find_and_load\n File \"<frozen importlib._bootstrap>\", line 953, in > _find_and_load_unlocked\n File \"<frozen importlib._bootstrap>\", line > 219, in _call_with_frames_removed\n File \"<frozen > importlib._bootstrap>\", line 1006, in _gcd_import\n File \"<frozen > importlib._bootstrap>\", line 983, in _find_and_load\n File \"<frozen > importlib._bootstrap>\", line 967, in _find_and_load_unlocked\n File > \"<frozen importlib._bootstrap>\", line 677, in _load_unlocked\n File > \"<frozen importlib._bootstrap_external>\", line 728, in exec_module\n > File \"<frozen importlib._bootstrap>\", line 219, in > _call_with_frames_removed\n File \"/opt/openwisp2/openwisp2/__init__.py\", > line 1, in <module>\n from .celery import app as celery_app\n File > \"/opt/openwisp2/openwisp2/celery.py\", line 3, in <module>\n from > celery import Celery\nImportError: cannot import name 'Celery' from > 'celery' > (/opt/openwisp2/env/lib/python3.7/site-packages/celery/__init__.py)\n", > "path": > "/opt/openwisp2/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin", > "syspath": > ["/tmp/ansible_django_manage_payload_t6_yzlkx/ansible_django_manage_payload.zip", > "/usr/lib/python36.zip", "/usr/lib/python3.6", > "/usr/lib/python3.6/lib-dynload", "/usr/local/lib/python3.6/dist-packages", > "/usr/lib/python3/dist-packages"]} > > PLAY RECAP > ************************************************************************************************************************************************************************************************* > -------- : ok=79 changed=5 unreachable=0 failed=1 > skipped=45 rescued=0 ignored=2 > > -- > You received this message because you are subscribed to the Google Groups > "OpenWISP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/openwisp/7b4d73a5-703b-46a7-9053-16a79f654ef3n%40googlegroups.com > <https://groups.google.com/d/msgid/openwisp/7b4d73a5-703b-46a7-9053-16a79f654ef3n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "OpenWISP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAAGgX6%2BPq8tTWS7_MH05rVpcxAv82KE6Ryp-dLy4aB0Oa95pxg%40mail.gmail.com.
