Skip to content

pfsense_haproxy_backend

Orion Poplawski edited this page Jan 13, 2023 · 2 revisions

pfsensible.core.pfsense_haproxy_backend


        Manage pfSense HAProxy backends

ADDED IN: version 0.1.0 of pfsensible.core

OPTIONS (= is mandatory):

- balance
        The load balancing option.
        choices: [none, roundrobin, static-rr, leastconn, source, uri]
        default: none
        type: str

- balance_uridepth
        Indicates the maximum directory depth to be used to compute
        the hash. One level is counted for each slash in the request.
        default: null
        type: int

- balance_urilen
        Indicates that the algorithm should only consider that many
        characters at the beginning of the URI to compute the hash.
        default: null
        type: int

- balance_uriwhole
        Allow using whole URI including url parameters behind a
        question mark.
        default: null
        type: bool

- check_frequency
        The check interval (in milliseconds). For HTTP/HTTPS defaults
        to 1000 if left blank. For TCP no check will be performed if
        left empty.
        default: null
        type: int

- check_type
        Health check method.
        choices: [none, Basic, HTTP, Agent, LDAP, MySQL, PostgreSQL, Redis, SMTP, ESMTP, SSL]
        default: none
        type: str

- connection_timeout
        The time (in milliseconds) we give up if the connection does
        not complete within (default 30000).
        default: null
        type: int

- httpcheck_method
        HTTP check method.
        choices: [OPTIONS, HEAD, GET, POST, PUT, DELETE, TRACE]
        default: null
        type: str

- log_checks
        When this option is enabled, any change of the health check
        status or to the server's health will be logged.
        default: null
        type: bool

- monitor_domain
        Domain used in checks (SMTP and ESMTP)
        default: null
        type: str

- monitor_httpversion
        Defaults to "HTTP/1.0" if left blank.
        default: null
        type: str

- monitor_uri
        Url used by http check requests.
        default: null
        type: str

- monitor_username
        Username used in checks (MySQL and PostgreSQL)
        default: null
        type: str

= name
        The backend name.
        type: str

- retries
        After a connection failure to a server, it is possible to
        retry, potentially on another server.
        default: null
        type: int

- server_timeout
        The time (in milliseconds) we accept to wait for data from the
        server, or for the server to accept data (default 30000).
        default: null
        type: int

- state
        State in which to leave the backend
        choices: [present, absent]
        default: present
        type: str


AUTHOR: Frederic Bor (@f-bor)

METADATA:
  metadata_version: '1.1'
  status:
  - preview
  supported_by: community

EXAMPLES:

- name: Add backend
  pfsense_haproxy_backend:
    name: exchange
    balance: leastconn
    httpcheck_method: HTTP
    state: present

- name: Remove backend
  pfsense_haproxy_backend:
    name: exchange
    state: absent


RETURN VALUES:
- commands
        the set of commands that would be pushed to the remote device
        (if pfSense had a CLI)
        returned: always
        sample: ['create haproxy_backend ''exchange'', balance=''leastconn'', httpcheck_method=''HTTP''',
          delete haproxy_backend 'exchange']
        type: list