summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2013-07-05 17:55:41 -0400
committerAshley Penney <ashley.penney@puppetlabs.com>2013-07-05 18:53:54 -0400
commit3fe6df58d1c5c289655985401c0aecd9a2f996f1 (patch)
treee87a513b373e93ae05bc482161617087fa855bef /manifests
parent3ce96dafa278bcc49e4acafe72674342560f41c9 (diff)
Add ntp::params, a place to centralize all configuration information.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/params.pp79
1 files changed, 79 insertions, 0 deletions
diff --git a/manifests/params.pp b/manifests/params.pp
new file mode 100644
index 0000000..ba9a540
--- /dev/null
+++ b/manifests/params.pp
@@ -0,0 +1,79 @@
+class ntp::params() {
+
+ $autoupdate = false
+ $enable_service = true
+ $ensure_service = 'running'
+ $restrict = true
+
+ case $::osfamily {
+ 'Debian': {
+ $config = '/etc/ntp.conf'
+ $config_template = 'ntp.conf.debian.erb'
+ $package_name = [ 'ntp' ]
+ $service_name = 'ntp'
+ $servers = [
+ '0.debian.pool.ntp.org iburst',
+ '1.debian.pool.ntp.org iburst',
+ '2.debian.pool.ntp.org iburst',
+ '3.debian.pool.ntp.org iburst',
+ ]
+ }
+ 'RedHat': {
+ $config = '/etc/ntp.conf'
+ $config_template = 'ntp.conf.el.erb'
+ $package_name = [ 'ntp' ]
+ $service_name = 'ntpd'
+ $servers = [
+ '0.centos.pool.ntp.org',
+ '1.centos.pool.ntp.org',
+ '2.centos.pool.ntp.org',
+ ]
+ }
+ 'SuSE': {
+ $config = '/etc/ntp.conf'
+ $config_template = 'ntp.conf.suse.erb'
+ $package_name = [ 'ntp' ]
+ $service_name = 'ntp'
+ $servers = [
+ '0.opensuse.pool.ntp.org',
+ '1.opensuse.pool.ntp.org',
+ '2.opensuse.pool.ntp.org',
+ '3.opensuse.pool.ntp.org',
+ ]
+ }
+ 'FreeBSD': {
+ $config = '/etc/ntp.conf'
+ $config_template = 'ntp.conf.freebsd.erb'
+ $package_name = ['net/ntp']
+ $service_name = 'ntpd'
+ $servers = [
+ '0.freebsd.pool.ntp.org iburst maxpoll 9',
+ '1.freebsd.pool.ntp.org iburst maxpoll 9',
+ '2.freebsd.pool.ntp.org iburst maxpoll 9',
+ '3.freebsd.pool.ntp.org iburst maxpoll 9',
+ ]
+ }
+ 'Linux': {
+ # Account for distributions that don't have $::osfamily specific settings.
+ case $::operatingsystem {
+ 'Archlinux': {
+ $config = '/etc/ntp.conf'
+ $config_template = 'ntp.conf.archlinux.erb'
+ $package_name = ['ntp']
+ $service_name = 'ntpd'
+ $servers = [
+ '0.pool.ntp.org',
+ '1.pool.ntp.org',
+ '2.pool.ntp.org',
+ ]
+ }
+ default: {
+ fail("The ${module_name} module is not supported on an ${::operatingsystem} distribution.")
+ }
+ }
+ }
+ default: {
+ fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
+ }
+ }
+}