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
- Set the Ivanti environment and API key name
- Retrieve Ivanti API credentials from Passwordstate
- Create a new incident in Ivanti with all required and optional fields
- Optionally link a configuration item (CI) to the incident
- 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 parameterssecurity,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
- Set Ivanti Environment
-
Determines the correct API key name for the environment
-
Get Ivanti API Key from Passwordstate
-
Retrieves API credentials for Ivanti from Passwordstate
-
Create Incident
- Uses the d09.ivanti_itsm.incident module to create a new incident with all provided parameters
-
Supports custom fields for security involvement
-
Link CI to Incident (Optional)
-
If a target CI is specified, links it to the new incident
-
Export Output
- 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: truefor 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