From 5652f885a70a5d7eb19533f4defa0b1e575b0520 Mon Sep 17 00:00:00 2001 From: "Benjamin M. Hughes" Date: Wed, 31 Jan 2024 15:24:01 +0000 Subject: [PATCH 1/3] Add option to listen resource and refactor option storage --- .github/workflows/ci.yml | 1 + CHANGELOG.md | 3 +++ documentation/haproxy_listen.md | 1 + resources/backend.rb | 2 +- resources/fastcgi.rb | 2 +- resources/frontend.rb | 2 +- resources/listen.rb | 8 ++++++++ templates/default/haproxy.cfg.erb | 11 +++++------ test/cookbooks/test/recipes/config_3.rb | 17 +++++++++++++++++ .../config_3/controls/config_spec.rb | 15 +++++++++++++++ 10 files changed, 53 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cfe3d33..b92baf8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,7 @@ jobs: suite: - config-2 - config-3 + - config-4 - config-acl - config-array - config-backend-search diff --git a/CHANGELOG.md b/CHANGELOG.md index d9eaad1e..3a419114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ This file is used to list changes made in each version of the haproxy cookbook. ## Unreleased +- Add `option` property to `haproxy_listen` +- Refactor `option`s internally to not create an unnecessary nested array + ## 12.3.2 - *2024-02-01* ## 12.3.1 - *2024-02-01* diff --git a/documentation/haproxy_listen.md b/documentation/haproxy_listen.md index 8416f33f..197ef74b 100644 --- a/documentation/haproxy_listen.md +++ b/documentation/haproxy_listen.md @@ -33,6 +33,7 @@ This resource also uses the following partial resources: | `server` | Array | None | Servers the listen section routes to | | | `stats` | Hash | None | Enable stats with various options | | | `hash_type` | String | None | Specify a method to use for mapping hashes to servers | `consistent`, `map-based` | +| `option` | Array | None | Array of HAProxy `option` directives | ## Examples diff --git a/resources/backend.rb b/resources/backend.rb index 81539697..1da26dca 100644 --- a/resources/backend.rb +++ b/resources/backend.rb @@ -54,7 +54,7 @@ if property_is_set?(:option) haproxy_config_resource.variables['backend'][new_resource.name]['option'] ||= [] - haproxy_config_resource.variables['backend'][new_resource.name]['option'].push(new_resource.option) + haproxy_config_resource.variables['backend'][new_resource.name]['option'].concat(new_resource.option) end haproxy_config_resource.variables['backend'][new_resource.name]['hash_type'] = new_resource.hash_type if property_is_set?(:hash_type) diff --git a/resources/fastcgi.rb b/resources/fastcgi.rb index 70729dbb..eb7313e3 100644 --- a/resources/fastcgi.rb +++ b/resources/fastcgi.rb @@ -37,7 +37,7 @@ if property_is_set?(:option) haproxy_config_resource.variables['fastcgi'][new_resource.name]['option'] ||= [] - haproxy_config_resource.variables['fastcgi'][new_resource.name]['option'].push(new_resource.option) + haproxy_config_resource.variables['fastcgi'][new_resource.name]['option'].concat(new_resource.option) end haproxy_config_resource.variables['fastcgi'][new_resource.name]['extra_options'] = new_resource.extra_options if property_is_set?(:extra_options) diff --git a/resources/frontend.rb b/resources/frontend.rb index 9f5b16d3..6d38e428 100644 --- a/resources/frontend.rb +++ b/resources/frontend.rb @@ -65,7 +65,7 @@ if property_is_set?(:option) haproxy_config_resource.variables['frontend'][new_resource.name]['option'] ||= [] - haproxy_config_resource.variables['frontend'][new_resource.name]['option'].push(new_resource.option) + haproxy_config_resource.variables['frontend'][new_resource.name]['option'].concat(new_resource.option) end haproxy_config_resource.variables['frontend'][new_resource.name]['extra_options'] = new_resource.extra_options if property_is_set?(:extra_options) diff --git a/resources/listen.rb b/resources/listen.rb index 4dad2a0d..6eb30d41 100644 --- a/resources/listen.rb +++ b/resources/listen.rb @@ -38,6 +38,9 @@ equal_to: %w(consistent map-based), description: 'Specify a method to use for mapping hashes to servers' +property :option, Array, + description: 'Array of HAProxy option directives' + unified_mode true action_class do @@ -87,6 +90,11 @@ haproxy_config_resource.variables['listen'][new_resource.name]['hash_type'] = new_resource.hash_type if property_is_set?(:hash_type) haproxy_config_resource.variables['listen'][new_resource.name]['extra_options'] = new_resource.extra_options if property_is_set?(:extra_options) + + if property_is_set?(:option) + haproxy_config_resource.variables['listen'][new_resource.name]['option'] ||= [] + haproxy_config_resource.variables['listen'][new_resource.name]['option'].concat(new_resource.option) + end end action :delete do diff --git a/templates/default/haproxy.cfg.erb b/templates/default/haproxy.cfg.erb index 019d2586..98531115 100644 --- a/templates/default/haproxy.cfg.erb +++ b/templates/default/haproxy.cfg.erb @@ -221,11 +221,9 @@ fcgi-app <%= fastcgi %> <% end -%> <% unless nil_or_empty?(f['option']) %> <% f['option'].each do | option |%> -<% option.each do | option | %> option <%= option %> <% end -%> <% end -%> -<% end -%> <% unless nil_or_empty?(f['extra_options']) %> <% f['extra_options'].each do | key, value | %> <% unless key == 'http-request' %> @@ -286,11 +284,9 @@ frontend <%= frontend %> <% end -%> <% unless nil_or_empty?(f['option']) %> <% f['option'].each do | option |%> -<% option.each do | option | %> option <%= option %> <% end -%> <% end -%> -<% end -%> <% unless nil_or_empty?(f['extra_options']) %> <% f['extra_options'].each do | key, value | %> <% unless key == 'http-request' %> @@ -328,11 +324,9 @@ backend <%= key %> <% end -%> <% unless nil_or_empty?(backend['option']) %> <% backend['option'].each do | option |%> -<% option.each do | option | %> option <%= option %> <% end -%> <% end -%> -<% end -%> <% unless nil_or_empty?(backend['tcp_request']) %> <% backend['tcp_request'].each do | tcp_request |%> <% tcp_request.each do | tcp_request | %> @@ -389,6 +383,11 @@ listen <%= key %> <% if listen['default_backend'] -%> default_backend <%= listen['default_backend'] %> <% end %> +<% unless nil_or_empty?(listen['option']) %> +<% listen['option'].each do | option |%> + option <%= option %> +<% end -%> +<% end -%> <% unless nil_or_empty?(listen['extra_options']) %> <% listen['extra_options'].each do | key, value | %> <% if key == 'http-request' %> diff --git a/test/cookbooks/test/recipes/config_3.rb b/test/cookbooks/test/recipes/config_3.rb index aabaf999..6d2c76d1 100644 --- a/test/cookbooks/test/recipes/config_3.rb +++ b/test/cookbooks/test/recipes/config_3.rb @@ -21,6 +21,23 @@ haproxy_retries 5 end +haproxy_listen 'admin' do + bind '0.0.0.0:1337' + mode 'http' + stats uri: '/', + realm: 'Haproxy-Statistics', + auth: 'user:pwd' + http_request [ + 'add-header X-Forwarded-Proto https if { ssl_fc }', + 'add-header X-Proto http', + ] + http_response 'set-header Expires %[date(3600),http_date]' + default_backend 'servers' + option %w(dontlog-normal) + extra_options('bind-process' => 'odd') + hash_type 'consistent' +end + haproxy_frontend 'http-in' do bind '*:80' default_backend 'servers' diff --git a/test/integration/config_3/controls/config_spec.rb b/test/integration/config_3/controls/config_spec.rb index 22775afc..29e3eb4b 100644 --- a/test/integration/config_3/controls/config_spec.rb +++ b/test/integration/config_3/controls/config_spec.rb @@ -59,6 +59,21 @@ 'backend tcp-servers', ' mode tcp', ' server server2 127\.0\.0\.1:3306 maxconn 32', + '', + '', + 'listen admin', + ' mode http', + ' bind 0.0.0.0:1337', + ' stats uri /', + ' stats realm Haproxy-Statistics', + ' stats auth user:pwd', + ' http-request add-header X-Forwarded-Proto https if { ssl_fc }', + ' http-request add-header X-Proto http', + ' http-response set-header Expires %\[date\(3600\),http_date\]', + ' default_backend servers', + ' option dontlog-normal', + ' bind-process odd', + ' hash-type consistent', ] describe file('/etc/haproxy/haproxy.cfg') do From 9a71d922089affcf711ba4b9b160653f3c7cf211 Mon Sep 17 00:00:00 2001 From: "Benjamin M. Hughes" Date: Thu, 1 Feb 2024 10:22:24 +0000 Subject: [PATCH 2/3] md format --- documentation/haproxy_acl.md | 2 +- documentation/haproxy_backend.md | 18 +++++++-------- documentation/haproxy_cache.md | 2 +- documentation/haproxy_config_defaults.md | 2 +- documentation/haproxy_config_global.md | 2 +- documentation/haproxy_fastcgi.md | 2 +- documentation/haproxy_frontend.md | 20 ++++++++--------- documentation/haproxy_install.md | 2 +- documentation/haproxy_listen.md | 28 ++++++++++++------------ documentation/haproxy_mailer.md | 4 ++-- documentation/haproxy_peer.md | 2 +- documentation/haproxy_resolver.md | 2 +- documentation/haproxy_service.md | 2 +- documentation/haproxy_use_backend.md | 10 ++++----- documentation/haproxy_userlist.md | 2 +- documentation/partial_config_file.md | 2 +- documentation/partial_extra_options.md | 2 +- 17 files changed, 52 insertions(+), 52 deletions(-) diff --git a/documentation/haproxy_acl.md b/documentation/haproxy_acl.md index 3279d18d..94a970d5 100644 --- a/documentation/haproxy_acl.md +++ b/documentation/haproxy_acl.md @@ -16,7 +16,7 @@ Introduced: v4.2.0 ## Properties | Name | Type | Default | Description | Allowed Values | -|----------------|---------------|---------|--------------------------------------------------------------|---------------------------------| +| -------------- | ------------- | ------- | ------------------------------------------------------------ | ------------------------------- | | `acl` | String, Array | None | The access control list items | Allowed HAProxy acl values | | `section` | String | None | The section where the acl(s) should be applied | `frontend`, `listen`, `backend` | | `section_name` | String | None | The name of the specific frontend, listen or backend section | | diff --git a/documentation/haproxy_backend.md b/documentation/haproxy_backend.md index 1ae3db7b..f8e89fd4 100644 --- a/documentation/haproxy_backend.md +++ b/documentation/haproxy_backend.md @@ -18,15 +18,15 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) -| Name | Type | Default | Description | Allowed Values | -|-----------------|---------------|---------|--------------------------------------------------------------------|----------------------------| -| `mode` | String | None | Set the running mode or protocol of the instance | `http`, `tcp` | -| `server` | String, Array | None | Servers the backend routes to | | -| `tcp_request` | String, Array | None | HAProxy `tcp-request` settings | | -| `acl` | Array | None | Access control list items | Allowed HAProxy acl values | -| `option` | Array | None | Array of HAProxy `option` directives | | -| `extra_options` | Hash | None | Used for setting any HAProxy directives | | -| `hash_type` | String | None | Specify a method to use for mapping hashes to servers | `consistent`, `map-based` | +| Name | Type | Default | Description | Allowed Values | +| --------------- | ------------- | ------- | ----------------------------------------------------- | -------------------------- | +| `mode` | String | None | Set the running mode or protocol of the instance | `http`, `tcp` | +| `server` | String, Array | None | Servers the backend routes to | | +| `tcp_request` | String, Array | None | HAProxy `tcp-request` settings | | +| `acl` | Array | None | Access control list items | Allowed HAProxy acl values | +| `option` | Array | None | Array of HAProxy `option` directives | | +| `extra_options` | Hash | None | Used for setting any HAProxy directives | | +| `hash_type` | String | None | Specify a method to use for mapping hashes to servers | `consistent`, `map-based` | ## Examples diff --git a/documentation/haproxy_cache.md b/documentation/haproxy_cache.md index ef58ee71..1cd9c4a2 100644 --- a/documentation/haproxy_cache.md +++ b/documentation/haproxy_cache.md @@ -18,7 +18,7 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) | Name | Type | Default | Description | Allowed Values | -|-------------------|---------|---------------|-----------------------------------------------------|----------------| +| ----------------- | ------- | ------------- | --------------------------------------------------- | -------------- | | `cache_name` | String | name_property | Name of the cache | | | `total_max_size` | Integer | None | Define the size in RAM of the cache in megabytes | | | `max_object_size` | Integer | None | Define the maximum size of the objects to be cached | | diff --git a/documentation/haproxy_config_defaults.md b/documentation/haproxy_config_defaults.md index 68daea7d..7b4a62f9 100644 --- a/documentation/haproxy_config_defaults.md +++ b/documentation/haproxy_config_defaults.md @@ -18,7 +18,7 @@ This resource also uses the following partial resources: * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) | Name | Type | Default | Description | Allowed Values | -|-------------------|-------------|------------------------------------------------------|-----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------| +| ----------------- | ----------- | ---------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `timeout` | Hash | `{ client: '10s', server: '10s', connect: '10s' }` | Default HAProxy timeout values | | | `log` | String | `global` | Enable per-instance logging of events and traffic | | | `mode` | String | `http` | Set the running mode or protocol of the instance | `http`, `tcp` | diff --git a/documentation/haproxy_config_global.md b/documentation/haproxy_config_global.md index f9601415..3e224b83 100644 --- a/documentation/haproxy_config_global.md +++ b/documentation/haproxy_config_global.md @@ -20,7 +20,7 @@ This resource also uses the following partial resources: * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) | Name | Type | Default | Description | Allowed Values | -|-----------------|-----------------------|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|------------------| +| --------------- | --------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ---------------- | | `pidfile` | String | `/var/run/haproxy.pid` | Writes PIDs of all daemons into file `` | | | `log` | String, Array | `/dev/log syslog info` | Adds a global syslog server | | | `daemon` | TrueClass, FalseClass | `true` | Makes the process fork into background | | diff --git a/documentation/haproxy_fastcgi.md b/documentation/haproxy_fastcgi.md index f7dadeeb..33f552d0 100644 --- a/documentation/haproxy_fastcgi.md +++ b/documentation/haproxy_fastcgi.md @@ -21,7 +21,7 @@ This resource also uses the following partial resources: * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) | Name | Type | Default | Description | Allowed Values | -|--------------|--------|---------|----------------------------------------------------------------------------------|----------------| +| ------------ | ------ | ------- | -------------------------------------------------------------------------------- | -------------- | | `fastcgi` | String | None | Name property - sets the fcgi-app name | | | `docroot` | String | None | Define the document root on the remote host | | | `index` | String | None | Define the script name that will be appended after an URI that ends with a slash | | diff --git a/documentation/haproxy_frontend.md b/documentation/haproxy_frontend.md index c7dce678..1caf010c 100644 --- a/documentation/haproxy_frontend.md +++ b/documentation/haproxy_frontend.md @@ -18,16 +18,16 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) -| Name | Type | Default | Description | Allowed Values | -|-------------------|---------------|--------------|--------------------------------------------------------------------------|----------------------------| -| `bind` | String, Hash | `0.0.0.0:80` | String - sets as given. Hash joins with a space | | -| `mode` | String | None | Set the running mode or protocol of the instance | `http`, `tcp` | -| `maxconn` | Integer | None | Sets the maximum per-process number of concurrent connections | | -| `default_backend` | String | None | Specify the backend to use when no "use_backend" rule has been matched | | -| `use_backend` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | -| `acl` | Array | None | Access control list items | Allowed HAProxy acl values | -| `option` | Array | None | Array of HAProxy `option` directives | | -| `stats` | Hash | None | Enable stats with various options | | +| Name | Type | Default | Description | Allowed Values | +| ----------------- | ------------ | ------------ | ------------------------------------------------------------------------ | -------------------------- | +| `bind` | String, Hash | `0.0.0.0:80` | String - sets as given. Hash joins with a space | | +| `mode` | String | None | Set the running mode or protocol of the instance | `http`, `tcp` | +| `maxconn` | Integer | None | Sets the maximum per-process number of concurrent connections | | +| `default_backend` | String | None | Specify the backend to use when no "use_backend" rule has been matched | | +| `use_backend` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | +| `acl` | Array | None | Access control list items | Allowed HAProxy acl values | +| `option` | Array | None | Array of HAProxy `option` directives | | +| `stats` | Hash | None | Enable stats with various options | | ## Examples diff --git a/documentation/haproxy_install.md b/documentation/haproxy_install.md index 7b5d6198..911936f5 100644 --- a/documentation/haproxy_install.md +++ b/documentation/haproxy_install.md @@ -18,7 +18,7 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) | Name | Type | Default | Description | Allowed Values | -|----------------------|---------|------------------------------------------------------------------|--------------------------------------------------------------------------------|---------------------| +| -------------------- | ------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------- | | `install_type` | String | None | Set the installation type | `package`, `source` | | `bin_prefix` | String | `/usr` | Set the source compile prefix | | | `sensitive` | Boolean | `true` | Ensure that sensitive resource data is not logged by the chef-client | | diff --git a/documentation/haproxy_listen.md b/documentation/haproxy_listen.md index 197ef74b..711c5bf1 100644 --- a/documentation/haproxy_listen.md +++ b/documentation/haproxy_listen.md @@ -20,20 +20,20 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) -| Name | Type | Default | Description | Allowed Values | -|-------------------|---------------|--------------|--------------------------------------------------------------------------|----------------------------| -| `bind` | String, Hash | `0.0.0.0:80` | String - sets as given. Hash - joins with a space | | -| `mode` | String | None | Set the running mode or protocol of the instance | `http`, `tcp` | -| `maxconn` | Integer | None | Sets the maximum per-process number of concurrent connections | | -| `default_backend` | String | None | Specify the backend to use when no "use_backend" rule has been matched | | -| `use_backend` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | -| `http_request` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | -| `http_response` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | -| `acl` | Array | None | Access control list items | Allowed HAProxy acl values | -| `server` | Array | None | Servers the listen section routes to | | -| `stats` | Hash | None | Enable stats with various options | | -| `hash_type` | String | None | Specify a method to use for mapping hashes to servers | `consistent`, `map-based` | -| `option` | Array | None | Array of HAProxy `option` directives | +| Name | Type | Default | Description | Allowed Values | +| ----------------- | ------------ | ------------ | ------------------------------------------------------------------------ | -------------------------- | +| `bind` | String, Hash | `0.0.0.0:80` | String - sets as given. Hash - joins with a space | | +| `mode` | String | None | Set the running mode or protocol of the instance | `http`, `tcp` | +| `maxconn` | Integer | None | Sets the maximum per-process number of concurrent connections | | +| `default_backend` | String | None | Specify the backend to use when no "use_backend" rule has been matched | | +| `use_backend` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | +| `http_request` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | +| `http_response` | Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | +| `acl` | Array | None | Access control list items | Allowed HAProxy acl values | +| `server` | Array | None | Servers the listen section routes to | | +| `stats` | Hash | None | Enable stats with various options | | +| `hash_type` | String | None | Specify a method to use for mapping hashes to servers | `consistent`, `map-based` | +| `option` | Array | None | Array of HAProxy `option` directives | | ## Examples diff --git a/documentation/haproxy_mailer.md b/documentation/haproxy_mailer.md index f70c401a..1c3668b0 100644 --- a/documentation/haproxy_mailer.md +++ b/documentation/haproxy_mailer.md @@ -19,8 +19,8 @@ This resource also uses the following partial resources: | Name | Type | Default | Description | Allowed Values | | --------- | ------------- | ------- | --------------------------------------------------------------------------------------- | -------------- | -| `mailer` | String, Array | None | Defines a mailer inside a mailers section || -| `timeout` | String | None | Defines the time available for a mail/connection to be made and send to the mail-server || +| `mailer` | String, Array | None | Defines a mailer inside a mailers section | | +| `timeout` | String | None | Defines the time available for a mail/connection to be made and send to the mail-server | | ## Examples diff --git a/documentation/haproxy_peer.md b/documentation/haproxy_peer.md index 8d39a41b..2c84c4e3 100644 --- a/documentation/haproxy_peer.md +++ b/documentation/haproxy_peer.md @@ -21,7 +21,7 @@ This resource also uses the following partial resources: * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) | Name | Type | Default | Description | Allowed Values | -|------------------|--------------|---------|-------------------------------------------------------------------------|----------------------------| +| ---------------- | ------------ | ------- | ----------------------------------------------------------------------- | -------------------------- | | `bind` | String, Hash | None | String - sets as given. Hash joins with a space. HAProxy version >= 2.0 | | | `state` | String, nil | nil | Set the state of the peers | `enabled`, `disabled`, nil | | `server` | Array | None | Servers in the peer | | diff --git a/documentation/haproxy_resolver.md b/documentation/haproxy_resolver.md index ca7b2ed7..29df76cb 100644 --- a/documentation/haproxy_resolver.md +++ b/documentation/haproxy_resolver.md @@ -21,7 +21,7 @@ This resource also uses the following partial resources: * [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md) | Name | Type | Default | Description | Allowed Values | -|--------------|-------|---------|------------------------|----------------| +| ------------ | ----- | ------- | ---------------------- | -------------- | | `nameserver` | Array | None | DNS server description | | ## Examples diff --git a/documentation/haproxy_service.md b/documentation/haproxy_service.md index d3bf1095..9e4693d6 100644 --- a/documentation/haproxy_service.md +++ b/documentation/haproxy_service.md @@ -24,7 +24,7 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) | Name | Type | Default | Description | Allowed Values | -|---------------------------|--------------|--------------------------|------------------------------------------------------------------|----------------| +| ------------------------- | ------------ | ------------------------ | ---------------------------------------------------------------- | -------------- | | `bin_prefix` | String | `/usr` | Bin location of the haproxy binary, defaults to /usr | | | `service_name` | String | `haproxy` | | | | `systemd_unit_content` | String, Hash | See the service resource | A string or hash that contains a systemd unit file definition | | diff --git a/documentation/haproxy_use_backend.md b/documentation/haproxy_use_backend.md index 1e34e502..f4f9e16f 100644 --- a/documentation/haproxy_use_backend.md +++ b/documentation/haproxy_use_backend.md @@ -17,11 +17,11 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) -| Name | Type | Default | Description | Allowed Values | -| -------------- | ------------- | -------------------------- | ------------------------------------------------------------------------ | ------------------------------- | -| `use_backend` | String, Array | None | Switch to a specific backend if/unless an ACL-based condition is matched || -| `section` | String | None | The section where the acl(s) should be applied | `frontend`, `listen`, `backend` | -| `section_name` | String | None | The name of the specific frontend, listen or backend section || +| Name | Type | Default | Description | Allowed Values | +| -------------- | ------------- | ------- | ------------------------------------------------------------------------ | ------------------------------- | +| `use_backend` | String, Array | None | Switch to a specific backend if/unless an ACL-based condition is matched | | +| `section` | String | None | The section where the acl(s) should be applied | `frontend`, `listen`, `backend` | +| `section_name` | String | None | The name of the specific frontend, listen or backend section | | ## Examples diff --git a/documentation/haproxy_userlist.md b/documentation/haproxy_userlist.md index 14acc3c2..961ce12a 100644 --- a/documentation/haproxy_userlist.md +++ b/documentation/haproxy_userlist.md @@ -18,7 +18,7 @@ This resource also uses the following partial resources: * [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md) | Name | Type | Default | Description | Allowed Values | -|---------|------|---------|--------------------------------------------------|----------------| +| ------- | ---- | ------- | ------------------------------------------------ | -------------- | | `group` | Hash | None | Adds group `` to the current userlist | | | `user` | Hash | None | Adds user `` to the current userlist | | diff --git a/documentation/partial_config_file.md b/documentation/partial_config_file.md index 479d1b54..8fa39e0d 100644 --- a/documentation/partial_config_file.md +++ b/documentation/partial_config_file.md @@ -9,7 +9,7 @@ Introduced: v11.0.0 ## Properties | Name | Type | Default | Description | Allowed Values | -|--------------------|--------|----------------------------|-------------------------------------------------------------|-----------------| +| ------------------ | ------ | -------------------------- | ----------------------------------------------------------- | --------------- | | `user` | String | `haproxy` | Set to override haproxy user, defaults to haproxy | | | `group` | String | `haproxy` | Set to override haproxy group, defaults to haproxy | | | `config_dir` | String | `/etc/haproxy` | The directory where the HAProxy configuration resides | Valid directory | diff --git a/documentation/partial_extra_options.md b/documentation/partial_extra_options.md index 13677234..c195aabd 100644 --- a/documentation/partial_extra_options.md +++ b/documentation/partial_extra_options.md @@ -9,5 +9,5 @@ Introduced: v11.0.0 ## Properties | Name | Type | Default | Description | Allowed Values | -|-----------------|------|---------|-----------------------------------------|----------------| +| --------------- | ---- | ------- | --------------------------------------- | -------------- | | `extra_options` | Hash | None | Used for setting any HAProxy directives | | From b61c967a78613442601916d326ebbd9293f51afe Mon Sep 17 00:00:00 2001 From: "Benjamin M. Hughes" Date: Thu, 1 Feb 2024 10:37:41 +0000 Subject: [PATCH 3/3] Remove config_4 from ci --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b92baf8b..2cfe3d33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,6 @@ jobs: suite: - config-2 - config-3 - - config-4 - config-acl - config-array - config-backend-search