Import/add new host to foreman

Hello,

I want to use foreman as an ENC. I think my setup is ready, now I need to add my existing VM to foreman.
Currently on my puppetmaster the script /etc/puppetlabs/puppet/node.rb myserver return HTTPNotFound

In foreman I have signed the certifcate of ‘myserver’ but it doesn’t appear in host page. I don’t know how to make my VM show up here.

My setup is like :

  • One VM for foreman server with Logs, Puppet CA, and TFTP
  • One VM for puppet code with foreman proxy for Puppet role this is puppetmaster

Any idea on what I’m missing here ?

Hi,

I found the issue in my setup, but I think the documentation should be updated.

/etc/puppetlabs/puppet/node.rb uses /etc/puppetlabs/puppet/foreman.yaml configuration file.
According to the documentation :puppetdir: should point to /var/lib/puppet/ but I’m running puppet 5.5 the correct path is “/opt/puppetlabs/server/data/puppetserver/”

Now the node get added automatically to foreman on puppet run.

1 Like

Care to open a pull request with the correction? The manual lives at https://github.com/theforeman/theforeman.org/ and most of the manual content is under the _includes/manuals folder.

Done :

1 Like