mnecas.ovirt.ovirt_event_info (1.5.5) — module

This module can be used to retrieve information about one or more oVirt/RHV events

| "added in version" 1.0.0 of mnecas.ovirt"

Authors: Chris Keller (@nasx)

Install collection

Install with ansible-galaxy collection install mnecas.ovirt:==1.5.5


Add to requirements.yml

  collections:
    - name: mnecas.ovirt
      version: 1.5.5

Description

Retrieve information about one or more oVirt/RHV events.

This module was called C(ovirt_event_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(mnecas.ovirt.ovirt_event_info) module no longer returns C(ansible_facts)!


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Examples don't contain the auth parameter for simplicity,
# look at the ovirt_auth module to see how to reuse authentication.

- name: Return all events
  mnecas.ovirt.ovirt_event_info:
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Return the last 10 events
  mnecas.ovirt.ovirt_event_info:
    max: 10
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Return all events of type alert
  mnecas.ovirt.ovirt_event_info:
    search: "severity=alert"
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- ansible.builtin.debug:
    msg: "{{ result.ovirt_events }}"

Inputs

    
max:
    description:
    - Sets the maximum number of events to return. If not specified all the events are
      returned.
    required: false
    type: int

auth:
    description:
    - 'Dictionary with values needed to create HTTP/HTTPS connection to oVirt:'
    required: true
    suboptions:
      ca_file:
        description:
        - A PEM file containing the trusted CA certificates.
        - The certificate presented by the server will be verified using these CA certificates.
        - If C(ca_file) parameter is not set, system wide CA certificate store is used.
        - Default value is set by C(OVIRT_CAFILE) environment variable.
        type: str
      compress:
        default: true
        description: Flag indicating if compression is used for connection.
        type: bool
      headers:
        description:
        - Dictionary of HTTP headers to be added to each API call.
        type: dict
      hostname:
        description:
        - A string containing the hostname of the server, usually something like `I(server.example.com)`.
        - Default value is set by C(OVIRT_HOSTNAME) environment variable.
        - Either C(url) or C(hostname) is required.
        type: str
      insecure:
        default: false
        description:
        - A boolean flag that indicates if the server TLS certificate and host name should
          be checked.
        type: bool
      kerberos:
        description:
        - A boolean flag indicating if Kerberos authentication should be used instead
          of the default basic authentication.
        type: bool
      password:
        description:
        - The password of the user.
        - Default value is set by C(OVIRT_PASSWORD) environment variable.
        required: true
        type: str
      timeout:
        description: Number of seconds to wait for response.
        type: int
      token:
        description:
        - Token to be used instead of login with username/password.
        - Default value is set by C(OVIRT_TOKEN) environment variable.
        type: str
      url:
        description:
        - A string containing the API URL of the server, usually something like `I(https://server.example.com/ovirt-engine/api)`.
        - Default value is set by C(OVIRT_URL) environment variable.
        - Either C(url) or C(hostname) is required.
        type: str
      username:
        description:
        - The name of the user, something like I(admin@internal).
        - Default value is set by C(OVIRT_USERNAME) environment variable.
        required: true
        type: str
    type: dict

wait:
    default: true
    description:
    - If True wait for the response.
    required: false
    type: bool

from_:
    description:
    - Indicates the event index after which events should be returned. The indexes of
      events are strictly increasing, so when this parameter is used only the events with
      greater indexes will be returned.
    required: false
    type: int

query:
    description:
    - Additional URL query parameters.
    required: false
    type: str

search:
    description:
    - Search term which is accepted by the oVirt/RHV API.
    - 'For example to search for events of severity alert use the following pattern: severity=alert'
    required: false
    type: str

follows:
    description:
    - List of linked entities, which should be fetched along with the main entity.
    - This parameter replaces usage of C(fetch_nested) and C(nested_attributes).
    elements: str
    type: list
    version_added: 1.5.0
    version_added_collection: mnecas.ovirt

headers:
    description:
    - Additional HTTP headers.
    required: false
    type: str

fetch_nested:
    default: false
    description:
    - If I(yes) the module will fetch additional data from the API.
    - It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested
      attributes. Only the attributes of the current entity. User can configure to fetch
      other attributes of the nested entities by specifying C(nested_attributes).
    - This parameter is deprecated and replaced by C(follows).
    type: bool

case_sensitive:
    default: true
    description:
    - Indicates if the search performed using the search parameter should be performed
      taking case into account. The default value is true, which means that case is taken
      into account. If you want to search ignoring case set it to false.
    required: false
    type: bool

nested_attributes:
    description:
    - Specifies list of the attributes which should be fetched from the API.
    - This parameter apply only when C(fetch_nested) is I(true).
    - This parameter is deprecated and replaced by C(follows).
    elements: str
    type: list

Outputs

ovirt_events:
  description: 'List of dictionaries describing the events. Event attributes are mapped
    to dictionary keys. All event attributes can be found at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/event'
  returned: On success."
  type: list