Created
September 4, 2015 14:08
-
-
Save mmarcon/522f9748561dadf80b88 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
sudo: yes | |
vars: | |
# franklinkim.nodejs | |
nodejs_version: 0.12 | |
nodejs_packages: | |
- pm2 | |
roles: | |
- franklinkim.nodejs | |
pre_tasks: | |
- name: create apps group | |
group: name=apps state=present | |
- name: create apps user | |
user: name=apps comment="Apps User" group=apps home=/var/apps | |
- name: create node apps directory | |
file: path=/var/apps state=directory owner=apps group=apps mode=0775 | |
- name: copy node app to apps directory | |
copy: src=./services dest=/var/apps owner=apps group=apps mode=0644 | |
tasks: | |
- name: install nginx | |
apt: name=nginx state=present update_cache=yes | |
notify: | |
- start nginx | |
handlers: | |
- name: start nginx | |
service: name=nginx state=started |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment