mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
[Fix] Updated ansible to install node 5 using install script
This commit is contained in:
parent
0f0a01efc4
commit
be1f23a602
@ -1,3 +1,4 @@
|
||||
bench.patches.v3.deprecate_old_config
|
||||
bench.patches.v3.celery_to_rq
|
||||
bench.patches.v3.redis_bind_ip
|
||||
bench.patches.v4.update_node
|
||||
|
0
bench/patches/v4/__init__.py
Normal file
0
bench/patches/v4/__init__.py
Normal file
12
bench/patches/v4/update_node.py
Normal file
12
bench/patches/v4/update_node.py
Normal file
@ -0,0 +1,12 @@
|
||||
import click, subprocess, sys
|
||||
from semantic_version import Version
|
||||
|
||||
def execute(bench_path):
|
||||
expected_node_ver = Version('5.0.0')
|
||||
|
||||
result = subprocess.check_output(['node', '-v'])
|
||||
node_ver = Version(result.rstrip('\n').lstrip('v'))
|
||||
|
||||
if node_ver < expected_node_ver:
|
||||
click.echo('\nPlease update node version to 5.x before running the "bench update"\n\n')
|
||||
sys.exit(1)
|
@ -19,8 +19,6 @@
|
||||
with_items:
|
||||
# basic installs
|
||||
- redis
|
||||
- nodejs
|
||||
- npm
|
||||
|
||||
# for mariadb
|
||||
- mysql-devel
|
||||
@ -45,6 +43,22 @@
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Add repo nodejs 5
|
||||
yum:
|
||||
name: https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Install nodejs v5
|
||||
yum: name={{ item }} state=present
|
||||
with_items:
|
||||
- nodejs
|
||||
- npm
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
# install MariaDB
|
||||
- include: includes/mariadb_centos.yml
|
||||
|
||||
|
@ -16,8 +16,6 @@
|
||||
# basic installs
|
||||
- build-essential
|
||||
- redis-server
|
||||
- nodejs
|
||||
- npm
|
||||
|
||||
# for mariadb
|
||||
- software-properties-common
|
||||
@ -59,6 +57,21 @@
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Add nodejs v5 repo
|
||||
shell: 'curl -sL https://deb.nodesource.com/setup_5.x'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Update and Install Node v5
|
||||
apt: name={{ item }} state=present update_cache=yes force=yes
|
||||
with_items:
|
||||
- nodejs
|
||||
- npm
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
# install MariaDB
|
||||
- include: includes/mariadb_ubuntu.yml
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user