2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-08 00:04:38 +00:00

Merge pull request #689 from codingCoffee/node

modify node install
This commit is contained in:
Ameya Shenoy 2018-07-03 14:15:50 +05:30 committed by GitHub
commit b7b03e6ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 30 deletions

View File

@ -1,7 +1,5 @@
language: python
dist: trusty
group: deprecated-2017Q2
sudo: required
python:
- "2.7"

View File

@ -0,0 +1,3 @@
---
node_version: 8
...

View File

@ -1,17 +1,5 @@
---
- name: Add apt key for node repo
apt_key:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
id: "68576280"
state: present
- name: Add repo
apt_repository:
repo: "deb [arch=amd64,i386] https://deb.nodesource.com/node_8.x {{ ansible_distribution_release }} main"
state: present
register: node_repo
- name: Install nodejs 8.x
- name: Install nodejs {{ node_version }}
apt:
name: nodejs
state: present

View File

@ -1,6 +1,12 @@
---
# Install's prerequisites, like fonts, image libraries, vim, screen, python-dev and gcc
- name: 'Add Node.js PPA'
tags: 'nodejs'
become: 'yes'
become_method: 'sudo'
shell: "curl --silent --location https://deb.nodesource.com/setup_{{ node_version }}.x | bash -"
- include_tasks: debian_family.yml
when: ansible_os_family == 'Debian'

View File

@ -1,18 +1,5 @@
---
- name: Import Node source RPM key
rpm_key:
key: https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
state: present
when: ansible_os_family == 'RedHat'
- name: Add Node Repo for RedHat
yum:
name: 'https://rpm.nodesource.com/pub_8.x/el/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/nodesource-release-el{{ ansible_distribution_major_version }}-1.noarch.rpm'
state: present
update_cache: yes
when: ansible_os_family == 'RedHat'
- name: Install node v8
- name: Install node v{{ node_version }}
yum: name=nodejs state=present
when: ansible_os_family == 'RedHat'
...

View File

@ -7,6 +7,7 @@
roles:
- { role: common, tags: common }
- { role: locale, tags: locale }
- { role: nodejs, tags: nodejs }
- { role: swap, tags: swap, when: production }
- { role: logwatch, tags: logwatch, when: production }
- { role: bash_screen_wall, tags: bash_screen_wall, when: production }
@ -15,7 +16,6 @@
- { role: ntpd, tags: ntpd, when: production }
- { role: mariadb, tags: mariadb }
- { role: wkhtmltopdf, tags: wkhtmltopdf }
- { role: nodejs, tags: nodejs }
- { role: psutil, tags: psutil }
- { role: redis, tags: redis }
- { role: supervisor, tags: supervisor, when: production }