Auditd: Replace hiera by lookup

The hiera function is deprecated and does not work with the latest
hieradata version 5. It should be replaced by the new lookup
function[1].

[1] https://puppet.com/docs/puppet/7/hiera_automatic.html

With the lookup function, we can define value type and merge behavior,
but these are kept default at this moment to limit scope of this change
to just simple replacement. Adding value type might be useful to make
sure the value is in expected type (especially when a boolean value is
expected), but we will revisit that later.

example:
lookup(<NAME>, [<VALUE TYPE>], [<MERGE BEHAVIOR>], [<DEFAULT VALUE>])

Change-Id: I7ed44c0bf759338ea7c3759ed6f5cd3903d320c2
This commit is contained in:
Takashi Kajinami 2022-05-26 14:18:54 +09:00
parent 040b0c9d59
commit a0b8bfe328
1 changed files with 2 additions and 2 deletions

View File

@ -19,10 +19,10 @@
# === Parameters
#
# [*step*]
# Defaults to hiera('step')
# Defaults to lookup('step')
#
class tripleo::profile::base::auditd (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
) {
if $step >= 4 {
include auditd