Skip to content

Instantly share code, notes, and snippets.

@caryp
Created August 24, 2009 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caryp/173962 to your computer and use it in GitHub Desktop.
Save caryp/173962 to your computer and use it in GitHub Desktop.
def determine_node_name
run_ohai
unless @safe_name && @node_name
@node_name ||= @ohai[:fqdn] ? @ohai[:fqdn] : @ohai[:hostname]
@safe_name = @node_name.gsub(/\./, '_')
end
@node_name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment