Skip to content

Commit

Permalink
Fix nodejs dev package name for Ubuntu 20.04
Browse files Browse the repository at this point in the history
Fixes GH-421
  • Loading branch information
cliffano authored and mmoll committed May 1, 2020
1 parent af1ba04 commit ed60516
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
docker_sets:
- set: ubuntu1604-64
- set: ubuntu1804-64
- set: ubuntu2004-64
- set: centos7-64
- set: centos8-64
- set: debian8-64
Expand Down
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ matrix:
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu2004-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ This module has received limited testing on:

* CentOS/RHEL 6/7/8
* Debian 8
* Ubuntu 16.04/18.04
* Ubuntu 16.04/18.04/20.04

The following platforms should also work, but have not been tested:

Expand Down
11 changes: 11 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@
$npm_path = '/usr/bin/npm'
$repo_class = '::nodejs::repo::nodesource'
}
elsif $facts['os']['release']['full'] =~ /^20\.04$/ {
$manage_package_repo = true
$nodejs_debug_package_name = 'nodejs-dbg'
$nodejs_dev_package_name = 'libnode-dev'
$nodejs_dev_package_ensure = 'absent'
$nodejs_package_name = 'nodejs'
$npm_package_ensure = 'absent'
$npm_package_name = 'npm'
$npm_path = '/usr/bin/npm'
$repo_class = '::nodejs::repo::nodesource'
}
else {
warning("The ${module_name} module might not work on ${facts['os']['name']} ${facts['os']['release']['full']}. Sensible defaults will be attempted.")
$manage_package_repo = true
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"16.04",
"18.04"
"18.04",
"20.04"
]
}
],
Expand Down

0 comments on commit ed60516

Please sign in to comment.