Hi,

I'm trying to iterate over a list, and for each iteration, I need to 
perform a do-until task. The task looks something like this -

- name: verify if the service is truly up     
  script: verify_service_status.sh {{ item.processName }}
  register: initiation_status
  with_items:
     - "{{ serviceInstanceList }}" 
  until: initiation_status.stdout.find("Running") != -1
  retries: 2
  delay: 2

- basically, the "items" are service identifiers and the "do until" task is 
continually trying to find out if they are up and running by means of a 
script. The issue I'm facing is with the "until" condition. I get a fatal 
error when this executes, stating - error while evaluating conditional: 
termination_status.sstdout.find("Stopped") != -1.

What will be the state of the registered variable for each iteration? How 
should I access the stdout part of the variable registered in each 
iteration?

Appreciate any help in this regard.

Regards
Abhishek


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a12c09a6-17b6-44b1-8d67-323a01fdb73d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to