Skip to content

Instantly share code, notes, and snippets.

@hciudad
Last active October 15, 2019 23:32
Show Gist options
  • Save hciudad/c590bd74095c8c4c231c to your computer and use it in GitHub Desktop.
Save hciudad/c590bd74095c8c4c231c to your computer and use it in GitHub Desktop.
Puppet manifest to install node and npm from nodesource, then gulp with npm
exec { 'Add nodesource sources':
command => 'curl -sL https://deb.nodesource.com/setup | sudo bash -',
creates => '/etc/apt/sources.list.d/nodesource.list',
path => ['/usr/bin', '/bin', '/usr/sbin'];
}
package { 'nodejs':
ensure => 'present',
require => Exec['Add nodesource sources'];
}
exec { 'npm install --global gulp':
creates => '/usr/bin/gulp',
path => ['/usr/bin', '/bin', '/usr/sbin'],
require => Package['nodejs'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment