Cookbooks
haproxy
documentation
Haproxy Install

Back To Resource List (opens in a new tab)


haproxy_install

Install HAProxy from package or source.

Introduced: v4.0.0

Actions

  • :create
  • :delete

Properties

This resource also uses the following partial resources:

NameTypeDefaultDescriptionAllowed Values
install_typeStringNoneSet the installation typepackage, source
bin_prefixString/usrSet the source compile prefix
sensitiveBooleantrueEnsure that sensitive resource data is not logged by the chef-client
use_systemdBooleantrueEvalues whether to use systemd based on the nodes init package
userStringhaproxySimilar to "uid" but uses the UID of user name <user name> from /etc/passwd
groupStringhaproxySimilar to "gid" but uses the GID of group name <group name> from /etc/group
package_nameStringhaproxy
package_versionString
enable_ius_repoBooleanfalseEnables the IUS package repo for Centos to install versions >1.5
enable_epel_repoBooleantrueEnables the epel repo for RHEL based operating systems
source_versionString2.2.4
source_urlStringhttp://www.haproxy.org/download/2.2.4/src/haproxy-2.2.4.tar.gz
source_checksumString
source_target_cpuStringnode['kernel']['machine']
source_target_archString
source_target_osStringSee resource
use_libcryptBooleantruetrue, false
use_pcreBooleantruetrue, false
use_opensslBooleantrueInclude openssl support (https://openssl.org (opens in a new tab))true, false
use_zlibBooleantrueInclude ZLIB supporttrue, false
use_linux_tproxyBooleantruetrue, false
use_linux_spliceBooleantruetrue, false
use_promexBooleanfalseEnable the included Prometheus exporter (HAProxy v2.4+)true, false
use_systemdBooleantruetrue, false
use_luaBooleanfalseInclude Lua supporttrue, false
lua_libStringPath for lua library files ex: /opt/lib-5.3.5/lib
lua_incStringPath for lua library files ex: /opt/lib-5.3.5/include
ssl_libStringPath for openssl library files ex: /usr/local/openssl/lib
ssl_incStringPath for openssl includes files ex: /usr/local/openssl/inc

Examples

haproxy_install 'package'
haproxy_install 'source' do
  source_url node['haproxy']['source_url']
  source_checksum node['haproxy']['source_checksum']
  source_version node['haproxy']['source_version']
  use_pcre true
  use_openssl true
  use_zlib true
  use_linux_tproxy true
  use_linux_splice true
end