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

[RFE] Ansible Core: Breaking out of a loop

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • 2.15
    • core
    • False
    • Hide

      None

      Show
      None
    • False

      Feature Overview

      Currently there is no way to break out of a loop in an Ansible task and this is critical for tasks that do need to iterate over the rest of the items when certain condition is met.

      Please refer to this issue in GitHub:
      https://github.com/ansible/ansible/pull/62151

      Define the value or impact to you or the business
      I've a task that requires me to check if a name is already in use and then try more names (by way of suffixing the base name with incrementing numbers) and I need this task to exit the loop once it finds an available name however, there is no such functionality in Ansible.

              shertel@redhat.com Sloane Hertel (Inactive)
              rhn-support-johenson Joshua Henson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: