Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Update node #6314

Merged
merged 1 commit into from
Aug 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hieradata/class/performance_backend.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---

nodejs::version: '0.10.37-1chl1~%{::lsbdistcodename}1'

govuk::node::s_base::apps:
- performanceplatform_admin
2 changes: 2 additions & 0 deletions hieradata/class/performance_frontend.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---

nodejs::version: '0.10.37-1chl1~%{::lsbdistcodename}1'

govuk::node::s_base::apps:
- performanceplatform_big_screen_view
- spotlight
3 changes: 2 additions & 1 deletion hieradata/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,8 @@ mysql::client::package_ensure: 'present'

nginx::package::version: '1.4.6-1ubuntu3.8'

nodejs::version: '0.10.37-1chl1~%{::lsbdistcodename}1'
nodejs::repo::apt_mirror_hostname: "%{hiera('apt_mirror_hostname')}"
nodejs::version: '6.11.2-1nodesource1~%{::lsbdistcodename}1'

ntp::server_list:
- 'ntp.ubuntu.com'
Expand Down
3 changes: 2 additions & 1 deletion hieradata_aws/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,8 @@ mysql::client::package_ensure: 'present'
nginx::package::nginx_package: 'nginx-extras'
nginx::package::version: '1.4.6-1ubuntu3.8'

nodejs::version: '0.10.37-1chl1~%{::lsbdistcodename}1'
nodejs::repo::apt_mirror_hostname: "%{hiera('apt_mirror_hostname')}"
nodejs::version: '6.11.2-1nodesource1~%{::lsbdistcodename}1'

ntp::server_list:
- 'ntp.ubuntu.com'
Expand Down
5 changes: 4 additions & 1 deletion modules/nodejs/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Default: `undef`
#
class nodejs(
$version = undef
$version = undef,
) {

if $version == undef {
Expand All @@ -18,7 +18,10 @@
$ensure = $version
}

class { '::nodejs::repo': }

package { 'nodejs':
ensure => $ensure,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a dependency for the repo:
require => Class['Nodejs::Repo'],

require => Class['Nodejs::Repo'],
}
}
20 changes: 20 additions & 0 deletions modules/nodejs/manifests/repo.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# == Class: nodejs::repo
#
# Use our own mirror of the nodejs repo. Should be used with `manage_repo`
# disable of the upstream module.
#
# === Parameters
#
# [*apt_mirror_hostname*]
# Hostname to use for the APT mirror.
#
class nodejs::repo(
$apt_mirror_hostname = undef,
) {
apt::source { 'nodejs':
location => "http://${apt_mirror_hostname}/nodejs",
release => $::lsbdistcodename,
architecture => $::architecture,
key => '3803E444EB0235822AA36A66EC5FE1A937E3ACBB',
}
}