Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Puppet 4+ snippets
$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