2014-11-18 08:24:39 -05:00
|
|
|
---
|
2015-05-15 23:53:54 -04:00
|
|
|
- name: install systems to help setup nodejs
|
2015-01-08 18:22:39 -05:00
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
2015-05-15 23:53:54 -04:00
|
|
|
- python-apt
|
2015-02-26 08:24:52 -05:00
|
|
|
- git
|
2015-05-15 23:53:54 -04:00
|
|
|
- apt-transport-https
|
|
|
|
|
|
|
|
- name: add the nodesource repository
|
|
|
|
apt_key: url=https://deb.nodesource.com/gpgkey/nodesource.gpg.key state=present
|
|
|
|
|
|
|
|
- name: add the nodesource binary repository
|
|
|
|
apt_repository: repo="deb https://deb.nodesource.com/node_0.12 {{ ansible_lsb.codename }} main"
|
|
|
|
state=present
|
|
|
|
|
|
|
|
- name: add the nodesource source repository
|
|
|
|
apt_repository: repo="deb-src https://deb.nodesource.com/node_0.12 {{ ansible_lsb.codename }} main"
|
|
|
|
state=present update_cache=yes
|
|
|
|
|
|
|
|
- name: install nodejs + npm
|
|
|
|
apt: pkg=nodejs state=present
|
2014-11-18 08:24:39 -05:00
|
|
|
|
2015-05-13 09:41:51 -04:00
|
|
|
- name: check if nodejs binary exists and needs linking to node binary
|
|
|
|
stat: path=/usr/bin/nodejs
|
|
|
|
register: nodejs_bin
|
|
|
|
|
2015-01-08 18:22:39 -05:00
|
|
|
- name: link nodejs binary correctly
|
|
|
|
file: src=/usr/bin/nodejs dest=/usr/bin/node state=link
|
2015-05-15 23:53:54 -04:00
|
|
|
when: nodejs_bin.stat.exists
|
2014-11-19 16:27:37 -05:00
|
|
|
|
2015-01-08 18:22:39 -05:00
|
|
|
- name: install coffeescript + less dependencies
|
2015-05-15 23:53:54 -04:00
|
|
|
npm: name={{ item }} global=yes state=present registry=http://registry.npmjs.org/
|
2015-01-08 18:22:39 -05:00
|
|
|
with_items:
|
|
|
|
- less
|
2015-05-13 09:41:51 -04:00
|
|
|
- browserify
|