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

Commit

Permalink
Update node on all machines other than performance platform
Browse files Browse the repository at this point in the history
They still require the older version of node to run.
  • Loading branch information
NickColley authored and thomasleese committed Aug 18, 2017
1 parent 18b4ebe commit f0da226
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
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
4 changes: 3 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,6 +18,8 @@
$ensure = $version
}

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

package { 'nodejs':
ensure => $ensure,
}
Expand Down
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 beat 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 => '',
}
}

0 comments on commit f0da226

Please sign in to comment.