如何访问 Puppet 模块中的 hiera 数据

How to access hiera data which is within a Puppet module

如果我创建一个简单的清单并访问系统定义的 hiera 数据,它工作正常

$testvar=hiera('some var defined at system level')
notify { "Hiera message is $testvar":}

但是,如果我尝试访问存储在某个模块(从 forge 下载)中的数据,它不会

include some_module_from_forge
$testvar=hiera('some var defined in the modules hiera')
notify { "Hiera message is $testvar":}

我做错了什么?

使用模块数据时使用 lookup("module::param") 而不是 hiera 函数。