diff options
author | Ashley Penney <ashley.penney@puppetlabs.com> | 2013-07-08 10:29:01 -0400 |
---|---|---|
committer | Ashley Penney <ashley.penney@puppetlabs.com> | 2013-07-08 10:29:01 -0400 |
commit | b5136d77edb0f43c25247b45395277d32838b2ea (patch) | |
tree | ff1fa94a9b7ac373a9e06db85387399d2b5623f1 | |
parent | 82057592fe4e83ed15f1b5a9d4cd652fd0b8e528 (diff) |
Rename package_ensure to ensure_package.
Add the anchor pattern.
Move the deprecation warning out of params to init.
-rw-r--r-- | manifests/init.pp | 16 | ||||
-rw-r--r-- | manifests/params.pp | 6 |
2 files changed, 15 insertions, 7 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index ad443c3..f109640 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -50,18 +50,30 @@ class ntp( $config = $ntp::params::config, $config_template = $ntp::params::config_template, $enable_service = $ntp::params::enable_service, + $ensure_package = $ntp::params::ensure_package, $ensure_service = $ntp::params::ensure_service, - $package_ensure = $ntp::params::package_ensure, + $manage_service = $ntp::params::manage_service, $package_name = $ntp::params::package_name, $restrict = $ntp::params::restrict, $servers = $ntp::params::servers, $service_name = $ntp::params::service_name, ) inherits ntp::params { + if $autoupdate { + notice('autoupdate parameter has been deprecated and replaced with ensure_package. Set this to latest for the same behavior as autoupdate => true.') + } + include '::ntp::install' include '::ntp::config' include '::ntp::service' - Class['::ntp::install'] -> Class['::ntp::config'] ~> Class['::ntp::service'] + # Anchor this as per #8140 - this ensures that classes won't float off and + # mess everything up. You can read about this at: + # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues + anchor { 'ntp::begin': } + anchor { 'ntp::end': } + + Anchor['ntp::begin'] -> Class['::ntp::install'] -> Class['::ntp::config'] + ~> Class['::ntp::service'] -> Anchor['ntp::end'] } diff --git a/manifests/params.pp b/manifests/params.pp index 1a9b7c8..dd55cd6 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,13 +3,9 @@ class ntp::params() { $autoupdate = false $enable_service = true $ensure_service = 'running' - $package_ensure = 'present' + $ensure_package = 'present' $restrict = true - if $autoupdate { - notice('autoupdate parameter has been deprecated and replaced with package_ensure. Set this to latest for the same behavior as autoupdate => true.') - } - case $::osfamily { 'Debian': { $config = '/etc/ntp.conf' |