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_http_port (string) (defaults to: '80')

    the http port. used in firewall settings

  • hy_https_port (string) (defaults to: '443')

    the https port. used in firewall settings

  • hy_user_name (string) (defaults to: 'haproxy')

    the name of the haproxy service user.

  • hy_user_comment (string) (defaults to: 'haproxy user')

    the comment of the haproxy user, shows up in emails sent from haproxy.

  • hy_user_home (string) (defaults to: '/var/lib/haproxy')

    the home directory for the haprxy user.

  • hy_user_shell (string) (defaults to: '/sbin/nologin')

    the shell for the haproxy user.

  • hy_log_target (string) (defaults to: '127.0.0.1')

    Where to send the logs for this haproxy. Currently only local logging / rsyslog forwarding supported.

  • hy_log_facility (string) (defaults to: 'local2')

    which logging facility to use.

  • hy_chroot (string) (defaults to: '/var/lib/haproxy')

    where the chroot should be

  • hy_pid (string) (defaults to: '/var/run/haproxy.pid')

    the pid file to use.

  • hy_maxconn (string) (defaults to: '4000')

    how many connections should we max allow.

  • hy_show_stats (boolean) (defaults to: true)

    whether we want to display the statistics page

  • hy_stats_socket (string) (defaults to: '/var/lib/haproxy/stats')

    name and path of the stats socket

  • hy_default_mode (string) (defaults to: 'http')

    which mode to use in the defaults block

  • hy_log_default (string) (defaults to: 'global')

    should be used when the instance's logging parameters are the same as the global ones.

  • hy_use_httplog (boolean) (defaults to: true)

    whether to use httplogging option. Enable logging of HTTP request, session state and timers

  • hy_use_dontlognull (boolean) (defaults to: true)

    Whether to enable or disable dontlognull option. true enables, false disables.

See Also:



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'manifests/params.pp', line 56

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',
$hy_chroot            = '/var/lib/haproxy',
$hy_pid               = '/var/run/haproxy.pid',
$hy_maxconn           = '4000',
$hy_show_stats        = true,
$hy_stats_socket      = '/var/lib/haproxy/stats',
$hy_default_mode      = 'http',

# user
$hy_user_name         = 'haproxy',
$hy_user_comment      = 'haproxy user',
$hy_user_home         = '/var/lib/haproxy',
$hy_user_shell        = '/sbin/nologin',

# logging
$hy_log_target        = '127.0.0.1',
$hy_log_facility      = 'local2',
$hy_log_default       = 'global',
$hy_use_httplog       = true,
$hy_use_dontlognull   = true,

) {

# service
$hy_service           = 'haproxy'

# directories
$hy_main_dir          = '/etc/haproxy'

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


# includes must be last

  include cd_haproxy::main::config

}