Skip to content

Ivanti Incident Creation → Ivanti Automation

Overview

This automation playbook creates new incidents in Ivanti ITSM, integrating with Passwordstate for secure credential retrieval and supporting flexible incident parameters. It can also link configuration items (CIs) to incidents and export key output details for downstream processes.

High-Level Flow

  1. Set the Ivanti environment and API key name
  2. Retrieve Ivanti API credentials from Passwordstate
  3. Create a new incident in Ivanti with all required and optional fields
  4. Optionally link a configuration item (CI) to the incident
  5. Export incident output details for further use

Execution Flow

sequenceDiagram
    participant User as User/Trigger
    participant AAP as Ansible Automation
    participant PWS as Passwordstate
    participant Ivanti as Ivanti ITSM

    User->>AAP: Trigger incident creation playbook
    AAP->>AAP: Set Ivanti environment and API key
    AAP->>PWS: Get Ivanti API credentials
    PWS-->>AAP: API credentials
    AAP->>Ivanti: Create new incident
    Ivanti-->>AAP: Incident details
    alt CI specified
        AAP->>Ivanti: Link CI to incident
        Ivanti-->>AAP: CI linked
    end
    AAP->>AAP: Export incident output

Components

Ivanti ITSM

  • Incident Management: Handles creation of new incidents and linking of CIs
  • Output Export: Provides incident details for reporting or further automation

Passwordstate

  • Credential Storage: Securely stores Ivanti API credentials, retrieved at runtime

Playbook Logic

Variables

  • incident_owner: Owner of the incident (optional)
  • incident_service, incident_category, incident_sub_category, incident_source, incident_subject, incident_symptom, incident_task_owner_team, incident_impact, incident_urgency: Incident parameters
  • security, security_message: Security-related custom fields (optional)
  • target: Name of the CI to link (optional)
  • itsm_environment, pws_list_id: Environment and Passwordstate list selection

Main Steps

  1. Set Ivanti Environment
  2. Determines the correct API key name for the environment

  3. Get Ivanti API Key from Passwordstate

  4. Retrieves API credentials for Ivanti from Passwordstate

  5. Create Incident

  6. Uses the d09.ivanti_itsm.incident module to create a new incident with all provided parameters
  7. Supports custom fields for security involvement

  8. Link CI to Incident (Optional)

  9. If a target CI is specified, links it to the new incident

  10. Export Output

  11. Exports key incident details (number, URL, assignment ID, status message) for downstream use

Task Input & Output

Input Parameters

  • All incident fields (owner, service, category, etc.)
  • Security involvement and justification (optional)
  • Target CI to link (optional)
  • ITSM environment and Passwordstate list ID

Output Actions

  • On Success: Exports incident number, URL, assignment ID, and status message
  • On Failure: Errors are handled by Ansible and can be captured in logs or downstream steps

Error Handling & Idempotency

  • All credentials are handled with no_log: true for security
  • Linking CI is optional and errors are ignored to avoid blocking incident creation
  • Playbook is safe for repeated runs; each run creates a new incident

Benefits

  • Automates incident creation in Ivanti ITSM
  • Integrates securely with Passwordstate for credential management
  • Supports flexible incident parameters and custom fields
  • Optionally links CIs for better asset tracking
  • Exports output for reporting or further automation

Notes

  • The playbook is designed to be idempotent and safe for repeated runs
  • All sensitive operations are delegated to localhost for security
  • Custom fields support security-related tracking
  • Output export enables integration with other systems or workflows