Excuse my newbieness, but I'm having a basic misunderstanding regarding 
loops.

Say I have: joesfriends = jack, sam, sally

I need to add each entry into a file - one per line.

$joesfriends.each | String $joesfriends| {    # loop

  file { "/etc/list_of_joes_friends":    

    line => "${joesfriends}"

  }

}



This fails on a duplicate declaration error....but how can there not be a 
duplicate, it's a loop? The examples in the docs avoid this particular 
situation by using the var in the filename, but that's not usually going to 
be an option.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/220aaba3-2cc4-4338-b575-349b8397f694%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to