Created
October 8, 2016 10:20
-
-
Save mikeifomin/67e233cd461331de16707ef59a07e372 to your computer and use it in GitHub Desktop.
Ansible wait_for http
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: wait_for http | |
command: "curl --silent {{ url }}" | |
register: result | |
until: result.stdout.find("200 OK") != -1 | |
retries: 60 | |
delay: 1 | |
changed_when: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And it can be run as a local action on the ansible-host, instead of the target host.
(Unless your network setup forbids ansible to reach the target url)