Hi all, 
I'm trying to write a play I'm going to use as part of a windows system 
reboot "role". I plan to ping the Windows node's WinRM port using curl 
until it's responding.

If the system is down, the curl command will result in an error (exit code 
7).

Here's my play:
---
- name: Wait for windows reboot
  hosts: windows
  gather_facts: False
  tasks:
    - shell: 'curl -s -f -k <lots of stuff snipped away>'
      register: result2
      until: result2.stdout.find("http://www.w3.org/2003/05/soap-envelope";)
      retries: 10
      delay: 10
      delegate_to: 127.0.0.1
      ignore_errors: yes
      changed_when: False

I'd like it to ignore the error from curl, and just keep trying until it 
gets the correct soap header back. This play is failing on the first run if 
the node is down, and not retrying at all.

Anyone have any pointers on how to do this?

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/91ad4801-2604-491b-8a32-70e7b19e76e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to