Skip to content

Commit 3439efc

Browse files
author
Maxime Wewer
committed
feat(haproxy): sync update
1 parent 8edd579 commit 3439efc

34 files changed

+100
-84
lines changed

docs/source/modules/haproxy.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ Core load balancing setup with backends, frontends, servers, and health checks:
345345
346346
----
347347

348+
.. _modules_haproxy_troubleshooting:
349+
348350
Troubleshooting
349351
***************
350352

@@ -371,4 +373,4 @@ For high-traffic scenarios:
371373
- Increase ``buffer_size`` for large requests/responses
372374
- Adjust ``timeout_*`` values based on your application needs
373375

374-
See: :ref:`troubleshooting <troubleshooting>`
376+
See: :ref:`troubleshooting <modules_haproxy_troubleshooting>`

docs/source/modules/haproxy_advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,4 @@ Examples
147147
</html>
148148
149149
150-
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <troubleshooting>`
150+
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <modules_haproxy_troubleshooting>`

docs/source/modules/haproxy_auth.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: ../_include/head.rst
44

5-
============================
5+
==============================
66
HAProxy authentication modules
7-
============================
7+
==============================
88

99
**STATE**: unstable
1010

@@ -23,7 +23,7 @@ These modules manage HAProxy authentication users and groups for access control.
2323
.. _haproxy_user:
2424

2525
oxlorg.opnsense.haproxy_user
26-
=================================
26+
============================
2727

2828
Manages HAProxy authentication users.
2929

@@ -53,7 +53,7 @@ Examples
5353
.. _haproxy_group:
5454

5555
oxlorg.opnsense.haproxy_group
56-
===================================
56+
=============================
5757

5858
Manages HAProxy authentication groups.
5959

@@ -80,4 +80,4 @@ Examples
8080
enabled: true
8181
8282
83-
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <troubleshooting>`
83+
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <modules_haproxy_troubleshooting>`

docs/source/modules/haproxy_core.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: ../_include/head.rst
44

5-
=====================================
5+
===================================
66
HAProxy core load balancing modules
7-
=====================================
7+
===================================
88

99
**STATE**: unstable
1010

@@ -25,7 +25,7 @@ These modules manage the core HAProxy load balancing functionality including bac
2525
.. _haproxy_backend:
2626

2727
oxlorg.opnsense.haproxy_backend
28-
====================================
28+
===============================
2929

3030
Manages HAProxy backend pools with servers, load balancing algorithms, health checks, persistence, and advanced settings.
3131

@@ -134,7 +134,7 @@ Examples
134134
.. _haproxy_frontend:
135135

136136
oxlorg.opnsense.haproxy_frontend
137-
=====================================
137+
================================
138138

139139
Manages HAProxy frontend services with SSL offloading, logging, traffic routing, and advanced features.
140140

@@ -251,7 +251,7 @@ Examples
251251
.. _haproxy_server:
252252

253253
oxlorg.opnsense.haproxy_server
254-
===================================
254+
==============================
255255

256256
Manages HAProxy backend servers with SSL, health checks, connection settings, and advanced configurations.
257257

@@ -325,7 +325,7 @@ Examples
325325
.. _haproxy_healthcheck:
326326

327327
oxlorg.opnsense.haproxy_healthcheck
328-
========================================
328+
===================================
329329

330330
Manages HAProxy health monitoring for servers with various check types including HTTP, TCP, and specialized protocols.
331331

@@ -399,4 +399,6 @@ Examples
399399
type: 'mysql'
400400
mysql_user: 'healthcheck'
401401
mysql_post41: true
402-
interval: '10s'
402+
interval: '10s'
403+
404+
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <modules_haproxy_troubleshooting>`

docs/source/modules/haproxy_general.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ These modules manage the general HAProxy configuration including settings, stati
2828
.. _haproxy_general_settings:
2929

3030
oxlorg.opnsense.haproxy_general_settings
31-
==============================================
31+
========================================
3232

3333
Manages the basic operational settings for HAProxy.
3434

@@ -60,7 +60,7 @@ Examples
6060
.. _haproxy_general_stats:
6161

6262
oxlorg.opnsense.haproxy_general_stats
63-
==========================================
63+
=====================================
6464

6565
Manages HAProxy statistics and monitoring configuration.
6666

@@ -100,7 +100,7 @@ Examples
100100
.. _haproxy_general_defaults:
101101

102102
oxlorg.opnsense.haproxy_general_defaults
103-
=============================================
103+
========================================
104104

105105
Manages HAProxy default connection and timeout settings.
106106

@@ -137,7 +137,7 @@ Examples
137137
.. _haproxy_general_tuning:
138138

139139
oxlorg.opnsense.haproxy_general_tuning
140-
===========================================
140+
======================================
141141

142142
Manages HAProxy performance tuning and advanced configuration.
143143

@@ -190,7 +190,7 @@ Examples
190190
.. _haproxy_general_logging:
191191

192192
oxlorg.opnsense.haproxy_general_logging
193-
============================================
193+
=======================================
194194

195195
Manages HAProxy logging configuration.
196196

@@ -220,7 +220,7 @@ Examples
220220
.. _haproxy_general_peers:
221221

222222
oxlorg.opnsense.haproxy_general_peers
223-
==========================================
223+
=====================================
224224

225225
Manages HAProxy peer synchronization for high availability.
226226

@@ -256,7 +256,7 @@ Examples
256256
.. _haproxy_general_cache:
257257

258258
oxlorg.opnsense.haproxy_general_cache
259-
==========================================
259+
=====================================
260260

261261
Manages HAProxy caching configuration.
262262

@@ -285,4 +285,4 @@ Examples
285285
max_secondary_entries: 20
286286
287287
288-
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <troubleshooting>`
288+
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <modules_haproxy_troubleshooting>`

docs/source/modules/haproxy_rules.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: ../_include/head.rst
44

5-
================================
5+
===============================
66
HAProxy traffic control modules
7-
================================
7+
===============================
88

99
**STATE**: unstable
1010

@@ -23,7 +23,7 @@ These modules manage HAProxy traffic control through ACLs (Access Control Lists)
2323
.. _haproxy_acl:
2424

2525
oxlorg.opnsense.haproxy_acl
26-
=================================
26+
===========================
2727

2828
Manages HAProxy Access Control Lists for traffic filtering and condition matching.
2929

@@ -120,7 +120,7 @@ Examples
120120
.. _haproxy_action:
121121

122122
oxlorg.opnsense.haproxy_action
123-
====================================
123+
==============================
124124

125125
Manages HAProxy Actions that execute when ACL conditions are met.
126126

@@ -194,4 +194,4 @@ Examples
194194
type: 'http-request_allow'
195195
196196
197-
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <troubleshooting>`
197+
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <modules_haproxy_troubleshooting>`

docs/source/modules/haproxy_support.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: ../_include/head.rst
44

5-
==================================
5+
========================================
66
HAProxy infrastructure & support modules
7-
==================================
7+
========================================
88

99
**STATE**: unstable
1010

@@ -24,7 +24,7 @@ These modules manage HAProxy supporting infrastructure including email notificat
2424
.. _haproxy_mailer:
2525

2626
oxlorg.opnsense.haproxy_mailer
27-
==================================
27+
==============================
2828

2929
Manages HAProxy email notifications for alerts and monitoring.
3030

@@ -77,7 +77,7 @@ Examples
7777
.. _haproxy_mapfile:
7878

7979
oxlorg.opnsense.haproxy_mapfile
80-
===================================
80+
===============================
8181

8282
Manages HAProxy map files for dynamic configuration and content routing.
8383

@@ -128,7 +128,7 @@ Examples
128128
.. _haproxy_resolver:
129129

130130
oxlorg.opnsense.haproxy_resolver
131-
====================================
131+
================================
132132

133133
Manages HAProxy DNS resolvers for dynamic server resolution and health checking.
134134

@@ -209,4 +209,4 @@ Examples
209209
hold_valid: '15s'
210210
211211
212-
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <troubleshooting>`
212+
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <modules_haproxy_troubleshooting>`

docs/source/modules/haproxy_system.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: ../_include/head.rst
44

5-
============================
5+
====================================
66
HAProxy performance & system modules
7-
============================
7+
====================================
88

99
**STATE**: unstable
1010

@@ -23,7 +23,7 @@ These modules manage HAProxy system performance and maintenance settings.
2323
.. _haproxy_cpu:
2424

2525
oxlorg.opnsense.haproxy_cpu
26-
=================================
26+
===========================
2727

2828
Manages CPU affinity rules for HAProxy processes.
2929

@@ -54,7 +54,7 @@ Examples
5454
.. _haproxy_maintenance:
5555

5656
oxlorg.opnsense.haproxy_maintenance
57-
========================================
57+
===================================
5858

5959
Manages HAProxy maintenance and monitoring settings.
6060

@@ -80,4 +80,4 @@ Examples
8080
8181
**Note**: For general HAProxy configuration like tuning, logging, cache, and other settings, see :ref:`modules_haproxy_general`.
8282

83-
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <troubleshooting>`
83+
See also: :ref:`modules_haproxy` and :ref:`troubleshooting <modules_haproxy_troubleshooting>`

meta/runtime.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,17 @@ action_groups:
195195
- oxlorg.opnsense.haproxy_frontend
196196
- oxlorg.opnsense.haproxy_healthcheck
197197
- oxlorg.opnsense.haproxy_server
198+
wazuh:
199+
- oxlorg.opnsense.wazuh_agent
198200
raw:
199201
- oxlorg.opnsense.raw
200202
access:
201203
- oxlorg.opnsense.user
202204
- oxlorg.opnsense.group
203205
- oxlorg.opnsense.privilege
206+
nut:
207+
- oxlorg.opnsense.nut
208+
- oxlorg.opnsense.nut_diagnostics
204209
all:
205210
- metadata:
206211
extend_group:
@@ -227,10 +232,13 @@ action_groups:
227232
- oxlorg.opnsense.acme
228233
- oxlorg.opnsense.postfix
229234
- oxlorg.opnsense.hasync
235+
- oxlorg.opnsense.wazuh
230236
- oxlorg.opnsense.raw
231237
- oxlorg.opnsense.access
232238
- oxlorg.opnsense.dnsmasq
233239
- oxlorg.opnsense.haproxy
240+
- oxlorg.opnsense.nut
241+
- oxlorg.opnsense.nut_diagnostics
234242

235243
plugin_routing:
236244
modules:

plugins/module_utils/main/haproxy_acl.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from ansible_collections.oxlorg.opnsense.plugins.module_utils.base.api import Session
44
from ansible_collections.oxlorg.opnsense.plugins.module_utils.base.cls import BaseModule
5+
from ansible_collections.oxlorg.opnsense.plugins.module_utils.helper.validate import is_unset
56

67

78
class HaproxyAcl(BaseModule):
@@ -101,6 +102,9 @@ def check(self) -> None:
101102
self._base_check()
102103

103104
if self.p['state'] == 'present':
105+
if is_unset(self.p['expression']):
106+
self.m.fail_json("You need to provide an 'expression' to create an ACL!")
107+
104108
if self.p.get('allowed_users'):
105109
self.b.find_multiple_links(
106110
field='allowed_users',
@@ -113,9 +117,9 @@ def check(self) -> None:
113117
existing=self.existing_groups,
114118
existing_field_id='name',
115119
)
116-
# if self.p.get('nbsrv_backend'):
117-
# self.b.find_single_link(
118-
# field='nbsrv_backend',
119-
# existing=self.existing_backends,
120-
# existing_field_id='name',
121-
# )
120+
if self.p.get('nbsrv_backend'):
121+
self.b.find_single_link(
122+
field='nbsrv_backend',
123+
existing=self.existing_backends,
124+
existing_field_id='name',
125+
)

0 commit comments

Comments
 (0)