dellemc / dellemc.openmanage / 9.1.0 / module / redfish_event_subscription Manage Redfish Subscriptions | "added in version" 4.1.0 of dellemc.openmanage" Authors: Trevor Squillario (@TrevorSquillario), Sachin Apagundi (@sachin-apa)dellemc.openmanage.redfish_event_subscription (9.1.0) — module
Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0
collections: - name: dellemc.openmanage version: 9.1.0
This module allows to add or delete Redfish Event subscriptions.
--- - 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
state: choices: - present - absent default: present description: - C(present) adds new event subscription. - C(absent) deletes event subscription with the specified I(destination). type: str baseuri: description: IP address of the target out-of-band controller. For example- <ipaddress>:<port>. required: true type: str ca_path: description: - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. type: path version_added: 5.0.0 version_added_collection: dellemc.openmanage timeout: default: 30 description: The socket level timeout in seconds. type: int version_added: 5.0.0 version_added_collection: dellemc.openmanage password: description: - Password of the target out-of-band controller. - If the password is not provided, then the environment variable C(IDRAC_PASSWORD) is used. - 'Example: export IDRAC_PASSWORD=password' required: true type: str username: description: - Username of the target out-of-band controller. - If the username is not provided, then the environment variable C(IDRAC_USERNAME) is used. - 'Example: export IDRAC_USERNAME=username' required: true type: str event_type: choices: - Alert - MetricReport default: Alert description: - Specifies the event type to be subscribed. - C(Alert) used to subscribe for alert. - C(MetricReport) used to subscribe for the metrics report. type: str destination: description: - The HTTPS URI of the destination to send events. - HTTPS is required. required: true type: str validate_certs: default: true description: - If C(false), the SSL certificates will not be validated. - Configure C(false) only on personally controlled sites where self-signed certificates are used. - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default. type: bool version_added: 5.0.0 version_added_collection: dellemc.openmanage event_format_type: choices: - Event - MetricReport default: Event description: - Specifies the format type of the event to be subscribed. - C(Event) used to subscribe for Event format type. - C(MetricReport) used to subscribe for the metrics report format type. type: str
error_info: description: Details of http error. returned: on http error sample: error: '@Message.ExtendedInfo': - Message: Unable to complete the operation because the JSON data format entered is invalid. Resolution: 'Do the following and the retry the operation: 1) Enter the correct JSON data format and retry the operation. 2) Make sure that no syntax error is present in JSON data format. 3) Make sure that a duplicate key is not present in JSON data format.' Severity: Critical - Message: The request body submitted was malformed JSON and could not be parsed by the receiving service. Resolution: Ensure that the request body is valid JSON and resubmit the request. Severity: Critical code: Base.1.2.GeneralError message: A general error has occurred. See ExtendedInfo for more information. type: dict msg: description: Overall status of the task. returned: always sample: Successfully added the subscription. type: str status: description: Returns subscription object created returned: on adding subscription successfully sample: '@Message.ExtendedInfo': - Message: The resource has been created successfully MessageArgs: [] MessageArgs@odata.count: 0 MessageId: Base.1.7.Created RelatedProperties: [] RelatedProperties@odata.count: 0 Resolution: None Severity: OK - Message: A new resource is successfully created. MessageArgs: [] MessageArgs@odata.count: 0 MessageId: IDRAC.2.2.SYS414 RelatedProperties: [] RelatedProperties@odata.count: 0 Resolution: No response action is required. Severity: Informational Actions: '#EventDestination.ResumeSubscription': target: /redfish/v1/EventService/Subscriptions/5d432f36-81f4-11eb-9dc0-2cea7ff7ff9a/Actions/EventDestination.ResumeSubscription Context: RedfishEvent DeliveryRetryPolicy: RetryForever Description: Event Subscription Details Destination: https://192.168.1.100:8188 EventFormatType: Event EventTypes: - Alert EventTypes@odata.count: 1 HttpHeaders: [] HttpHeaders@odata.count: 0 Id: 5d432f36-81f4-11eb-9dc0-2cea7ff7ff9a MetricReportDefinitions: [] MetricReportDefinitions@odata.count: 0 Name: EventSubscription 5d432f36-81f4-11eb-9dc0-2cea7ff7ff9a OriginResources: [] OriginResources@odata.count: 0 Protocol: Redfish Status: Health: OK HealthRollup: OK State: Enabled SubscriptionType: RedfishEvent type: dict