Configure task to install npm modules

There is a specific module for installing npm modules that should be used
instead of the shell module.
This commit is contained in:
Aleksey Zalesov 2018-02-24 14:12:41 +03:00
parent fa9ac3c00b
commit c5a15c5745
5 changed files with 17 additions and 8 deletions

View File

@ -36,7 +36,8 @@
- file: path={{ home }}/chain-explorer owner={{ username }} group={{ username }} recurse=yes - file: path={{ home }}/chain-explorer owner={{ username }} group={{ username }} recurse=yes
- name: install npm chain_explorer - name: install npm chain_explorer
shell: "cd /home/{{ username }}/chain-explorer; /usr/bin/npm install" npm:
path: "/home/{{ username }}/chain-explorer"
become: true become: true
become_user: "{{ username }}" become_user: "{{ username }}"
notify: notify:

View File

@ -39,16 +39,19 @@
- file: path={{ home }}/poa-scripts-moc owner={{ username }} group={{ username }} recurse=yes - file: path={{ home }}/poa-scripts-moc owner={{ username }} group={{ username }} recurse=yes
- name: install npm initial_keys_script - name: install npm initial_keys_script
shell: "cd {{ home }}/poa-scripts-moc; /usr/bin/npm install" npm:
path: "{{ home }}/poa-scripts-moc"
become: true become: true
become_user: "{{ username }}" become_user: "{{ username }}"
- name: install npm generateInitialKey - name: install npm generateInitialKey
shell: "cd {{ home }}/poa-scripts-moc/generateInitialKey; /usr/bin/npm install" npm:
path: "{{ home }}/poa-scripts-moc/generateInitialKey"
become: true become: true
become_user: "{{ username }}" become_user: "{{ username }}"
- name: install npm distributeTokens - name: install npm distributeTokens
shell: "cd {{ home }}/poa-scripts-moc/distributeTokens; /usr/bin/npm install" npm:
path: "{{ home }}/poa-scripts-moc/distributeTokens"
become: true become: true
become_user: "{{ username }}" become_user: "{{ username }}"

View File

@ -12,14 +12,17 @@
- file: path={{ home }}/eth-netstats owner={{ username }} group={{ username }} recurse=yes - file: path={{ home }}/eth-netstats owner={{ username }} group={{ username }} recurse=yes
- name: install npm netstats - name: install npm netstats
shell: "cd /home/{{ username }}/eth-netstats; /usr/bin/npm install" npm:
path: "/home/{{ username }}/eth-netstats"
become: true become: true
become_user: "{{ username }}" become_user: "{{ username }}"
notify: notify:
- restart poa-dashboard - restart poa-dashboard
- name: install npm grunt-cli - name: install npm grunt-cli
shell: "cd /home/{{ username }}/eth-netstats; /usr/bin/npm install -g grunt-cli" npm:
name: grunt-cli
global: yes
- name: run grunt process - name: run grunt process
shell: "cd /home/{{ username }}/eth-netstats; grunt" shell: "cd /home/{{ username }}/eth-netstats; grunt"

View File

@ -25,7 +25,8 @@
- file: path={{ home }}/eth-net-intelligence-api owner={{ username }} group={{ username }} recurse=yes - file: path={{ home }}/eth-net-intelligence-api owner={{ username }} group={{ username }} recurse=yes
- name: install npm netstats - name: install npm netstats
shell: "cd /home/{{ username }}/eth-net-intelligence-api; /usr/bin/npm install" npm:
path: "/home/{{ username }}/eth-net-intelligence-api"
become: true become: true
become_user: "{{ username }}" become_user: "{{ username }}"
notify: notify:

View File

@ -41,7 +41,8 @@
- file: path={{ home }}/poa-scripts-validator owner={{ username }} group={{ username }} recurse=yes - file: path={{ home }}/poa-scripts-validator owner={{ username }} group={{ username }} recurse=yes
- name: install npm transferRewardToPayoutKey - name: install npm transferRewardToPayoutKey
shell: "cd {{ home }}/poa-scripts-validator/transferRewardToPayoutKey; /usr/bin/npm install" npm:
path: "{{ home }}/poa-scripts-validator/transferRewardToPayoutKey"
become: true become: true
become_user: "{{ username }}" become_user: "{{ username }}"
notify: notify: