Created
July 23, 2016 01:53
-
-
Save h0tw1r3/11863842809dee2c9226eef09ab88522 to your computer and use it in GitHub Desktop.
Puppet 4+ snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$facts['networking']['interfaces'].each() |$name, $values| { | |
$bindings = $values.filter |$key,$value| { | |
$key =~ /^bindings6?$/ | |
} | |
$bindings.each |$bindingtype,$addresses| { | |
$addresses.each |$value| { | |
notice( "${name} with ip ${value['address']}" ) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment