app_info – Retrieve information about configured applications

Retrieve NGINX Unit application configuration.

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

Examples

- name: Retrieve information about all applications
  steampunk.unit.app_info:

- name: Retrieve information about a specific application
  steampunk.unit.app_info:
    name: sample_app

Parameters

name (optional)

Name of the application to retrieve. If parameter is not specified, retrieve information about all applications.

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

object (On success and if I(state) == C(present)), dict, )

Object representing NGINX Unit application.

name (always), str, )

Application name.

limits (if set), dict, )

Set the application’s lifecycle parameters.

timeout (), int, )

Request timeout in seconds.

requests (), int, )

Maximum number of requests Unit allows an app to serve.

no_processes (if set), int, )

Number of processes that should be running at one time.

processes (if set), dict, )

Dynamic process limits.

max (), int, )

Maximum number of application processes.

spare (), int, )

Minimum number of idle processes.

idle_timeout (), int, )

Time in seconds before terminating an idle process.

working_directory (if set), str, )

The app’s working directory.

user (if set), str, )

Username that runs the app process.

group (if set), str, )

Group name that runs the app process.

environment (if set), dict, )

Environment variables to be passed to the application.

module (if I(type) is C(python)), str, )

WSGI module to run.

path (if set and I(type) is C(python)), str, )

Additional lookup path for Python modules.

home (if set and I(type) is C(python)), str, )

Virtual environment in use.