#essay{:title        "How to Update NodeJS with SaltStack",       :date         #inst "2014-02-07",       :reading-time "1 min"}

How to Update NodeJS with SaltStack

2014-02-07 · 1 min read ·

You may have to deal with an ancient version of NodeJS (0.6.2) when using Vagrant to provision a clean precise64 box running Ubuntu 12.04 LTS.

Getting Saltstack to update NodeJS will result in hair loss and hurling of faeces unless you put the following in your node.sls Salt State File:

nodejs:
    pkgrepo:
    - managed
    - ppa: chris-lea/node.js
    - require_in:
        - pkg: nodejs
    pkg:
        - latest
        

and in top.sls:

base:
  '*':
    - node
    

This will update your Ubuntu VM to the latest NodeJS using SaltStack provisioning.