How To Install Foreman on CentOS 7 / RHEL 7 / Oracle Linux 7
Download and Install NTP module
For a demo, we will install a Puppet NTP module for managing the NTP service throiugh Foreman.
If you have Puppet 2.7.14 or higher, install the module automatically from Puppet Forge to our “production” environment (the default).
Use the following command to install NTP module on Foreman (Puppetmaster) host.
/opt/puppetlabs/bin/puppet module install puppetlabs/ntp
Output:
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ... Notice: Downloading from https://forgeapi.puppet.com ... Notice: Installing -- do not interrupt ... /etc/puppetlabs/code/environments/production/modules └─┬ puppetlabs-ntp (v7.3.0) └── puppetlabs-stdlib (v5.1.0)
In Foreman’s web console, go to Configure >> Puppet >> Classes and click Import from hostname (server.itzgeek.local) to read the available Puppet classes from the puppet master and populate Foreman’s database.

Select the NTP module and click the update button.

After clicking the update button, you will see something like below. The ntp class will appear in the Puppet class list if installed correctly. Click on NTP class on the left.

Now, Click the Smart Class Parameter and then select Servers on the left side. Tick the Override checkbox so that Foreman manages the servers parameter. Type the server names in Default Value and then click Submit.

Now, we will assign the NTP class to Foreman host. To do that, go to Hosts >> All Hosts >> Edit (Hosts).

Go to Puppet Classes tab and expand the ntp module and click the + icon to add the ntp class to the host, and then click submit.

This time, it will take you automatically to the host details page. Click on YAML, and it will show the ntp class and the server list parameter, as passed to Puppet via the ENC (external node classifier) interface.

Output:

At last, run the following command on the Foreman host to see the NTP service automatically reconfigured by Puppet and the NTP module.
/opt/puppetlabs/bin/puppet agent --test
Verify the installation of NTP module by going to Hosts >> All Hosts >> Select Foreman Host >> Reports >> Latest report.

The below screenshot confirms that NTP is being managed by Foreman (Puppet).

The Foreman is now ready and it’s time to add new hosts to it.
READ: How To Add Puppet Nodes to Foreman
That’s All.