You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Puppet Documentation suggests that it is possible to access variables from module ERB templates via the scope['variable_name'] syntax. It is unclear whether that only works for module variables, eg:
classmodule_name {
$var1 = 3 # This works
}
or also for hiera-defined variables, eg in module_name/data/common.yaml:
I have tried scope['var1'], scope.lookupvar( <full and short name>0, etc.
I can only resolve the value in a template if it is defined as an explicit variable in the manifest, eg: $var1 = $module_name::var1
The text was updated successfully, but these errors were encountered:
Describe the Bug
Puppet Documentation suggests that it is possible to access variables from module ERB templates via the
scope['variable_name']
syntax. It is unclear whether that only works for module variables, eg:or also for hiera-defined variables, eg in
module_name/data/common.yaml
:Expected Behavior
This ERB template should work:
Steps to Reproduce
Steps to reproduce the behavior:
Create a puppet module with the following files:
Environment
Additional Context
I have tried
scope['var1']
,scope.lookupvar( <full and short name>0
, etc.I can only resolve the value in a template if it is defined as an explicit variable in the manifest, eg:
$var1 = $module_name::var1
The text was updated successfully, but these errors were encountered: