Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
define hostentries($hash){

    host { "${name}" :
      ip           => $hash[$name][ipaddress],
      host_aliases => $hash[$name][shorthost],
      ensure       => $hash[$name][ensure],
    }

  }

  $hash_keys = hash_keys($bb_hosts::params::hosts)

  hostentries { $hash_keys: hash => $bb_hosts::params::hosts}