-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnodejs.install.ansible.yml
More file actions
54 lines (44 loc) · 1.26 KB
/
nodejs.install.ansible.yml
File metadata and controls
54 lines (44 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
- hosts: all
gather_facts: no
collections:
- ibm.openshift
vars:
checkout_dir: '/usr/src/app'
tasks:
- name: run the CL command to create a library
ibmi_cl_command:
cmd: CHGUSRPRF USRPRF(NODDEV) STATUS(*ENABLED)
register: chg_usr_result
- name: Install Node js
command: yum install nodejs10 -y
ignore_errors: True
- name: verify git has been installed
stat:
path: /usr/bin/git
register: git_stat
- name: Install git if it is not there
command: yum install git -y
when: git_stat.stat.exists == false
- name: upgrade yum
command: yum upgrade -y
- name: set http.sslVerify for git
command: 'git config --global http.sslVerify false'
ignore_errors: true
- name: clone repo
git:
repo: 'https://github.com/CoreHive/redhatchallenge.git'
dest: '{{ checkout_dir }}'
- name: npm i
shell: "(npm i --scripts-prepend-node-path)"
args:
warn: False
chdir: '{{ checkout_dir }}/node_modules/patient360'
executable: /usr/bin/sh
- name: Start the demo application
shell: "(nohup node index.js >/dev/null 2>&1 &)"
args:
warn: False
chdir: '{{ checkout_dir }}/node_modules/patient360'
executable: /usr/bin/sh
async: 10%