Skip to content

pfsense_haproxy_backend

Frederic Bor edited this page Dec 15, 2019 · 2 revisions

pfsense_haproxy_backend

> PFSENSE_HAPROXY_BACKEND    (/home/fbor/ansible/lib/ansible/modules/network/pfsense/pfsense_haproxy_backend.py)

        Manage pfSense haproxy backends

  * This module is maintained by The Ansible Community
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:
          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:
    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'"]