community.general.sensu_subscription (8.5.0) — module

Manage Sensu subscriptions

Authors: Anders Ingemann (@andsens)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manage which I(sensu channels) a machine should subscribe to

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Subscribe to the nginx channel
- name: Subscribe to nginx checks
  community.general.sensu_subscription: name=nginx
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Unsubscribe from the common checks channel
- name: Unsubscribe from common checks
  community.general.sensu_subscription: name=common state=absent

Inputs

    
name:
    description:
    - The name of the channel
    required: true
    type: str

path:
    default: /etc/sensu/conf.d/subscriptions.json
    description:
    - Path to the subscriptions json file
    required: false
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether the machine should subscribe or unsubscribe from the channel
    required: false
    type: str

backup:
    default: false
    description:
    - Create a backup file (if yes), including the timestamp information so you
    - can get the original file back if you somehow clobbered it incorrectly.
    required: false
    type: bool

Outputs

reasons:
  description: the reasons why the module changed or did not change something
  returned: success
  sample:
  - channel subscription was absent and state is `present'
  type: list