summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-31 17:54:44 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-31 17:54:44 -0200
commite5650c49d0fcc32218c70628b73ca5b3bca7b751 (patch)
tree7d2a4d5d49cda392a06b661c072676e103c76d0b /manifests
parent3a251fff7d3dd751adfb341a47fff044fcf4f42e (diff)
downloadpuppet-nodejs-e5650c49d0fcc32218c70628b73ca5b3bca7b751.tar.gz
puppet-nodejs-e5650c49d0fcc32218c70628b73ca5b3bca7b751.tar.bz2
Initial nodejs management
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp28
1 files changed, 28 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d2b5f4c..f5d5f32 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,2 +1,30 @@
+# See https://linuxconfig.org/how-to-install-nodejs-on-debian-9-stretch-linux
class nodejs {
+ file { '/etc/apt/trusted.gpg.d/nodesource.gpg':
+ ensure => present,
+ mode => '0644',
+ user => 'root',
+ group => 'root',
+ source => 'file:///puppet/modules/nodejs/nodesource.gpg',
+ }
+
+ file { '/usr/local/sbin/setup-nodejs-6.x':
+ ensure => present,
+ mode => '0755',
+ user => 'root',
+ group => 'root',
+ source => 'file:///puppet/modules/nodejs/setup_6.x.sh',
+ }
+
+ exec { 'setup-nodejs-6.x':
+ command => "",
+ user => "root",
+ creates => '/etc/apt/sources.list.d/nodesource.list',
+ require => File['/etc/apt/trusted.gpg.d/nodesource.gpg', '/usr/local/sbin/setup-nodejs-6.x' ],
+ }
+
+ package { [ 'nodejs', 'build-essential', 'libssl-dev' ]:
+ ensure => present,
+ require => Exec['setup-nodejs-6.x'],
+ }
}