2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 00:37:51 +00:00

changed node version install from 6 to 8

- broken down the node install into multiple parts based on OS
- change the default node version to be installed from 6 to 8
This commit is contained in:
Ameya Shenoy 2018-03-22 18:19:51 +05:30
parent 12f93976d0
commit 348e38f37a
No known key found for this signature in database
GPG Key ID: 735490161CD5C91E
3 changed files with 48 additions and 37 deletions

View File

@ -0,0 +1,23 @@
---
- 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
when: ansible_os_family == 'Debian'
- 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
when: ansible_os_family == 'Debian'
- name: Install nodejs 8.x
apt:
name: nodejs
state: present
update_cache: yes
force: yes
when: ansible_os_family == 'Debian'
...

View File

@ -1,44 +1,14 @@
---
- 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'
# Install's prerequisites, like fonts, image libraries, vim, screen, python-dev and gcc
- name: Add Node Repo for RedHat
yum:
name: 'https://rpm.nodesource.com/pub_6.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'
- include_tasks: debian_family.yml
when: ansible_os_family == 'Debian'
- name: Install node v6
yum: name=nodejs state=present
when: ansible_os_family == 'RedHat'
- 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
when: ansible_os_family == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Add repo
apt_repository:
repo: "deb [arch=amd64,i386] https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
state: present
register: node_repo
when: ansible_os_family == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Install nodejs 6.x
apt:
name: nodejs
state: present
update_cache: yes
force: yes
when: ansible_os_family == 'Debian' or ansible_distribution == 'Ubuntu'
- include_tasks: redhat_family.yml
when: ansible_os_family == "RedHat"
- name: Install yarn
command: npm install -g yarn
become: yes
become_user: root
become_user: root
...

View File

@ -0,0 +1,18 @@
---
- 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
yum: name=nodejs state=present
when: ansible_os_family == 'RedHat'
...