Skip to content

Commit

Permalink
Replace filter by Hash in nfs::client
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Dec 21, 2023
1 parent 08b7c5b commit bfd5209
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/profile/manifests/nfs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}

$instances = lookup('terraform.instances')
$nfs_server = keys($instances.filter| $key, $values | { $values['local_ip'] == $server_ip })[0]
$nfs_server = Hash($instances.map| $key, $values | { [$values['local_ip'], $key] })[$server_ip]
$nfs_volumes = $instances[$nfs_server]['volumes']['nfs']
if $nfs_volumes =~ Hash[String, Array[String]] {
$nfs_export_list = keys($nfs_volumes)
Expand Down

0 comments on commit bfd5209

Please sign in to comment.