---
- name: horizon venv
  shell: cd /opt/stack/horizon && python tools/install_venv.py
  notify:
    - force django-1.5

# django 1.6 currently gets installed, and does not work.
- name: force django-1.5
  shell: /opt/stack/horizon/.venv/bin/pip install Django==1.5.5
  notify:
    - restart apache

- name: disable apache status
  shell: a2dismod status
  notify:
    - restart apache

- name: restart apache
  service: name=apache2 state=restarted

- name: disable default apache site
  shell: a2dissite default

---
- name: horizon venv
  shell: cd /opt/stack/horizon && python tools/install_venv.py
  notify:
    - force django-1.5

# django 1.6 currently gets installed, and does not work.
- name: force django-1.5
  pip: name=Django version=1.5.5 chdir=/opt/stack/horizon virtualenv=/opt/stack/horizon/.venv
  notify:
    - restart apache

- name: disable apache status
  shell: a2dismod status
  notify:
    - restart apache

- name: restart apache
  service: name=apache2 state=restarted

- name: disable default apache site
  shell: a2dissite default

Use Ansible's pip module rather than calling pip which may or may not be within the venv
Use Ansible's pip module rather than calling pip which may or may not be within the venv
