summaryrefslogtreecommitdiffstats
path: root/cyborg_enhancement/mitaka_version/cyborg/setup/roles/validate_api/tasks/main.yml
blob: c3188edeff6eb49385b13757f004afa9c8ab6329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---

- name: Check API status
  service:
    name: openstack-cyborg-api
    state: started
    enabled: yes
  become: true
  register: result

- name: Fail if API did not start
  fail: msg="Cyborg API did not start correctly!"
  when: result.status.ActiveState == "failed"

- name: Make a request to the cyborg API endpoint
  wait_for:
    host: localhost
    port: 6666
    state: started
    delay: 1
    timeout: 60