I need to run python manage.py migrate in an activated virtualenv
I used the django_manage module specifying the virtual env but it gives the
same error as when I run migrate without activating, at the command line.
Is there a way to activate the virtualenv prior to running migrate in
ansible? Otherwise this is one step I cannot automate. This is the error:
fatal: [i5k]: FAILED! => {"changed": true, "cmd": "cd
/home/vagrant/django-blast;\\ export
PATH=/home/vagrant/django-blast/py2.7/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/vagrant/bin;
python manage.py migrate", "delta": "0:00:00.020032", "end": "2016-07-07
05:21:35.367043", "failed": true, "rc": 1, "start": "2016-07-07
05:21:35.347011", "stderr": "/bin/sh: export: command not found\nTraceback
(most recent call last):\n File \"manage.py\", line 8, in <module>\n
from django.core.management import execute_from_command_line\nImportError:
No module named django.core.management", "stdout": "", "stdout_lines": [],
"warnings": []}
Thanks
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/873b8575-ff8e-42bd-b4c7-f9a69bd76e08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.