From 51006090fc0ebc7adf774227871450786f4fa0b6 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 15 Jan 2024 20:50:11 -0700 Subject: [PATCH 1/4] Add CHANGELOG.rst --- CHANGELOG.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CHANGELOG.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..200e746 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,11 @@ +============================= +pfSensible.HAProxy Release Notes +============================= + +.. contents:: Topics + + +v0.1.0 +====== + +This simply moved the pfsense_haproxy_backend and pfsense_haproxy_backend_server modules from version 0.6.0 of pfsensible.core to pfsensible.haproxy. From 8c1084cd2b59dad8cfaee24547c1e2f9653c755a Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 15 Jan 2024 21:09:51 -0700 Subject: [PATCH 2/4] Add meta/runtime.yml --- meta/runtime.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 meta/runtime.yml diff --git a/meta/runtime.yml b/meta/runtime.yml new file mode 100644 index 0000000..726165e --- /dev/null +++ b/meta/runtime.yml @@ -0,0 +1 @@ +requires_ansible: ">=2.12" From ca8a0cc2927adb89bf046cdf6eae39d29597a4b3 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 15 Jan 2024 21:02:49 -0700 Subject: [PATCH 3/4] Add antsibull-changelog config --- changelogs/config.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 changelogs/config.yaml diff --git a/changelogs/config.yaml b/changelogs/config.yaml new file mode 100644 index 0000000..19a6dae --- /dev/null +++ b/changelogs/config.yaml @@ -0,0 +1,32 @@ +changelog_filename_template: ../CHANGELOG.rst +changelog_filename_version_depth: 0 +changes_file: changelog.yaml +changes_format: combined +ignore_other_fragment_extensions: true +keep_fragments: false +mention_ancestor: true +new_plugins_after_name: removed_features +notesdir: fragments +prelude_section_name: release_summary +prelude_section_title: Release Summary +sanitize_changelog: true +sections: +- - major_changes + - Major Changes +- - minor_changes + - Minor Changes +- - breaking_changes + - Breaking Changes / Porting Guide +- - deprecated_features + - Deprecated Features +- - removed_features + - Removed Features (previously deprecated) +- - security_fixes + - Security Fixes +- - bugfixes + - Bugfixes +- - known_issues + - Known Issues +title: pfSensible.HAProxy +trivial_section_name: trivial +use_fqcn: true From fe1f59a2d2de09e36d825dda592ff8495d3dafbd Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 15 Jan 2024 21:06:17 -0700 Subject: [PATCH 4/4] [pfsense_haproxy_backend] Update example for httpcheck_method to use OPTION instead of invalid HTTP --- changelogs/fragments/httpcheck_method.yml | 2 ++ plugins/modules/pfsense_haproxy_backend.py | 12 +++++++----- tests/plays/haproxy.yml | 15 +++++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/httpcheck_method.yml create mode 100644 tests/plays/haproxy.yml diff --git a/changelogs/fragments/httpcheck_method.yml b/changelogs/fragments/httpcheck_method.yml new file mode 100644 index 0000000..65fbb3a --- /dev/null +++ b/changelogs/fragments/httpcheck_method.yml @@ -0,0 +1,2 @@ +minor_changes: + - Update example for pfsense_haproxy_backend httpcheck_method to use OPTION instead of invalid HTTP. diff --git a/plugins/modules/pfsense_haproxy_backend.py b/plugins/modules/pfsense_haproxy_backend.py index d3e3c02..6cb5412 100644 --- a/plugins/modules/pfsense_haproxy_backend.py +++ b/plugins/modules/pfsense_haproxy_backend.py @@ -69,7 +69,9 @@ required: false type: bool httpcheck_method: - description: HTTP check method. + description: HTTP check method. OPTIONS is the method usually best to perform server checks, HEAD and GET can also be used. If the server gets marked as + down in the stats page then changing this to GET usually has the biggest chance of working, but might cause more processing overhead on the websever and + is less easy to filter out of its logs. required: false type: str choices: ['OPTIONS', 'HEAD', 'GET', 'POST', 'PUT', 'DELETE', 'TRACE'] @@ -98,14 +100,14 @@ EXAMPLES = """ - name: Add backend - pfsense_haproxy_backend: + pfsensible.haproxy.pfsense_haproxy_backend: name: exchange balance: leastconn - httpcheck_method: HTTP + httpcheck_method: OPTIONS state: present - name: Remove backend - pfsense_haproxy_backend: + pfsensible.haproxy.pfsense_haproxy_backend: name: exchange state: absent """ @@ -115,7 +117,7 @@ description: the set of commands that would be pushed to the remote device (if pfSense had a CLI) returned: always type: list - sample: ["create haproxy_backend 'exchange', balance='leastconn', httpcheck_method='HTTP'", "delete haproxy_backend 'exchange'"] + sample: ["create haproxy_backend 'exchange', balance='leastconn', httpcheck_method='OPTIONS'", "delete haproxy_backend 'exchange'"] """ from ansible.module_utils.basic import AnsibleModule diff --git a/tests/plays/haproxy.yml b/tests/plays/haproxy.yml new file mode 100644 index 0000000..cece37a --- /dev/null +++ b/tests/plays/haproxy.yml @@ -0,0 +1,15 @@ +--- +- hosts: pfsense + gather_facts: false + tasks: + - name: Add backend + pfsensible.haproxy.pfsense_haproxy_backend: + name: exchange + balance: leastconn + httpcheck_method: OPTIONS + state: present + + - name: Remove backend + pfsensible.haproxy.pfsense_haproxy_backend: + name: exchange + state: absent