ansiblebook icon indicating copy to clipboard operation
ansiblebook copied to clipboard

ch06 django_manage

Open tylrd opened this issue 10 years ago • 3 comments

Cloned ch06 playbook and ran the playbook and keep getting this output for the manage.py tasks.

failed: [web] => (item=syncdb) => {"cmd": "./manage.py syncdb --noinput", 
"failed": true, "item": "syncdb", "msg": "[Errno 13] Permission denied", "rc": 13}
failed: [web] => (item=migrate) => {"cmd": "./manage.py migrate --noinput", 
"failed": true, "item": "migrate", "msg": "[Errno 13] Permission denied", "rc": 13}
failed: [web] => (item=collectstatic) => {"cmd": "./manage.py collectstatic --noinput", 
"failed": true, "item": "collectstatic", "msg": "[Errno 13] Permission denied", "rc": 13}

I've gotten manage.py to run by vagrant ssh, making it executable with chmod +x manage.py and changing the #!/usr/bin/env on the top of the file to the virtual env. How to get around this with ansible?

tylrd avatar Sep 10 '15 18:09 tylrd

I succeeded running this playbook today using Ansible 1.9.3 without needing the modifications you mentioned.

(ansible-venv) $ ansible --version
ansible 1.9.3
  configured module search path = None

Python/Django virtual environment on the Vagrant machine

vagrant@vagrant-ubuntu-trusty-64:~/mezzanine-example$ bin/pip freeze
Django==1.6.11
Mezzanine==3.1.10
Pillow==2.9.0
South==1.0.2
argparse==1.2.1
beautifulsoup4==4.1.3
bleach==1.4.2
django-appconf==1.0.1
django-compressor==1.5
filebrowser-safe==0.4.0
future==0.9.0
grappelli-safe==0.4.1
gunicorn==19.3.0
html5lib==0.9999999
oauthlib==1.0.3
psycopg2==2.6.1
python-memcached==1.57
pytz==2015.6
requests==2.7.0
requests-oauthlib==0.5.0
setproctitle==1.1.9
six==1.9.0
tzlocal==1.0
wsgiref==0.1.2 

Please provide more information on your environment (control machine and remote machine)

saschagottfried avatar Sep 23 '15 16:09 saschagottfried

Might be related to https://github.com/ansible/ansible-modules-core/issues/2856

dbrgn avatar Apr 20 '16 15:04 dbrgn

Does anybody solve this issue? I met the same issue now. Stucking.....

ansible --version ansible 2.1.1.0 config file = /root/ansible/postgresql/ansible.cfg configured module search path = Default w/o overrides root@eshiaii-Z600:~/ansible/postgresql#

shiiaii avatar Aug 12 '16 07:08 shiiaii