Hey there,
I have the following class that defines an array:
class iptables::hyperion {
system_ips [
'ip',
'ip',
'ip',
...
]
}
To use this variable in a template, I'm setting it to a 'local'
variable in the node definition:
node 'mynode' inherits basenode {
include iptables::hyperion
$system_ips = $iptables::hyperion::system_ips
class { iptables:
fragments => [ 'hyperion.erb']
}
}
I can then access and use $system_ips in a template for that node (in
this case, 'hyperion.erb'). Does this fit a common pattern? I know
that in a template you can use 'scope.lookupvar('var')'. Should I be
using said function in the template to access
$iptables::hyperion::system_ips, instead of reassigning it in the node
definition?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.