Permalink
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (25 sloc) 760 Bytes
---
- name: prepare app server
hosts: app
vars_files:
- vars.yml
sudo: yes
user: root
tasks:
- name: add chris lea's ppa
apt_repository: repo='ppa:chris-lea/node.js' state=present update_cache=yes
- name: Install node!
apt: pkg=nodejs state=latest
- name: Install packages
apt: name={{item}} state=latest
with_items:
- git
- vim
- name: Create web user
user: name=web
- name: Create project folder
file: path={{project_root}} group=web owner=web mode=755 state=directory
- name: Add upstart conf
template: src=templates/upstart.conf.j2 dest=/etc/init/{{project_name}}.conf
- name: start app on very boot
service: name={{project_name}} enabled=yes