Uploaded image for project: 'Ansible Automation Platform RFEs'
  1. Ansible Automation Platform RFEs
  2. AAPRFE-2474

Allow inventory limit in workflow jobs to accept a variable, enabling dynamic targeting of newly added hosts

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 2.5
    • aap-ui, controller
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      1. What is the nature and description of the request?
       
      In the current Ansible Automation Platform, the inventory limit field in workflow jobs only accepts static values (hostnames, groups, or patterns). It does not allow variables. This limitation prevents workflows from dynamically targeting newly created hosts in subsequent jobs.
       
      For example, in a workflow that: * Creates a VMware VM,

      • Syncs the inventory,
      • Executes a playbook on the newly added VM,

      it is currently impossible to limit the third job to only the newly added VM using a variable. If a variable is used, the workflow engine fails to resolve it, preventing dynamic host targeting.
       
      2. Why does the customer need this? (List the business requirements here)
        * Automation workflows often involve dynamic environments where hosts are created, updated, or destroyed during execution.

      • Customers need the ability to target only newly created or updated hosts in subsequent workflow jobs.
      • Without variable support in the inventory limit, playbooks either run against the entire inventory (inefficient and potentially disruptive) or require manual intervention to adjust limits.
      • Supporting variable-based inventory limits would:
        • Enable fully automated workflows from VM creation to configuration.
        • Improve efficiency by running playbooks only on relevant hosts.
        • Reduce risk of accidentally affecting unrelated hosts.
        • Allow dynamic, large-scale, multi-environment automation with minimal manual steps.

       
      3. How would you like to achieve this? (List the functional requirements here)
        * Extend the inventory limit field in workflow jobs to accept variables (e.g., {{ new_vm_hosts }}).

      • The variable should be resolvable at runtime, based on workflow context, previous job outputs, or registered host lists.
      • Maintain backward compatibility so existing static inventory limits continue to function as before.
      • Provide error handling if the variable resolves to no hosts or invalid hosts.

       
      4. List any affected known dependencies: Doc, UI etc..
        * Update UI, API, and documentation to reflect support for variable-based inventory limits.

      • Optionally, provide examples or templates demonstrating common dynamic workflow patterns (like targeting newly created VMs).

              Unassigned Unassigned
              rhn-support-bkramer1 Biljana Kramer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: