sensu.sensu_go.backends (1.14.0) — filter

Format websocket connection for backends hosts from inventory.

| "added in version" 1.13.2 of sensu.sensu_go"

Authors: Tadej Borovsak (@tadeboro)

Install collection

Install with ansible-galaxy collection install sensu.sensu_go:==1.14.0


Add to requirements.yml

  collections:
    - name: sensu.sensu_go
      version: 1.14.0

Description

Socket connection format function.

Filter backends hosts from ansible inventory groups.

The return value is a list of websocket connection addresses.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Filter backends from ansible inventory and format a list of websocket connection addresses
    ansible.builtin.debug:
      msg: "{{ hostvars | sensu.sensu_go.backends(groups) }}"

Inputs

    
_input:
    description: Inventory host variables (hostvars).
    required: true
    type: dict

groups:
    description: List of ansible inventory groups.
    required: true
    type: list

Outputs

_value:
  description: List of websocket connection addresses.
  type: list