How to customize the facts from the Foreman discovery Image / use them in provisioning templates?

Hi,

Is there any way to customize the facts that are being received from the
FDI image?

We would like to have the host name to follow a pattern. For example, If I
have lldp_neighbor_sysname_p2p1: r12c1t1 and lldp_neighbor_portid_p2p1:
1/16
then we would like to have the *host name as : *r12c116, would this
be possible? If so how do we do it?

The other thing is how can we send the information of these facts to the
kick start templates?

Please suggest any ideas?

Thanks,
No1

Autoprovisioning rule lets you use ERB to construct hostname.

Normal provisioning does not. You can however change fact that
construct the name. You can create FDI extension (ZIP FILE) which will
be downloaded during discovery, that can add any fact you want using
Facter API.

All facts are available during provisioning in latest stable version
1.15 until first fact report comes in. Then they are deleted.

Everything is in our doc, please do read it.

LZ

··· On Mon, Oct 16, 2017 at 10:52 PM, No1 wrote: > Hi, > > Is there any way to customize the facts that are being received from the FDI > image? > > We would like to have the host name to follow a pattern. For example, If I > have lldp_neighbor_sysname_p2p1: r12c1t1 and lldp_neighbor_portid_p2p1: > 1/16 then we would like to have the host name as : r12c116, would this be > possible? If so how do we do it? > > The other thing is how can we send the information of these facts to the > kick start templates? > > Please suggest any ideas? > > Thanks, > No1 > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,
Lukas @lzap Zapletal