ansible-role.nodejs

Node.js Ansible Rolle

Build Status Ansible Rolle : Node.js

Eine Ansible-Rolle, die Node.js mit dem Node Version Manager (NVM) auf Ubuntu/Debian installiert.

Rollenvariablen

Standardeinstellungen:

role_nodejs_nvm_version: v0.29.0
role_nodejs_nvm_user: "{{ ansible_ssh_user }}"
role_nodejs_nvm_destination: "/home/{{ role_nodejs_nvm_user }}/.nvm"
role_nodejs_version: 4.2.1

Beispiel-Playbook

Mit Standardeinstellungen:

- hosts: all
  roles:
    - ansible-role.nodejs

Für eine andere Node.js-Version:

- hosts: all
  roles:
    - role: ansible-role.nodejs
      role_nodejs_version: 0.12.7

Mit ausführbarem Pfad:

- hosts: all
  roles:
    - ansible-role.nodejs
  tasks:
    - name: Gulp installieren
      npm:
         name=gulp
         global=yes
         executable="{{ ROLE_NODEJS_EXCUTABLE_PATH }}/npm"
      become:
         yes
      become_user:
         "{{ ansible_ssh_user }}"

Mit Umgebungs-Pfad:

- hosts: all
  roles:
    - ansible-role.nodejs
  tasks:
    - name: Gulp installieren
      npm:
         name=gulp
         global=yes
      become:
         yes
      become_user:
         "{{ ansible_ssh_user }}"
      environment:
        PATH: "{{ ROLE_NODEJS_ENVIRONMENT_PATH }}"

Lizenz

MIT

Über das Projekt

An Ansible Role for installing Node.js

Installieren
ansible-galaxy install ansible-role.nodejs
GitHub Repository
Lizenz
Unknown
Downloads
391
Besitzer