- name: stop xserver
  service: name=xserver state=stopped
  tags:
  - deploy

- name: checkout code
  git: dest={{ xserver_code_dir }} repo={{ xserver_source_repo }} version={{ xserver_version }}
  tags:
  - deploy

- name: start xserver
  service: name=xserver state=started
  tags:
  - deploy

- name: stop xserver
  service: name=xserver state=stopped
  tags:
  - deploy

- name: checkout code
  git: dest={{ xserver_code_dir }} repo={{ xserver_source_repo }} version={{ xserver_version }}
  tags:
  - deploy

- name: install requirements
  pip: requirements="{{ xserver_requirements_file }}" virtualenv="{{ xserver_venv_dir }}" state=present

- name: start xserver
  service: name=xserver state=started
  tags:
  - deploy

Add a task for installing xserver requirements.
Add a task for installing xserver requirements.
