main.yml 554 Bytes
- name: have /webapp directory
  sudo: yes
  file: dest="/webapp" state=directory

- name: synchronize webapp directory to /webapp on target hosts
  sudo: yes
  synchronize: src="webapp/" dest="/webapp/" owner=no

- name: have python-pip
  sudo: yes
  apt: pkg=python-pip state=present

- name: have pip dependencies
  sudo: yes
  pip: requirements="/webapp/pip-req.txt"

- name: have upstart job description
  sudo: yes
  copy: src=webapp.conf dest=/etc/init/webapp.conf

- name: have webapp running
  sudo: yes
  service: name=webapp state=started