Puppet Class: cd_haproxy::params

Summary

Class holds all parameters for the cd_haproxy module and is inherited by all classes except defines.

Overview

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 www.gnu.org/licenses/.

Parameters:

  • pkg_ensure (string) (defaults to: 'latest')

    which package type to choose, i.e. latest or present.

  • reqpackages (string) (defaults to: ['haproxy'])

    specify th epackages to be installed

  • hy_host_fqdn (string) (defaults to: "proxy.${::domain}")

    the fqdn of the ha proxy host. mmust be fqdn, not cname. specify multiple fqdns via array.

  • hy_manage_fw (boolean) (defaults to: true)

    whether to manage the firewall.

  • hy_fw_order_no (string) (defaults to: '50')

    the rule number to control the oder of the firewall rules.

  • hy_proxy_mode (string)

    which mode the ha proxy should work in. Valid oprtions are http and tcp.

  • hy_fe_port (string)

    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.

  • hy_be_port (string)

    the backend port to send traffic through. only active if hy_proxy_mode is set to tcp.

  • hy_http_port (Any) (defaults to: '80')
  • hy_https_port (Any) (defaults to: '443')
  • hy_user_name (Any) (defaults to: 'haproxy')
  • hy_user_comment (Any) (defaults to: 'haproxy user')
  • hy_user_home (Any) (defaults to: '/var/lib/haproxy')
  • hy_user_shell (Any) (defaults to: '/sbin/nologin')


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'manifests/params.pp', line 40

class cd_haproxy::params (

$pkg_ensure           = 'latest',
$reqpackages          = ['haproxy'],

$hy_host_fqdn         = "proxy.${::domain}",

# firewall
$hy_manage_fw         = true,
$hy_fw_order_no       = '50',

# main config
$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',

) {

# service
$hy_service           = 'haproxy'

# directories
$hy_main_dir          = '/etc/haproxy'

# files
$hy_main_config       = "${hy_main_dir}/haproxy.cfg"
$hy_config_head_erb   = 'cd_puppet/haproxy_head.erb'


# includes must be last

  include cd_haproxy::main::config

}