---
- name: Add the uwsgi PPA
  apt_repository: repo=ppa:chris-lea/uwsgi state=present

- name: Install uwsgi
  apt: pkg={{ item }} state=present
  with_items:
   - uwsgi-plugin-python
   - uwsgi-plugin-python3
   - uwsgi-plugin-rack-ruby1.9.1
   - uwsgi-emperor

- name: Configure uwsgi to run apps from the vagrant folder
  template: src=emperor.ini.j2
            dest=/etc/uwsgi-emperor/emperor.ini
  notify: Reload uwsgi
  when: interactive_user == "vagrant"

---
- name: Add the uwsgi PPA
  apt_repository: repo=ppa:chris-lea/uwsgi state=present

- name: Install uwsgi
  apt: pkg={{ item }} state=present
  with_items:
   - uwsgi-plugin-python
   - uwsgi-plugin-rack-ruby1.9.1
   - uwsgi-emperor

- name: Configure uwsgi to run apps from the vagrant folder
  template: src=emperor.ini.j2
            dest=/etc/uwsgi-emperor/emperor.ini
  notify: Reload uwsgi
  when: interactive_user == "vagrant"

Remove UWSGI Python 3 plugin.
Remove UWSGI Python 3 plugin.
