On 10 July 2012 11:21, Jonathan Gazeley <jonathan.gaze...@bristol.ac.uk> wrote:
> Some of my facter variables are formatted as a comma-separated list of
> network interfaces, and of system disks. I wish to create separate Nagios
> checks for each. When I reference the variable like this, the individual
> entries from the list are not treated as an array, but as a concatenated
> string.
>
> notify{ [$diskdrives]: }
>
> So how can I get Puppet to treat each disk and network interface separately
> in the loop and generate multiple Nagios checks?


Use the split() function to split the string into an array:
http://docs.puppetlabs.com/references/stable/function.html#split

-- 
Erik Dalén

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to