Skip to content

Feature: Allow until-loops on blocks or includes #46203

@dagwieers

Description

@dagwieers
SUMMARY

It would be quite useful if you can loop over more than one single tasks.

For instance if you have to poll a remote system for some progress and at the same time you want to push this progress to another backend, you could be doing:

- hosts: localhost
  tasks:
  - name: Start a long-running task
    uri:
      url: https://some-service/v1/put/new_job
      body: { foo: bar }
    register: new_job

  - until: job_status.json.message in ['Finished', 'Failed']
    block:
    - name: Get job status
      uri:
        url: https://some-service/v1/get/new_job
      register: job_status

    - name: Report job status to web service
      uri:
        url: https://backend-system/v1/post/job_status
        body: '{{ job_status.json }}'

There are many uses to this.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

Core

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects_2.14bot_closedfeatureThis issue/PR relates to a feature request.has_prThis issue has an associated PR.support:coreThis issue/PR relates to code supported by the Ansible Engineering Team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions