Skip to content

Instantly share code, notes, and snippets.

@ahpook
Last active November 24, 2015 18:23
Show Gist options
  • Save ahpook/ca883d59d73f6d802777 to your computer and use it in GitHub Desktop.
Save ahpook/ca883d59d73f6d802777 to your computer and use it in GitHub Desktop.
puppet reduce
$args = { msg => 'hello', voice => 'Moira', third => 'whatever' }
$argstring = $args.map |$value| {
"${value[0]}=${value[1]}"
}.join(" ")
notice("arg string is: [$argstring]")
[vagrant@deglitch tests]$ puppet apply ./init.pp
Notice: Scope(Class[main]): arg string is: [msg=hello voice=Moira third=whatever]
Notice: Compiled catalog for deglitch.vmlocal in environment production in 0.29 seconds
Notice: Applied catalog in 0.02 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment