Skip to content

Commit

Permalink
add version param
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Jul 31, 2024
1 parent 70340c9 commit e458040
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The following parameters are available in the `smee` class:
* [`exec_start`](#-smee--exec_start)
* [`path`](#-smee--path)
* [`port`](#-smee--port)
* [`version`](#-smee--version)

##### <a name="-smee--url"></a>`url`

Expand Down Expand Up @@ -65,3 +66,11 @@ Local HTTP server port.

Default value: `3000`

##### <a name="-smee--version"></a>`version`

Data type: `String`

Version of the smee-client package to install.

Default value: `'2.0.0'`

6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
# @param port
# Local HTTP server port.
#
# @param version
# Version of the smee-client package to install.
#
class smee (
Stdlib::HTTPSUrl $url,
Array[String] $packages,
Stdlib::Absolutepath $binary,
Stdlib::Absolutepath $exec_start,
String $path = '/',
Integer $port = 3000,
String $version = '2.0.0',
) {
ensure_packages($packages)

Expand All @@ -44,7 +48,7 @@

exec { 'install-smee':
creates => $binary,
command => 'npm install --global smee-client',
command => "npm install --global smee-client@${version}",
subscribe => Package[$packages],
path => [
'/opt/rh/rh-nodejs10/root/usr/bin', # needed for EL7
Expand Down

0 comments on commit e458040

Please sign in to comment.