Skip to content

Instantly share code, notes, and snippets.

@ripienaar
Created April 15, 2015 09:38
Show Gist options
  • Select an option

  • Save ripienaar/8fcd7a22f20ce995f485 to your computer and use it in GitHub Desktop.

Select an option

Save ripienaar/8fcd7a22f20ce995f485 to your computer and use it in GitHub Desktop.
$ips = ["1.2.3.4", "5.6.7.8"]
define print { notify{$name: } }
$a = map($ips) |$ip| { "http://${ip}:12900/" }
print{$a: }
% puppet apply test.pp --parser=future
Notice: Compiled catalog for devco.net in environment production in 0.70 seconds
Notice: http://1.2.3.4:12900/
Notice: /Stage[main]/Main/Print[http://1.2.3.4:12900/]/Notify[http://1.2.3.4:12900/]/message: defined 'message' as 'http://1.2.3.4:12900/'
Notice: http://5.6.7.8:12900/
Notice: /Stage[main]/Main/Print[http://5.6.7.8:12900/]/Notify[http://5.6.7.8:12900/]/message: defined 'message' as 'http://5.6.7.8:12900/'
Notice: Finished catalog run in 0.03 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment