Files
confdroid_haproxy/manifests/params.pp

77 lines
2.6 KiB
ObjectPascal
Raw Normal View History

2018-04-24 15:32:11 +02:00
## cd_haproxy::params.pp
# Module name: cd_haproxy
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_haproxy.
#
# cd_haproxy is used for providing automatic configuration of HA proxy.
# Copyright (C) 2017 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class holds all parameters for the cd_haproxy module and is
# inherited by all classes except defines.
# @param [string] pkg_ensure
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
# to choose, i.e. `latest` or `present`.
# @param [string] reqpackages specify th epackages to be installed
# @param [string] hy_host_fqdn the fqdn of the ha proxy host. mmust be fqdn,
# not cname. specify multiple fqdns via array.
# @param [boolean] hy_manage_fw whether to manage the firewall.
# @param [string] hy_fw_order_no the rule number to control the oder of the
# firewall rules.
# @param [string] hy_proxy_mode which mode the ha proxy should work in.
# Valid oprtions are `http` and `tcp`.
# @param [string] hy_fe_port the frontend port to list to. opens in firewall,
# if enabled, and is used in configuration templates. only active if
# `hy_proxy_mode` is set to `tcp`.
# @param [string] hy_be_port the backend port to send traffic through. only
# active if `hy_proxy_mode` is set to `tcp`.
##############################################################################
class cd_haproxy::params (
2018-12-10 14:36:54 +01:00
$pkg_ensure = 'latest',
$reqpackages = ['haproxy'],
2018-04-24 15:32:11 +02:00
2018-12-10 14:36:54 +01:00
$hy_host_fqdn = "proxy.${::domain}",
2018-04-24 15:32:11 +02:00
# firewall
2018-12-10 14:36:54 +01:00
$hy_manage_fw = true,
$hy_fw_order_no = '50',
2018-04-24 15:32:11 +02:00
# main config
2018-12-10 14:36:54 +01:00
$hy_http_port = '80',
$hy_https_port = '443',
# user
$hy_user_name = 'haproxy',
$hy_user_comment = 'haproxy user',
$hy_user_home = '/var/lib/haproxy',
$hy_user_shell = '/sbin/nologin',
2018-04-24 15:32:11 +02:00
) {
# service
2018-12-10 14:36:54 +01:00
$hy_service = 'haproxy'
# directories
2018-04-24 15:32:11 +02:00
2018-12-10 14:36:54 +01:00
# files
2018-04-24 15:32:11 +02:00
# includes must be last
2018-04-24 17:07:38 +02:00
include cd_haproxy::main::config
2018-04-24 15:32:11 +02:00
}