]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - modules/role/templates/file_store/nfs_clients.erb
Group hosts in single export line
[perso/Immae/Projets/Puppet.git] / modules / role / templates / file_store / nfs_clients.erb
1 <%= @hosts.flat_map do |host_cn, config|
2 host = scope.function_find_host([@facts["ldapvar"]["other"], host_cn])
3 if host.nil?
4 [host_cn]
5 elsif !host["vars"]["wireguard_ip"].nil?
6 host["vars"]["wireguard_ip"]
7 elsif !host["vars"]["host"].nil?
8 host["vars"]["host"]
9 else
10 host["vars"]["real_hostname"]
11 end.map { |h| h + config }
12 end.join(" ") -%>