install nodejs. (5, 6, 7, 8)
- Ubuntu 14.04, 16.04
- CentOS 6, 7
- ansible >= 2.4
- python >= 2.6
- npm_user: (Default: www-data)
- npm_user_home_path: (Default: "/var/www/")
- nodejs_version (Default: 8)
- install_packages (非必填,如希望一併 global install nodejs package 才須設置。)
使用方式請參考範例。
none.
- name: ansibel-role-nodejs.yml
hosts: your_host
gather_facts: yes
become: yes
vars:
nodejs_version: 6
install_packages:
- gulp
- bower
- laravel-echo-server
roles:
- ansibel-role-nodejs
MIT