We have foreman 1.16 with katello 3.5 to manage centos7 machines and this is working fine.
We would like to register in foreman/katello any device with an ip in our network. We would like that any dhcp and dns entry is created with foreman so we can automate the addition/deletion of ips to the network and we can use the foreman db as our main inventory. This way we can query the registered/available dhcp and dns entries in our network and automate the addition and deletion of new hosts to the network. We would like to register not only servers but also switches, routers, ups…etc…anything with an ip.
Adding new servers to foreman and registering the proper dhcp and dns entries for them works perfect but when we try to add e.g. a network switch we have noticed that it’s mandatory to define a “lifecycle environment”, “content view”, “os”, “media”, “partition table” and other fields which doesn’t make sense for a device where I only want to register dhcp and dns entries. See the attached screenshots:
I plan to create “fake groups” named “network devices”, “ups devices” and so on with faked CV, OS, partition table etc but before doing it I wanted to ask how others are addressing this in case there is another way to do it that I am missing. I like the idea of having all the inventory centralized in foreman but using “fake groups” doesn’t seem too elegant.
Would it make sense to open a feature request for this? Or is this already possible and I am missing it?
Thanks in advance for any help or suggestion.
it would make sense to open feature request for this, we use Redmine for tracking issues. There might be a way to hack around this using API/CLI and setting host as ‘unmanaged’, which does not trigger Operating system validations, though I am not sure if that would work, I haven’t tested.
Thanks for the suggestion. I tried to add the hosts with hammer using the option “–managed=False” but then even if the host is added to foreman the dhcp and dns entries are not created.
I have opened a feature request here Feature #22398: ability to add unmanaged hosts but still register dhcp and dns entries for them - Foreman
I have exactly the same use case in my homelab. I was looking into some IPAM solution with extras; Foreman works for most my needs, but I have some specific hardware for which it would be cleaner to avoid all the OS information.
I see no activity here or in the redmine issue. Did you @Pablo_Escobar find anything interesting or came up with an elegant workaround? I dislike the idea of adding so many fake_entities, but I am unable to think of anything better
I think maybe you want just foreman deployed without the Katello Scenario. Lifecycle Environments and Content Views are Katello plugin concepts, so if you want to deploy without those concepts, I think maybe it sounds like you don’t want that plugin…
Similarly, an Infoblox appliance might do what you want as well and has a REST API.
I don’t have a good solution but what I plan to do in my next deployment is to use dnsmasq as main dns service (all my machines will query dnsmasq) and configure it to forward the queries to the dns managed by katello. I will register every dns entry that is not a server (network devices, ups devices…etc) in dnsmasq and every server in katello. I will use ansible to automate everything.
I am not happy with this approach but it’s the best solution that came to my mind. I would be happy to hear better suggestions
I think maybe you want just foreman deployed without the Katello Scenario.
Using just foreman would not solve the problem. You still have concepts like “partition table” that don’t make sense for a network device. And I need the katello functionality to manage rpms.
The ideal solution would be that foreman/katello supports adding hosts that only register a dns and dhcp entry