---
- name: clone fpcentral git repo
  git: repo={{ fpcentral_git_url }} dest={{ fpcentral_rootdir }}/fpcentral
       version={{ fpcentral_git_commit }}

- name: create python3 virtual env
  command: "python3 -mvirtualenv -p python3 {{ fpcentral_virtualenv }}"
  args:
    creates: "{{ fpcentral_virtualenv }}"

- name: install required python modules
  command: "{{ fpcentral_virtualenv }}/bin/pip3 install -r {{ fpcentral_rootdir }}/fpcentral/requirements.txt"

- template:
    src: fpcentral.wsgi
    dest: "{{ fpcentral_rootdir }}/fpcentral/fpcentral.wsgi"
    mode: 0755

