diff --git a/configure_otree.yml b/configure_otree.yml index 9a09c1738296119b12df0e6186047a865f87cab0..496355f61375a9b4c143786326b505898f6caaf6 100644 --- a/configure_otree.yml +++ b/configure_otree.yml @@ -61,36 +61,36 @@ when: item.value.override - # install python dependencies, otree and + # install python dependencies and - name: install psycopg2 pip: name: psycopg2 state: present virtualenv: "/home/{{ item.key }}/.venv_otree" - virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv" + virtualenv_command: "{{ item.value.python_binary_path }} -m venv" become: yes become_user: "{{ item.key }}" with_dict: "{{ otree_users }}" when: item.value.override - - name: install otree - pip: - name: otree - state: present - extra_args: "{{ '--pre' if item.value.pre_release else '' }}" - virtualenv: "/home/{{ item.key }}/.venv_otree" - virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv" - become: yes - become_user: "{{ item.key }}" - with_dict: "{{ otree_users }}" - when: item.value.override + #- name: install otree + # pip: + # name: otree + # state: present + # extra_args: "{{ '--pre' if item.value.pre_release else '' }}" + # virtualenv: "/home/{{ item.key }}/.venv_otree" + # virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv" + # become: yes + # become_user: "{{ item.key }}" + # with_dict: "{{ otree_users }}" + # when: item.value.override - name: install requirements if exists pip: state: present requirements: "/home/{{ item.key }}/otree/requirements.txt" virtualenv: "/home/{{ item.key }}/.venv_otree" - virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv" + virtualenv_command: "{{ item.value.python_binary_path }} -m venv" become: yes become_user: "{{ item.key }}" with_dict: "{{ otree_users }}" diff --git a/group_vars/otree_servers.yml.example b/group_vars/otree_servers.yml.example index be821da2c81082ceae7306d7eb6be96eac97b9f9..9396cfa88f3ab2132830dd654d15ab7f43354018 100644 --- a/group_vars/otree_servers.yml.example +++ b/group_vars/otree_servers.yml.example @@ -21,8 +21,6 @@ otree_users: # linux username override: yes # should a existing otree environment be overriden - pre_release: no - # should the pre release version of otree be installed redis: "redis://localhost:6379/1" # redis queue. Note don't use a slot twice, there are 16 slots available (0-15) database: "sqlite:////home/otree1/db.sqlite3" @@ -37,10 +35,13 @@ otree_users: # LOG-LEVEL, set to None ("production: ") to enable further debug messages. port: 8005 # port which is used by this instance + python_binary_path: "/usr/bin/python3.7" + # python binary used for otree installation otree2: override: no app_repo: "https://github.com/oTree-org/oTree.git" + # optional: if set clone provided git repository instead of provided directory pre_release: yes redis: "redis://localhost:6379/2" database: "sqlite:////home/otree2/db.sqlite3" @@ -49,6 +50,7 @@ otree_users: secret_key: "sdfunlidsgjndrsgf" production: port: 8006 + python_binary_path: "/usr/bin/python3.7" ssl_certificate_path: "/etc/ssl/certs/{{ otree_domain }}.crt" ssl_certificate_key_path: "/etc/ssl/private/{{ otree_domain }}.key" diff --git a/site.yml b/site.yml index 301b99c4880e91737451b710e12b22728ebf7681..ac94a32acd1ee1210b1076916cd2c3e37bdeb998 100644 --- a/site.yml +++ b/site.yml @@ -10,9 +10,9 @@ - python3-pip - python3-dev - python3-venv - - python3.7 - - python3.7-dev - - python3.7-venv +# - python3.7 +# - python3.7-dev +# - python3.7-venv - python-psycopg2 - libpq-dev - redis-server