[英]Access parameter from a resource defined using create_resources
我想知道是否可以從使用create_resources函數實例化的類中訪問參數。 我想在其他類中使用該參數來有條件地安裝某些東西。
這是我的情況:
define myResource($myParam) { ... }
create_resources(myResource, $hashResources)
$hashResources = { "MyResource1" : { "myParam" : 1 },
"MyResource2" : { "myParam" : 2 }
}
myFancyPuppetClass($nameOfResource) {
if(******myParam from the resource defined with name $nameOfResource in the same catalog******) { ... }
}
這可能嗎? 如果是,我該怎么做? 謝謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.