def only_host_with_role(hosts, role)
      found_hosts =  hosts.select{ |host| role.nil? or host['roles'].include?(role.to_s)}
      if found_hosts.length == 0 or found_hosts.length > 1
        raise ArgumentError, "There should be one host with #{role} defined, found #{found_hosts.length} matching hosts (#{found_hosts})"
      end
      found_hosts.first
    end
def only_host_with_role(hosts, role)
      found_hosts =  hosts.select{ |host| role.nil? or host['roles'].include?(role.to_s)}
      if found_hosts.length == 0 or found_hosts.length > 1
        raise ArgumentError, "There should be one host with #{role} defined, found #{found_hosts.length} matching hosts (#{found_hosts})"
      end
      found_hosts.first
    end
Find a single host with the role provided.  Raise an error if more than one host is found to have the
provided role.

@param [Array<Host>] hosts The hosts to examine
@param [String] role The host returned will have this role in its role list
@return [Host] The single host with the desired role in its roles list
@raise [ArgumentError] Raised if more than one host has the given role defined, or if no host has the
                       role defined.