Skip to content

Commit

Permalink
fix bug when disabling package management
Browse files Browse the repository at this point in the history
  • Loading branch information
theosotr committed Feb 13, 2019
1 parent 32f3a0f commit d1b2326
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
Boolean $_manage_top_dirs = true,
Boolean $test_before_deploy = true
) {
# package
if $manage_package {
if is_string($package_name) {
$real_package_name = $package_name
} else {
case $::osfamily {
'RedHat': { $real_package_name = 'syslog-ng' }
'Debian': { $real_package_name = 'syslog-ng-core' }
default: { fail("unsupported osfamily: ${::osfamily}") }
}
# package
if is_string($package_name) {
$real_package_name = $package_name
} else {
case $::osfamily {
'RedHat': { $real_package_name = 'syslog-ng' }
'Debian': { $real_package_name = 'syslog-ng-core' }
default: { fail("unsupported osfamily: ${::osfamily}") }
}
}
if $manage_package {
ensure_resource ( 'package', $real_package_name, { 'ensure' => 'installed' })
}
ensure_resource ( 'file', $temp_dir, { ensure => directory } )
Expand Down Expand Up @@ -64,4 +64,3 @@
include patterndb::hiera
}
}

0 comments on commit d1b2326

Please sign in to comment.