Ask Your Question

Revision history [back]

each returns the values it iterates over _unchanged_, where map returns the data with the applied changes:

$all_keys = hiera('rootkeys')

$ssh_values = $all_keys.map | $uid | {
  $uid['pubkey']
}

notify { "${ssh_values}": }

more on lambdas in the documentation