Started working on this module

This commit is contained in:
2022-12-03 23:38:31 -05:00
parent 9bb63474dd
commit 9fad33b67c
31 changed files with 1353 additions and 20 deletions

13
manifests/init.pp Normal file
View 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
View 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
View 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") }
}
}