From b976c694c4155ad8a7cf2ed98de85162077c8def Mon Sep 17 00:00:00 2001 From: Benedikt Trefzer Date: Wed, 13 Sep 2023 11:57:03 +0200 Subject: [PATCH] hash merge the mollyguard::checks parameter by default --- REFERENCE.md | 3 ++- data/common.yaml | 7 +++++++ hiera.yaml | 10 ++++++++++ manifests/init.pp | 3 ++- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 data/common.yaml create mode 100644 hiera.yaml diff --git a/REFERENCE.md b/REFERENCE.md index 76faf21..7d2e19d 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -53,7 +53,8 @@ Default value: `['molly-guard']` Data type: `Hash` -Hash of additional checks to install, defaults to {} +Hash of additional checks to install, defaults to {}. +This parameter is hiera hash merged by default. Example (hiera): mollyguard::checks: diff --git a/data/common.yaml b/data/common.yaml new file mode 100644 index 0000000..c3c1a69 --- /dev/null +++ b/data/common.yaml @@ -0,0 +1,7 @@ +--- +# common settings for puppet-mollyguard +# + +lookup_options: + mollyguard::checks: + merge: 'hash' diff --git a/hiera.yaml b/hiera.yaml new file mode 100644 index 0000000..66a2f56 --- /dev/null +++ b/hiera.yaml @@ -0,0 +1,10 @@ +--- +version: 5 + +defaults: + datadir: 'data' + data_hash: 'yaml_data' + +hierarchy: + - name: 'common' + path: 'common.yaml' diff --git a/manifests/init.pp b/manifests/init.pp index 8eac8b4..906f3fe 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,7 +5,8 @@ # @param packages # Array of packages to install, defaults to ['molly-guard'] # @param checks -# Hash of additional checks to install, defaults to {} +# Hash of additional checks to install, defaults to {}. +# This parameter is hiera hash merged by default. # # Example (hiera): # mollyguard::checks: