Using class inheritance to be able to re-utilize same module on same host

Hello everyone,

I have been testing and learning both Foreman and Puppet. Recently I
created a small puppet module for testing purposes. I realized I could make
the module very dynamic in that I could create parameters that could be
overridden in Foreman. Then I thought it would be nice to be able to
re-apply the same module on the same host. I realize wrappers (via a new
module) could be used but I also realized inheritance could also be used
for same purpose. Now, everything works correctly but I wanted to ask if my
approach is actually usable or if it should be avoided and if so why? So
this is what I have:

rpmdeploy/manifests/init.pp

··· ---------------------------------------------------------------- class rpmdeploy ( $package = 'openssh', $version = 'installed', $service = 'sshd', $hasstatus = false, ) {

package { $package:
ensure => $version,
}

if $hasstatus {
service { $service:
name => $service,
ensure => running,
enable => true,
hasstatus => $hasstatus,
hasrestart => false,
}
}
}

rpmdeploy/manifests/httpd_wrapper.pp

class rpmdeploy::httpd_wrapper (
$package = ‘httpd’,
$version = ‘installed’,
$service = ‘httpd’,
$hasstatus = true,
) inherits ::rpmdeploy {

}