Hello
I'm trying to add a fact as a property in the host page i.e. just like you
see domain realm ip address etc, i want to add the value of my custom fact.
I was able to add the line table in app/helpers/hosts_helper.rb line 201,
but i cannot set the needed value.
I know that the object is Host::Managed and i was able to write some
method, but i do not know how to get the fact from the database.
Can somebody please help ?
Thanks
Lior
Could you explain what you are trying to achieve? Do you want to add more
custom values to you host which you could use as custom facts in puppet
manifests? I think you can already use parameters for this (not smart class
parameters), which can be either set globally (Global parameters in menu) or
in host form (parameters tab, see Add parameter button). You can also add them
per hostgroup etc, depending on your needs.
In puppet module they are available as global parameters, e.g. $custom (same
as other facts provided by facter).
Hope this helps
···
On Monday 23 of February 2015 07:47:17 Lior Kuperiu wrote:
> Hello
>
> I'm trying to add a fact as a property in the host page i.e. just like you
> see domain realm ip address etc, i want to add the value of my custom fact.
> I was able to add the line table in app/helpers/hosts_helper.rb line 201,
> but i cannot set the needed value.
> I know that the object is Host::Managed and i was able to write some
> method, but i do not know how to get the fact from the database.
>
> Can somebody please help ?
>
> Thanks
> Lior
–
Marek