, , , npm . , npm , , npm. , npm config save-dev .
, apache npm ( npm bower).
(, , , yum , , npm).
- name: Setup NPM HTTP Proxy
become: True
command: npm config set proxy "{{http_proxy}}"
when: (http_proxy is defined) and (not http_proxy == '') and (node_modules.stat.exists == False)
- name: Clear NPM HTTP Proxy Setting
become: True
command: npm config rm proxy
when: (http_proxy is defined) and (http_proxy == '') and (node_modules.stat.exists == False)
- name: Setup NPM HTTPS Proxy
become: True
command: npm config set https-proxy "{{https_proxy}}"
when: (https_proxy is defined) and (not https_proxy == '') and (node_modules.stat.exists == False)
- name: Clear NPM HTTPS Proxy Setting
become: True
command: npm config rm https-proxy
when: (https_proxy is defined) and (https_proxy == '') and (node_modules.stat.exists == False)
- name: Disable NPM strict SSL mode
become: True
command: npm config set strict-ssl false
when: (http_proxy is defined) and (not http_proxy == '') and (node_modules.stat.exists == False)
- name: Clear NPM strict SSL mode Setting (if no http_proxy)
become: True
command: npm config rm strict-ssl
when: (http_proxy is defined) and (http_proxy == '') and (node_modules.stat.exists == False)
- name: Setup NPM to use http:// version of the registry
become: True
command: npm config set registry "http://registry.npmjs.org/"
when: (http_proxy is defined) and (not http_proxy == '') and (node_modules.stat.exists == False)
- name: Install Bower
become: True
shell: >
umask 022; npm install bower chdir=/usr/local/lib
when: node_modules.stat.exists == False
,