community.general.sensu_subscription – Manage Sensu subscriptions
Note
This plugin is part of the community.general collection (version 3.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.sensu_subscription
.
Parameters
Parameter |
Comments |
---|---|
Create a backup file (if yes), including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. Choices:
|
|
The name of the channel |
|
Path to the subscriptions json file Default: “/etc/sensu/conf.d/subscriptions.json” |
|
Whether the machine should subscribe or unsubscribe from the channel Choices:
|
Examples
# Subscribe to the nginx channel
- name: Subscribe to nginx checks
community.general.sensu_subscription: name=nginx
# Unsubscribe from the common checks channel
- name: Unsubscribe from common checks
community.general.sensu_subscription: name=common state=absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
the reasons why the module changed or did not change something Returned: success Sample: [“channel subscription was absent and state is `present\u0027”] |
Authors
Anders Ingemann (@andsens)