Skip to content

Commit

Permalink
Add validation for nexus::version when using
Browse files Browse the repository at this point in the history
package_type => src
  • Loading branch information
zipkid committed Dec 6, 2023
1 parent 633851d commit 58eae38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

case $nexus::package_type {
'src': {
if !$nexus::version {
fail('nexus::version must be set when using package_type => src')
}
$nexus_archive = "nexus-${nexus::version}-unix.tar.gz"
$download_url = "${nexus::download_site}/${nexus_archive}"
$dl_file = "${nexus::download_folder}/${nexus_archive}"
Expand Down Expand Up @@ -68,7 +71,7 @@
ensure => directory,
owner => $nexus::user,
group => $nexus::group,
require => Archive[ $dl_file ]
require => Archive[$dl_file],
}
}
}
Expand Down

0 comments on commit 58eae38

Please sign in to comment.