title: Ansible "until" response from Jira API
body: <p>Im trying to schedule an ansible playbook to re-index Jira, Id also like our dev to be able to kick this off ad-hoc is needed which they would be able to do via AWX, I am able to start a re-index but would like a notification when the re-index is complete.</p>
  
  <p>Here are my CLI commands and outputs:</p>
  
  <pre><code>[root@devjira02 ~]# curl -u admin:admin123! -X GET https://devjira.comapny.com/rest/api/2/reindex/progress
  {"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=12720","currentProgress":35,"currentSubTask":"Currently working on: Issue index","type":"BACKGROUND","submittedTime":"2019-04-01T14:23:50.971+0100","startTime":"2019-04-01T14:23:50.973+0100","success":false}
  
  [root@devjira02 ~]# curl -u admin:admin123! -X GET https://devjira.company.com/rest/api/2/reindex/progress
  {"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=12720","currentProgress":100,"type":"BACKGROUND","submittedTime":"2019-04-01T14:23:50.971+0100","startTime":"2019-04-01T14:23:50.973+0100","finishTime":"2019-04-01T14:24:33.922+0100","success":true}
  
  </code></pre>
  
  <p>My Playbook:</p>
  
  <pre><code>- name: DEV Jira Re-index
    become: true
    become_method: sudo
    become_user: root
  
    hosts: DEVJIRA02
    gather_facts: yes
  
    tasks:
  
      - name: Jira Re-index
        uri:
         url: https://devjira.company.com/rest/api/2/reindex?type=BACKGROUND_PREFERRED
         method: POST
         user: admin
         password: admin123!
         force_basic_auth: yes
         status_code: [201, 202]
  
      - name: Wait until re-index completes
        uri:
          url: https://devjira.company.com/rest/api/2/reindex/progress
          method: GET
          user: admin
          password: admin123!
          force_basic_auth: yes
          status_code: [201, 202]
          return_content: yes
          body_format: json
        register: result
        until: result.json.success == true
        retries: 180
        delay: 30
  
  </code></pre>
  
  <p>Id like the second part to retry until success == true at which point AWX can send a notification email. Running the playbook manually will start the re-index but the retry will just retry even though the re-index has finished</p>