3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'manifests/install/nodejs.pp', line 3
class ckan::install::nodejs {
# Install Node and NPM (which comes with Node)
# problems with Ubuntu 12.04
if $::operatingsystem == 'Ubuntu' and $::lsbdistrelease == '12.04' {
# less requires a compile of the css before changes take effect.
exec { 'Install Less and Nodewatch':
command => "/usr/bin/curl -sL https://deb.nodesource.com/setup | bash &&\
/usr/bin/apt-get update &&\
/usr/bin/apt-get install nodejs &&\
/usr/bin/npm install less nodewatch",
cwd => '/usr/lib/ckan/default/src/ckan',
creates => '/usr/lib/ckan/default/src/ckan/bin/less',
}
}else{
#class{'::nodejs':
# nodejs_debug_package_ensure => false,
# nodejs_dev_package_ensure => false,
# #nodejs_package_ensure => false,
# nodejs_package_ensure => true,
# manage_package_repo => false,
# npm_package_ensure => 'present',
# npm_package_name => 'npm',
#}
class{'::nodejs':
#nodejs_debug_package_ensure => false,
#nodejs_dev_package_ensure => false,
#nodejs_package_ensure => true,
#manage_package_repo => false,
#npm_package_ensure => 'present',
#npm_package_name => 'npm',
}
contain nodejs
nodejs::npm{'less':
target => '/usr/lib/ckan/default/src/ckan',
require => Class['::nodejs'],
}
nodejs::npm{'nodewatch':
target => '/usr/lib/ckan/default/src/ckan',
require => Nodejs::Npm['less'],
}
}
}
|