ansible 循环判断http status

---
- name: Get Service status
  hosts: all
  tasks:
    - name: Get Service status 
      uri:
        url: "http://baidu.com/"
        follow_redirects: none
        method: GET
      register: _result
      until: _result.status == 200
      retries: 3
      delay: 3

你可能感兴趣的:(ansible 循环判断http status)