Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

problemas ao subir o banco de dados

  • name: Configurando o Banco de dados shell: '. /home/ubuntu/tcc/venv/bin/activate; python /home/ubuntu/tcc/manage.py migrate'
    • name: Carregando os dados iniciais shell: '. /home/ubuntu/tcc/venv/bin/activate; python /home/ubuntu/tcc/manage.py loaddata clientes.json'

      quando vou passar o playbook da esse erro.

      fatal: [54.245.185.60]: FAILED! => {"changed": true, "cmd": ". /home/ubuntu/tcc/venv/bin/activate; python /home/ubuntu/tcc/manage.py migrate", "delta": "0:00:00.043378", "end": "2024-07-11 17:45:12.773587", "msg": "non-zero return code", "rc": 1, "start": "2024-07-11 17:45:12.730209", "stderr": "Traceback (most recent call last):\n File "/home/ubuntu/tcc/manage.py", line 11, in main\n from django.core.management import execute_from_command_line\n File "/home/ubuntu/tcc/venv/lib/python3.12/site-packages/django/init.py", line 1, in \n from django.utils.version import get_version\n File "/home/ubuntu/tcc/venv/lib/python3.12/site-packages/django/utils/version.py", line 6, in \n from distutils.version import LooseVersion\nModuleNotFoundError: No module named 'distutils'\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "/home/ubuntu/tcc/manage.py", line 22, in \n main()\n File "/home/ubuntu/tcc/manage.py", line 13, in main\n raise ImportError(\nImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?", "stderr_lines": ["Traceback (most recent call last):", " File "/home/ubuntu/tcc/manage.py", line 11, in main", " from django.core.management import execute_from_command_line", " File "/home/ubuntu/tcc/venv/lib/python3.12/site-packages/django/init.py", line 1, in ", " from django.utils.version import get_version", " File "/home/ubuntu/tcc/venv/lib/python3.12/site-packages/django/utils/version.py", line 6, in ", " from distutils.version import LooseVersion", "ModuleNotFoundError: No module named 'distutils'", "", "The above exception was the direct cause of the following exception:", "", "Traceback (most recent call last):", " File "/home/ubuntu/tcc/manage.py", line 22, in ", " main()", " File "/home/ubuntu/tcc/manage.py", line 13, in main", " raise ImportError(", "ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?"], "stdout": "", "stdout_lines": []}

1 resposta
solução!

consegui resolver