listener_info – List NGINX Unit listener(s)

Retrieve NGINX Unit listener configuration.

Upstream docs are at https://unit.nginx.org/configuration/#listeners.

Examples

- name: Retrieve information about all listeners
  steampunk.unit.listener_info:

- name: Retrieve information about a specific listener
  steampunk.unit.listener:
    pattern: "127.0.0.1:80"

Parameters

pattern (optional)

A pattern to retrieve information about. Retrieve all listeners of not set.

type: str
provider (optional)

Connection parameters.

type: dict
ca_path (optional)

Path to the CA bundle that should be used to validate the backend certificate.

If this parameter is not set, module will use the CA bundle that python is using.

Can also be set using the UNIT_CA_PATH environment variable.

type: path
endpoint (optional)

HTTP or UNIX uri that should be used to communicate with the Unit.

The uri MUST be prefixed by either http://, https://, or unix://.

By default, modules will try to connect to unix:///var/run/unit/control.sock, and if this socket does not exist, fallback to unix:///var/run/control.unit.sock.

Can also be set using the UNIT_ENDPOINT environment variable.

type: str
password (optional)

Password that is used when the endpoint is protected using the basic authentication.

This parameter is ignored when the enpoint parameter points to an unix socket.

Value is masked in the logs.

Can also be set using the UNIT_ENDPOINT environment variable.

type: str
username (optional)

Username that is used when the enpoint is protected using the basic authentication.

This parameter is ignored when the enpoint parameter points to an unix socket.

Can also be set using the UNIT_ENDPOINT environment variable.

type: str
verify (optional)

Flag that controls the certificate validation.

If you are using self-signed certificates, you can set this parameter to false.

ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the auth.ca_path parameter.

Can also be set using the UNIT_VERIFY environment variable.

type: bool
default: True

Return Values

objects (always), list, )

Objects representing NGINX Unit listeners.

pattern (always), str, 127.0.0.1:3000)

Listener pattern.

pass (always), str, applications/test)

Destination for incomming requests.

tls (if set), complex, )

SSL/TLS configuration

certificate (always), str, certificates/my-bundle)

Certificate bundle