How do i remove the 'mac' prefix in the name for discovered machines?

How do i remove the 'mac' prefix in the name for discovered machines? I am
changing the discovery_fact from 'discovery_bootif' to another fact
(serialnumber to be precise) and would like to drop the 'mac' that is
prefixed to the host's name. thanks.

This isn't configurable in the latest release of discovery, you'd have
to change the code (app/models/host/discovered.rb). A new
"discovery_prefix" setting has been added since for the next release:


https://github.com/theforeman/foreman_discovery/commit/b221e9c791b3c7ca680ca8113157698f9a16be6f

··· On 07/01/15 19:58, lawre wrote: > How do i remove the 'mac' prefix in the name for discovered machines? I > am changing the discovery_fact from 'discovery_bootif' to another fact > (serialnumber to be precise) and would like to drop the 'mac' that is > prefixed to the host's name. thanks.


Dominic Cleal
Red Hat Engineering

Just one more thing on this - even though this has been fixed, it is not
available in any release yet.

See Dominic's response here -
https://github.com/theforeman/foreman_discovery/pull/94#issuecomment-69265578

Outstanding, someone else beat me to the issue writeup!

··· On Thursday, January 8, 2015 at 3:14:39 AM UTC-6, Dominic Cleal wrote: > > This isn't configurable in the latest release of discovery, you'd have > to change the code (app/models/host/discovered.rb). A new > "discovery_prefix" setting has been added since for the next release: >

FYI the first RC build is coming soon. Perhaps this week, for sure the
next one.

··· -- Later, Lukas #lzap Zapletal

> Outstanding, someone else beat me to the issue writeup!

Keep in mind that hostnames in Foreman must start with letters and not
numbers.

··· -- Later, Lukas #lzap Zapletal