dellemc.openmanage.redfish_event_subscription module – Manage Redfish Subscriptions
Note
This module is part of the dellemc.openmanage collection (version 7.6.1).
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 dellemc.openmanage
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.openmanage.redfish_event_subscription
.
New in dellemc.openmanage 4.1.0
Synopsis
This module allows to add or delete Redfish Event subscriptions.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.8.6
Parameters
Parameter |
Comments |
---|---|
IP address of the target out-of-band controller. For example- <ipaddress>:<port>. |
|
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
|
The HTTPS URI of the destination to send events. HTTPS is required. |
|
Specifies the format type of the event to be subscribed.
Choices:
|
|
Specifies the event type to be subscribed.
Choices:
|
|
Password of the target out-of-band controller. |
|
Choices:
|
|
The socket level timeout in seconds. Default: |
|
Username of the target out-of-band controller. |
|
If Configure Prior to collection version Choices:
|
Notes
Note
event_type needs to be
MetricReport
and event_format_type needs to beMetricReport
for metrics subscription.event_type needs to be
Alert
and event_format_type needs to beEvent
for event subscription.Modifying a subscription is not supported.
Context is always set to RedfishEvent.
This module supports
check_mode
.
Examples
---
- name: Add Redfish metric subscription
redfish_event_subscription:
baseuri: "192.168.0.1"
username: "user_name"
password: "user_password"
ca_path: "/path/to/ca_cert.pem"
destination: "https://192.168.1.100:8188"
event_type: MetricReport
event_format_type: MetricReport
state: present
- name: Add Redfish alert subscription
redfish_event_subscription:
baseuri: "192.168.0.1"
username: "user_name"
password: "user_password"
ca_path: "/path/to/ca_cert.pem"
destination: "https://server01.example.com:8188"
event_type: Alert
event_format_type: Event
state: present
- name: Delete Redfish subscription with a specified destination
redfish_event_subscription:
baseuri: "192.168.0.1"
username: "user_name"
password: "user_password"
ca_path: "/path/to/ca_cert.pem"
destination: "https://server01.example.com:8188"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Details of http error. Returned: on http error Sample: |
|
Overall status of the task. Returned: always Sample: |
|
Returns subscription object created Returned: on adding subscription successfully Sample: |