Skip to content

Commit

Permalink
replace hiera_hash with lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hollinger authored and dhollinger committed Sep 12, 2017
1 parent 1830e9a commit 7b1e233
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions manifests/init.pp
Expand Up @@ -86,11 +86,15 @@
}

if $mounts {
$data = hiera_hash('autofs::mounts', $mounts)
create_resources('autofs::mount', $data)
lookup('autofs::mounts', { default_value => $mounts, merge => hash })
.each |String $mount, Hash $attributes| {
autofs::mount { $mount: * => $attributes }
}
}
if $maps {
$_datamaps = hiera_hash('autofs::maps', $maps)
create_resources('autofs::map',$_datamaps)
lookup('autofs::mount', { default_value => $maps, merge => hash })
.each |String $map, Hash $attributes| {
autofs::map { $map: * => $attributes }
}
}
}

0 comments on commit 7b1e233

Please sign in to comment.