| 1 | --- |
| 2 | |
| 3 | - name: Check API status |
| 4 | service: |
| 5 | name: openstack-cyborg-api |
| 6 | state: started |
| 7 | enabled: yes |
| 8 | become: true |
| 9 | register: result |
| 10 | |
| 11 | - name: Fail if API did not start |
| 12 | fail: msg="Cyborg API did not start correctly!" |
| 13 | when: result.status.ActiveState == "failed" |
| 14 | |
| 15 | - name: Make a request to the cyborg API endpoint |
| 16 | wait_for: |
| 17 | host: localhost |
| 18 | port: 6666 |
| 19 | state: started |
| 20 | delay: 1 |
| 21 | timeout: 60 |