How to manage a discovered host

version: foreman 1.23

Hi - Hosts that get discovered under discovered host section has options to " auto provision, refresh facts, reboot and delete". Is there a way to move the host from discovered host section all host section if the host is already provsioned?



if you want to put an existing host into Foreman inventory, then don’t use discovery. It’s not meant for this. The easiest approach is to configure the host with puppet and let it check in. It will create the host and then click on Manage if you also want to manage provisioning from there. This should be possible also with Ansible or Salt and other plugins, I haven’t tried.

Alternatively, you create new host entry using Hammer, CLI or web UI. Maybe someone has a script that sniffs a host and add it to Foreman automatically, not sure.

Thanks Izap, can you please help with reference documents on how to configure the host with puppet agent and how to make foreman as puppet master.

I found this document and able to add already provisioned host to all hosts.

I’m trying to do the same thing, add an already setup node to Foreman so it can take over management. I have the same version of puppet installed and I have had it request a client certificate that I had to sign but after that it never appeared in the Hosts list.

just leave it for few mins and check, it should appear when u refresh

I have left it for hours actually, still nothing. Fresh install of Ubuntu 18.04.3, foreman 1.24.1, puppetserver 6.7.2 and puppet-agent 6.11.1.

Did you check the puppet agent status? what is the status

did you check if it is displayed when you change the location and organization to “Any”?

$ sudo /opt/puppetlabs/bin/puppet status
Warning: 'puppet status' is deprecated and will be removed in a future release (location: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/face_base.rb:251:in `main')
  "is_alive": true,
  "version": "6.11.1"

and then

$ sudo /opt/puppetlabs/bin/puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Caching catalog for nuc-001
Info: Applying configuration version '1579044391'
Notice: Applied catalog in 0.01 seconds

So to me that looks like it’s running

Oops replied to the wrong post. Okay yes changing it to Any and they show up now… I feel dump, really really dumb.

Don’t feel that, this behaviour changed recently and it isn’t obvious for people who aren’t used to using organizations and locations

Strikes even the best of us. Similarly to SELinux :slight_smile: