Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Httpcheck method incorrect in example #2

Merged
merged 4 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -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.
32 changes: 32 additions & 0 deletions changelogs/config.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions changelogs/fragments/httpcheck_method.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Update example for pfsense_haproxy_backend httpcheck_method to use OPTION instead of invalid HTTP.
1 change: 1 addition & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requires_ansible: ">=2.12"
12 changes: 7 additions & 5 deletions plugins/modules/pfsense_haproxy_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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
"""
Expand All @@ -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
Expand Down
15 changes: 15 additions & 0 deletions tests/plays/haproxy.yml
Original file line number Diff line number Diff line change
@@ -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