How can I pass an array to a define? It's not documented in the puppet
language guide.
I've got:
define lvm::create_vg ( $pvdisks ) {
exec {
'pvcreate':
command => "/sbin/pvcreate -yf $pvdisks",
unless => "/sbin/pvdisplay $pvdisks",
...
}
}
class someclass {
lvm::create_vg {
'bcvg01':
pvdisks => ['/dev/xvdb1', '/dev/xvdc1'];
}
}
Inside the define, $pvdisks gets expanded to '/dev/xvdb1/dev/xvdc1'
Doug.
--
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.