Project

General

Profile

Actions

Feature #165

closed

Subdomain should be shown for hostname.

Added by Bash Shell about 14 years ago. Updated over 12 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

By default, foreman shows the short domain name for hosts.

However, we have multiple sites, lets say site1.example.com and site2.example.com.

Sometimes we have servers with names mysql1.site1 and mysql1.site2

This is hard to distinguish in foreman as it shows "mysql1" for both. (We have to click it)

I changed the "shortname" function in ./app/models/host.rb like so:

#domain.nil? ? name : name.chomp("." + domain.name)
domain.nil? ? name : name.chomp(".example.com")

Now the hosts show up as mysql1.site1 and mysql1.site2, which makes much better readability.

Perhaps there could be a configurable setting for this?
One could specify how much of a domain name to show/hide?


Files

withoutsetting.png View withoutsetting.png 51.9 KB Bash Shell, 04/06/2010 06:25 AM
with_setting.png View with_setting.png 52.7 KB Bash Shell, 04/06/2010 06:25 AM

Related issues 2 (0 open2 closed)

Related to Foreman - Bug #816: hosts list and FQDN of hostsDuplicate04/01/2011Actions
Has duplicate Foreman - Bug #1315: Short hostname confusionDuplicate11/11/2011Actions
Actions

Also available in: Atom PDF