Add compute inventory precheck

With nova cells_v2 at least one compute node is required in
inventory to deploy nova.

This change add prechecks to ensure at least 1 compute is present.

Change-Id: I242518ad3bd149ad245515299301777f6b3bdd08
Closes-Bug: #1686410
This commit is contained in:
Eduardo Gonzalez 2017-04-26 15:57:05 +02:00
parent 0181d88e21
commit fee4eee0be

View File

@ -11,6 +11,11 @@
- placement_api - placement_api
register: container_facts register: container_facts
- name: Checking available compute nodes in inventory
fail:
msg: "At least 1 compute node required in inventory"
when: groups['compute'] | length < 1
- name: Checking free port for Nova API - name: Checking free port for Nova API
vars: vars:
nova_api: "{{ nova_services['nova-api'] }}" nova_api: "{{ nova_services['nova-api'] }}"