Displaying 1 result from an estimated 1 matches for "array_elt".
Did you mean:
array_elem
2007 Jun 11
1
Thoughts on arrays and generic functions
...is really compact test harness for custom
functions!
Any thoughts anyone?
Cheers,
Derek
define clusterconf($members, $clustername, $clusterno,
$vips, $vipmasks, $loprinic, $hiprinic, $primarynic) {
$hostlist = array2string($members) # <-- Custom fn - join(" ")
$vip1 = array_elt($members, 0) # <-- Custom fn - return element
$mask1 = array_elt($vipmasks, 0)
file { llthosts:
owner => root,
group => root,
mode => 0644,
content => template("llthosts_conf"),
path => "/etc/llthosts"
}...