diff --git a/roles/wsgi_website/tasks/main.yml b/roles/wsgi_website/tasks/main.yml index 4bdf2c97fbe00c8791c838f02b022901a17587eb..25cb1591c053f9ecba153133beb85db5bb185a85 100644 --- a/roles/wsgi_website/tasks/main.yml +++ b/roles/wsgi_website/tasks/main.yml @@ -176,7 +176,7 @@ with_items: - package: gunicorn version: "{{ gunicorn_version }}" - when: "not wsgi_requirements" + when: wsgi_requirements | length == 0 register: install_wsgi_server notify: - Restart WSGI services @@ -192,13 +192,13 @@ with_items: - package: futures version: "{{ futures_version }}" - when: "not wsgi_requirements" + when: wsgi_requirements | length == 0 register: install_wsgi_server notify: - Restart WSGI services - include: requirements.yml - when: "wsgi_requirements" + when: wsgi_requirements | length > 0 - name: Install additional packages in Python virtual environment become: true @@ -208,7 +208,7 @@ state: present virtualenv: "{{ home }}/virtualenv" register: install_additional_packages_in_virtualenv - when: "virtualenv_packages" + when: virtualenv_packages | length > 0 notify: - Restart WSGI services