[% # vi: ft=tt2 # Returns the (alphabetically) first hostname of a node pair for a given host. # # @param argv.host The hostname to get the first name for. # @return out The alphabetically first name. IF !hosts.${argv.host}.defined; argv.host = 'self'; END; blktmp.hosts = [argv.host]; IF hosts.${argv.host}.peer.defined; blktmp.hosts.push(hosts.${argv.host}.peer); END; out = blktmp.hosts.sort.0; -%]