Started working on this module
This commit is contained in:
13
manifests/init.pp
Normal file
13
manifests/init.pp
Normal file
@ -0,0 +1,13 @@
|
||||
# @summary
|
||||
# A puppet module to manage a system's Haproxy installation.
|
||||
#
|
||||
# @example
|
||||
# class { 'haproxy':
|
||||
#
|
||||
# }
|
||||
class haproxy (
|
||||
String[1] $package_ensure = 'present',
|
||||
String $package_name = $haproxy::params::package_name,
|
||||
) inherits haproxy::params {
|
||||
contain haproxy::install
|
||||
}
|
11
manifests/install.pp
Normal file
11
manifests/install.pp
Normal file
@ -0,0 +1,11 @@
|
||||
# @summary Manages the state of the Haproxy package.
|
||||
#
|
||||
# This class will install the haproxy package is desired.
|
||||
#
|
||||
# @example
|
||||
# include haproxy::install
|
||||
class haproxy::install {
|
||||
package { $haproxy::package_name:
|
||||
ensure => $haproxy::package_ensure,
|
||||
}
|
||||
}
|
19
manifests/params.pp
Normal file
19
manifests/params.pp
Normal file
@ -0,0 +1,19 @@
|
||||
# @summary Handles default parameters for Haproxy.
|
||||
#
|
||||
# This class is not intended to be called directly.
|
||||
#
|
||||
# @example
|
||||
# include haproxy::params
|
||||
class haproxy::params {
|
||||
|
||||
case $::osfamily {
|
||||
'Archlinux', 'Debian', 'Redhat', 'Gentoo', 'Suse', 'Linux' : {
|
||||
$package_name = 'haproxy'
|
||||
}
|
||||
'FreeBSD': {
|
||||
$package_name = 'haproxy'
|
||||
}
|
||||
default: { fail("The ${::osfamily} operating system is not supported with the haproxy module") }
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user