Cookbooks
haproxy
documentation
Haproxy Resolver

Back To Resource List (opens in a new tab)


haproxy_resolver

Configuration related to name resolution in HAProxy. There can be as many as resolver sections as needed.

Each section can contain many name servers.

Introduced: v4.5.0

Actions

  • :create
  • :delete

Properties

This resource also uses the following partial resources:

NameTypeDefaultDescriptionAllowed Values
nameserverArrayNoneDNS server description

Examples

haproxy_resolver 'dns' do
  nameserver ['google 8.8.8.8:53']
  extra_options('resolve_retries' => 30,
                'timeout' => 'retry 1s')
  notifies :restart, 'haproxy_service[haproxy]', :delayed
end