community.general.manageiq_alert_profiles (8.5.0) — module

Configuration of alert profiles for ManageIQ

Authors: Elad Alfassa (@elad661) <ealfassa@redhat.com>

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

The manageiq_alert_profiles module supports adding, updating and deleting alert profiles in ManageIQ.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add an alert profile to ManageIQ
  community.general.manageiq_alert_profiles:
    state: present
    name: Test profile
    resource_type: ContainerNode
    alerts:
      - Test Alert 01
      - Test Alert 02
    manageiq_connection:
      url: 'http://127.0.0.1:3000'
      username: 'admin'
      password: 'smartvm'
      validate_certs: false  # only do this when you trust the network!
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete an alert profile from ManageIQ
  community.general.manageiq_alert_profiles:
    state: absent
    name: Test profile
    manageiq_connection:
      url: 'http://127.0.0.1:3000'
      username: 'admin'
      password: 'smartvm'
      validate_certs: false  # only do this when you trust the network!

Inputs

    
name:
    description:
    - The unique alert profile name in ManageIQ.
    - Required when state is "absent" or "present".
    type: str

notes:
    description:
    - Optional notes for this profile
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - absent - alert profile should not exist,
    - present - alert profile should exist,
    type: str

alerts:
    description:
    - List of alert descriptions to assign to this profile.
    - Required if state is "present"
    elements: str
    type: list

resource_type:
    choices:
    - Vm
    - ContainerNode
    - MiqServer
    - Host
    - Storage
    - EmsCluster
    - ExtManagementSystem
    - MiddlewareServer
    description:
    - The resource type for the alert profile in ManageIQ. Required when state is "present".
    type: str

manageiq_connection:
    description:
    - ManageIQ connection configuration information.
    required: false
    suboptions:
      ca_cert:
        aliases:
        - ca_bundle_path
        description:
        - The path to a CA bundle file or directory with certificates.
        type: str
      password:
        description:
        - ManageIQ password. E(MIQ_PASSWORD) environment variable if set. Otherwise, required
          if no token is passed in.
        type: str
      token:
        description:
        - ManageIQ token. E(MIQ_TOKEN) environment variable if set. Otherwise, required
          if no username or password is passed in.
        type: str
      url:
        description:
        - ManageIQ environment URL. E(MIQ_URL) environment variable if set. Otherwise,
          it is required to pass it.
        required: false
        type: str
      username:
        description:
        - ManageIQ username. E(MIQ_USERNAME) environment variable if set. Otherwise, required
          if no token is passed in.
        type: str
      validate_certs:
        aliases:
        - verify_ssl
        default: true
        description:
        - Whether SSL certificates should be verified for HTTPS requests.
        type: bool
    type: dict