summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorHunter Haugen <h.haugen@gmail.com>2012-10-12 11:49:39 -0700
committerHunter Haugen <h.haugen@gmail.com>2012-10-12 11:49:39 -0700
commit5d92b84d02befd48e1392bdd9ee21c7cb5a0b321 (patch)
tree1318b8a2daf4ab737d4e01b85328315a2df926ac /manifests/init.pp
parentf96656440027fbfc73bccf1911c817d7e4392713 (diff)
parent3ab65f56a61cfedbe75a3b41143f0d44fbad0a93 (diff)
Merge pull request #13 from hunner/rename_everything
Rename everything! Reviewed by: Cody
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp32
1 files changed, 14 insertions, 18 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 7bf6aa9..92df8b8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,4 +1,4 @@
-# == Class: puppet-haproxy
+# == Class: haproxy
#
# A Puppet module, using storeconfigs, to model an haproxy configuration.
# Currently VERY limited - assumes Redhat/CentOS setup. Pull requests accepted!
@@ -15,13 +15,13 @@
# Chooses whether haproxy should be installed or ensured absent.
# Currently ONLY accepts valid boolean true/false values.
#
-# [*haproxy_global_options*]
+# [*global_options*]
# A hash of all the haproxy global options. If you want to specify more
# than one option (i.e. multiple timeout or stats options), pass those
# options as an array and you will get a line for each of them in the
# resultant haproxy.cfg file.
#
-# [*haproxy_defaults_options*]
+# [*defaults_options*]
# A hash of all the haproxy defaults options. If you want to specify more
# than one option (i.e. multiple timeout or stats options), pass those
# options as an array and you will get a line for each of them in the
@@ -31,8 +31,8 @@
# === Examples
#
# class { 'haproxy':
-# enable => true,
-# haproxy_global_options => {
+# enable => true,
+# global_options => {
# 'log' => "${::ipaddress} local0",
# 'chroot' => '/var/lib/haproxy',
# 'pidfile' => '/var/run/haproxy.pid',
@@ -42,7 +42,7 @@
# 'daemon' => '',
# 'stats' => 'socket /var/lib/haproxy/stats'
# },
-# haproxy_defaults_options => {
+# defaults_options => {
# 'log' => 'global',
# 'stats' => 'enable',
# 'option' => 'redispatch',
@@ -59,16 +59,12 @@
# },
# }
#
-# === Authors
-#
-# Gary Larizza <gary@puppetlabs.com>
-#
class haproxy (
- $manage_service = true,
- $enable = true,
- $haproxy_global_options = $haproxy::data::haproxy_global_options,
- $haproxy_defaults_options = $haproxy::data::haproxy_defaults_options
-) inherits haproxy::data {
+ $manage_service = true,
+ $enable = true,
+ $global_options = $haproxy::params::global_options,
+ $defaults_options = $haproxy::params::defaults_options
+) inherits haproxy::params {
include concat::setup
package { 'haproxy':
@@ -95,7 +91,7 @@ class haproxy (
content => "# This file managed by Puppet\n",
}
- # Most of the variables are used inside the haproxy-base.cfg.erb template
+ # Template uses $global_options, $defaults_options
concat::fragment { 'haproxy-base':
target => '/etc/haproxy/haproxy.cfg',
order => '10',
@@ -110,7 +106,7 @@ class haproxy (
}
}
- file { $haproxy_global_options['chroot']:
+ file { $global_options['chroot']:
ensure => directory,
before => Service['haproxy'],
}
@@ -132,7 +128,7 @@ class haproxy (
hasstatus => true,
require => [
Concat['/etc/haproxy/haproxy.cfg'],
- File[$haproxy_global_options['chroot']],
+ File[$global_options['chroot']],
],
}
}