diff options
author | Ashley Penney <ashley.penney@puppetlabs.com> | 2013-08-14 20:26:51 -0400 |
---|---|---|
committer | Ashley Penney <ashley.penney@puppetlabs.com> | 2013-08-14 20:26:51 -0400 |
commit | 8528d604a4fdc6ab242f05d522d66dd4f1c90f3c (patch) | |
tree | c060fde7f3b96ef2e4284f6d4cd48f6f6c53bccb | |
parent | 6eaf2b7fae275b3621b42ae0a83e1da07a0db08f (diff) |
Remove variables, switch to inherits.
This commit removes all the local copies of variables in the subclasses
and simply inherits the main class in order to bring variables into the
right scope.
-rw-r--r-- | manifests/config.pp | 15 | ||||
-rw-r--r-- | manifests/install.pp | 5 | ||||
-rw-r--r-- | manifests/service.pp | 7 |
3 files changed, 3 insertions, 24 deletions
diff --git a/manifests/config.pp b/manifests/config.pp index c8a5625..1c8963d 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,18 +1,5 @@ # -class ntp::config { - - $config = $ntp::config - $config_template = $ntp::config_template - $driftfile = $ntp::driftfile - $keys_enable = $ntp::keys_enable - $keys_file = $ntp::keys_file - $keys_controlkey = $ntp::keys_controlkey - $keys_requestkey = $ntp::keys_requestkey - $keys_trusted = $ntp::keys_trusted - $panic = $ntp::panic - $preferred_servers = $ntp::preferred_servers - $restrict = $ntp::restrict - $servers = $ntp::servers +class ntp::config inherits ntp { if $keys_enable { $directory = dirname($keys_file) diff --git a/manifests/install.pp b/manifests/install.pp index e175964..098949c 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,8 +1,5 @@ # -class ntp::install { - - $package_ensure = $ntp::package_ensure - $package_name = $ntp::package_name +class ntp::install inherits ntp { package { 'ntp': ensure => $package_ensure, diff --git a/manifests/service.pp b/manifests/service.pp index 2b1eee0..3f1ada0 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -1,10 +1,5 @@ # -class ntp::service { - - $service_enable = $ntp::service_enable - $service_ensure = $ntp::service_ensure - $service_manage = $ntp::service_manage - $service_name = $ntp::service_name +class ntp::service inherits ntp { if ! ($service_ensure in [ 'running', 'stopped' ]) { fail('service_ensure parameter must be running or stopped') |