Skip to content

Issue: Deleting Workflow Job Templates (WJTs) using dispatch fails in infra.controller_configuration #22

@daleroux

Description

@daleroux

Environment

  • AAP Version: 2.4 (Issue also observed in 2.5 with aap_configuration )
  • Ansible Collection: infra.controller_configuration v2.11.0 (latest)

Issue Summary

When using filetree_create to export Workflow Job Templates (WJTs) and then using dispatch to recreate them, the process works as expected. However, attempting to delete the WJTs using dispatch fails, leaving behind an empty, non-functional Workflow still present in the AAP Controller.

Steps to Reproduce

  1. Export configuration using filetree_create with flatten_output: true:
    ansible-playbook filetree_create.yml -e '{output_path:/path/to/output, flatten_output:true}'
  2. Manually delete the workflow in the UI (this step is facultative)
  3. Use dispatch to recreate WJTs from the generated workflow_job_templates.yaml → Works as expected.
  4. Attempt to delete WJTs using dispatch → Workflow itself remains, though JTs are removed.

Root Cause Analysis

  • The exported workflow_job_templates.yaml sets state: "present" for all WJTs.
  • dispatch does not remove WJTs unless their state is explicitly set to "absent".
  • The documentation states that controller_state determines whether objects are created or deleted but does not mention that state must be manually modified for deletion.
  • Removing state from workflow_job_templates.yaml causes a playbook error.

Proposed Fix

  • filetree_create should either:
    1. Omit the state field for WJTs (aligning with how JTs are handled). <- Preferred method
    2. Document that state must be manually changed to "absent" for deletion.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions