Question - What is a class in Puppet?
Answer -
Classes are named blocks in your manifest that configure various functionalities of the node, such as services, files, and packages.
The classes are added to a node's catalog and are executed only when explicitly invoked.
Class apache (String $version = ‘latest’) {
package{
‘httpd’: ensure => $version,
before => File[‘/etc/httpd.conf’],}