Skip to content

Instantly share code, notes, and snippets.

@kwilczynski
Created April 23, 2011 15:09
Show Gist options
  • Save kwilczynski/938684 to your computer and use it in GitHub Desktop.
Save kwilczynski/938684 to your computer and use it in GitHub Desktop.
Testing join function within Puppet manifest file ...
krzysztof@samsung ~/Sandbox $ cat - | LOAD_PATH=. FACTERLIB=. puppet
define iterator {
notice $name
}
$array = ['a', 'b', 'c']
$result = split(join($array, ',', 'letter_'), ',')
notice $result
iterator { $result: }
notice: Scope(Class[main]): letter_a letter_b letter_c
notice: Scope(Iterator[letter_a]): letter_a
notice: Scope(Iterator[letter_b]): letter_b
notice: Scope(Iterator[letter_c]): letter_c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment