Djangocms via ansible and vagrant

Hi,

iam trying to setup a djangocms dev environment with ansible and vagrant.

But if iam running this Playbook:

`

  • name: Setup Virtualenv
    pip:
    virtualenv: “{{ virtualenv_path }}”
    requirements: “{{ virtualenv_path }}/requirements.txt”

virtualenv_python: python3

virtualenv_command: virtualenv

become: true

- name: Set permissions on migrate.py

file:

dest: “{{ virtualenv_path }}/manage.py”

mode: 755

  • name: Create project directory for djangocms website
    file:
    path: “{{ virtualenv_path}}/{{ project_name}}”
    state: directory

  • name: Install djangocms
    shell: “{{ virtualenv_path }}/bin/djangocms -f -p {{ virtualenv_path}}/{{ project_name}} mysite”

args:

chdir: “{{ virtualenv_path}}/{{ project_name}}”

  • name: Start webservice
    command: "{{virtualenv_path }}/bin/python {{virtualenv_path }}/{{ project_name}}/manage.py runserver 0.0.0.0:8080 "

`

i get an error:

`

TASK [deploy : Install djangocms] **********************************************
task path: /vagrant/ansible/roles/deploy/tasks/main.yaml:19
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/commands/command.py
ESTABLISH LOCAL CONNECTION FOR USER: ubuntu
EXEC /bin/sh -c ‘echo ~ && sleep 0’
EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /home/ubuntu/.ansible/tmp/ansible-tmp-1496685538.28-252176297847487” && echo ansible-tmp-1496685538.28-252176297847487=“echo /home/ubuntu/.ansible/tmp/ansible-tmp-1496685538.28-252176297847487” ) && sleep 0’
PUT /tmp/tmpoyUX_p TO /home/ubuntu/.ansible/tmp/ansible-tmp-1496685538.28-252176297847487/command.py
EXEC /bin/sh -c ‘chmod u+x /home/ubuntu/.ansible/tmp/ansible-tmp-1496685538.28-252176297847487/ /home/ubuntu/.ansible/tmp/ansible-tmp-1496685538.28-252176297847487/command.py && sleep 0’
EXEC /bin/sh -c ‘/usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1496685538.28-252176297847487/command.py; rm -rf “/home/ubuntu/.ansible/tmp/ansible-tmp-1496685538.28-252176297847487/” > /dev/null 2>&1 && sleep 0’
fatal: [default]: FAILED! => {
“changed”: true,
“cmd”: “/var/www/site/bin/djangocms -f -p /var/www/site/techniktip mysite”,
“delta”: “0:00:02.143124”,
“end”: “2017-06-05 17:59:00.575333”,
“failed”: true,
“invocation”: {
“module_args”: {
“_raw_params”: “/var/www/site/bin/djangocms -f -p /var/www/site/techniktip mysite”,
“_uses_shell”: true,
“chdir”: null,
“creates”: null,
“executable”: null,
“removes”: null,
“warn”: true
}
},
“rc”: 1,
“start”: “2017-06-05 17:58:58.432209”,
“stderr”: “Traceback (most recent call last):\n File "/var/www/site/bin/djangocms", line 11, in \n sys.exit(execute())\n File "/var/www/site/local/lib/python2.7/site-packages/djangocms_installer/main.py", line 33, in execute\n verbose=config_data.verbose\n File "/var/www/site/local/lib/python2.7/site-packages/djangocms_installer/install/init.py", line 98, in requirements\n logger.error(‘cmd : %s :%s’ % (e.cmd, e.output))\nAttributeError: ‘exceptions.OSError’ object has no attribute ‘cmd’”,
“stderr_lines”: [
“Traceback (most recent call last):”,
" File "/var/www/site/bin/djangocms", line 11, in “,
" sys.exit(execute())”,
" File "/var/www/site/local/lib/python2.7/site-packages/djangocms_installer/main.py", line 33, in execute",
" verbose=config_data.verbose",
" File "/var/www/site/local/lib/python2.7/site-packages/djangocms_installer/install/init.py", line 98, in requirements",
" logger.error(‘cmd : %s :%s’ % (e.cmd, e.output))",
“AttributeError: ‘exceptions.OSError’ object has no attribute ‘cmd’”
],
“stdout”: “Creating the project\nPlease wait while I install dependencies\nThe installation has failed.\n\n\n*****************************************************************\n\nCheck documentation at https://djangocms-installer.readthedocs.io\n\n*****************************************************************”,
“stdout_lines”: [
“Creating the project”,
“Please wait while I install dependencies”,
“The installation has failed.”,
“”,
“”,
",
“”,
“Check documentation at https://djangocms-installer.readthedocs.io”,
“”,
"

]
}
to retry, use: --limit @/vagrant/ansible/roles/playbook.retry

PLAY RECAP *********************************************************************
default : ok=8 changed=0 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

`

I dont know if this is ansible or djangocms related.
Could somebody push me in the right direction to solve this problem?