Skip to content

Commit 004571c

Browse files
committed
Don't use 'inherits' in config, install and service
Since the ntp class contains the other ntp classes ntp::config, ntp::install and ntp::service it is neither necessary nor useful for these classes to inherit from the "main" ntp class. Letting the classes ntp::config, ntp::install and ntp::service inherit from ntp is also counter all recommendations in the Puppet documentation. The puppetlabs-ntp module is widely regarded as a "poster child" for designing Puppet modules and is often used as reference by Puppet newcomers. It should not make use of deprecated and useless or confusing patterns. See also puppetlabs/puppet-docs#801
1 parent 27bd9fb commit 004571c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

manifests/config.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @api private
22
# This class handles the configuration file. Avoid modifying private classes.
3-
class ntp::config inherits ntp {
3+
class ntp::config {
44

55
#The servers-netconfig file overrides NTP config on SLES 12, interfering with our configuration.
66
if ($facts['operatingsystem'] == 'SLES' and $facts['operatingsystemmajrelease'] == '12') or

manifests/install.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# @api private
1+
# @api private
22
# This class handles ntp packages. Avoid modifying private classes.
3-
class ntp::install inherits ntp {
3+
class ntp::install {
44

55
if $ntp::package_manage {
66

manifests/service.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @api private
22
# This class handles the ntp service. Avoid modifying private classes.
3-
class ntp::service inherits ntp {
3+
class ntp::service {
44

55
if $ntp::service_manage == true {
66
service { 'ntp':

0 commit comments

Comments
 (0)