summaryrefslogtreecommitdiffstats
path: root/manifests/profile
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2016-08-15 15:28:23 -0400
committerEmilien Macchi <emilien@redhat.com>2016-08-15 19:24:32 -0400
commit8b0e7d45261c8305d33effb3ccf83df7e5710515 (patch)
treebaa94454ec41dacbb710629a50ec1aba833471e7 /manifests/profile
parent6e9c1f50a3b0c17854663a81d19a788e241257d6 (diff)
Defaults empty hash to kernel_modules and sysctl_settings
Set empty hash by default to kernel_modules and sysctl_settings so catalog won't fail if the parameters are not set in Hiera. Change-Id: I24ab535b01e2724af457d39c03cd990c574ef0aa
Diffstat (limited to 'manifests/profile')
-rw-r--r--manifests/profile/base/kernel.pp10
1 files changed, 7 insertions, 3 deletions
diff --git a/manifests/profile/base/kernel.pp b/manifests/profile/base/kernel.pp
index db0280f..df13a98 100644
--- a/manifests/profile/base/kernel.pp
+++ b/manifests/profile/base/kernel.pp
@@ -19,8 +19,12 @@
#
class tripleo::profile::base::kernel {
- create_resources(kmod::load, hiera('kernel_modules'), { })
- create_resources(sysctl::value, hiera('sysctl_settings'), { })
- Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
+ if hiera('kernel_modules', undef) {
+ create_resources(kmod::load, hiera('kernel_modules'), { })
+ }
+ if hiera('sysctl_settings', undef) {
+ create_resources(sysctl::value, hiera('sysctl_settings'), { })
+ }
+ Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
}