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 fa5308e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions 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 @@ -64,11 +67,11 @@
"${nexus::work_dir}/tmp",
]

file{ $directories:
file { $directories:
ensure => directory,
owner => $nexus::user,
group => $nexus::group,
require => Archive[ $dl_file ]
require => Archive[$dl_file],
}
}
}
Expand Down

0 comments on commit fa5308e

Please sign in to comment.