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

Commit

Permalink
Include is enough, and fail if parameter/class not found
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzdeee committed Sep 1, 2016
1 parent 88fb2cf commit b985f37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion manifests/extract.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,18 @@
$tar_command=undef,
) {

require ::archive::params
include ::archive::params

if $root_dir {
$extract_dir = "${target}/${root_dir}"
} else {
$extract_dir = "${target}/${name}"
}

if ! $tar_command and ! $::archive::params::tarcmd {
fail("${module_name}: parameter \$tar_command not specified and \$::archive::params::tarcmd not found")
}

if $tar_command {
$real_tar_command = $tar_command
} else {
Expand Down
2 changes: 0 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
) {

include ::archive::params
Class['archive::params'] ->
Archive[$name]

archive::download {"${name}.${extension}":
ensure => $ensure,
Expand Down

0 comments on commit b985f37

Please sign in to comment.