arvindshmicrosoft commented on a change in pull request #317: Correctly retry 
ASF mirror listing task
URL: https://github.com/apache/fluo-muchos/pull/317#discussion_r374290592
 
 

 ##########
 File path: ansible/roles/accumulo/tasks/download.yml
 ##########
 @@ -19,10 +19,10 @@
   shell: curl -sk https://apache.org/mirrors.cgi?as_json | grep preferred | 
cut -d \" -f 4
   args:
     warn: no
+  register: apache_mirror
   retries: 10
   delay: 10
-  register: apache_mirror
-  failed_when: "'http' not in apache_mirror.stdout"
+  until: "'http' in apache_mirror.stdout"
 
 Review comment:
   Thank you for your inputs, @ctubbsii ! Based on the same I have incorporated 
jq to parse the JSON and also cleaned up the code to reference a shared task. I 
also tested and verified that things are work correctly in both happy path and 
failure path (i.e. the limited retries mechanism are working correctly).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to