community.general.manageiq_alert_profiles (1.3.14) — module

Configuration of alert profiles for ManageIQ

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

Install collection

Install with ansible-galaxy collection install community.general:==1.3.14


Add to requirements.yml

  collections:
    - name: community.general
      version: 1.3.14

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
  • 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

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"
    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. defaults to None.
        type: str
      password:
        description:
        - ManageIQ password. C(MIQ_PASSWORD) env var if set. otherwise, required if no
          token is passed in.
        type: str
      token:
        description:
        - ManageIQ token. C(MIQ_TOKEN) env var if set. otherwise, required if no username
          or password is passed in.
        type: str
      url:
        description:
        - ManageIQ environment url. C(MIQ_URL) env var if set. otherwise, it is required
          to pass it.
        required: false
        type: str
      username:
        description:
        - ManageIQ username. C(MIQ_USERNAME) env var 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. defaults to
          True.
        type: bool
    type: dict