cyborg/setup/roles/validate_api/tasks/main.yml
jkilpatr 85ac496ff6 Cyborg deployment script
This deploys cyborg services across various hosts and sets them up
as boot time services configured to access the local rabbit and mysql
instances and then runs some validations to ensure
that everything started correctly.

This does not have any saftey for multi-controller setups yet, right now
if you hand the playbook 3 hosts under 'controller' it will deploy three
api endpoints and three agents. Which probably won't work right.

Change-Id: I79b6b1ce9bb6766d5e608c89504c4bbaeaba5599
2017-08-30 09:27:56 -04:00

22 lines
419 B
YAML

---
- 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