Hi group,
Im trying to do something with to arrays:
array1 = ['name1', 'name2']
array2 = ['port1', 'port2']
The arrays has the same number of elements and what i want to do it is passing to a define function:
instances { $array1:; $array2:; }
The instances define does something simple:
define instances ( $name, $port ) {
file { "${name}":
ensure => present,
path => "/path/${port}"
}
}
I thing im missing something about iteration with define function because puppet say:
Error 400 on SERVER: Must pass name to Instances[name1]
Could somebody tell me what im doing wrong or point to me in the correct direction?¿
Thanks and cheers