Allow empty compute group when ironic is in use

If ironic is in use it is valid to have no (virtualised) compute nodes.

Change-Id: I100540fbfd81be5642c1d4ed135fcd500924a47e
Closes-Bug: #1701317
(cherry picked from commit d8a744e436)
This commit is contained in:
Mark Goddard 2017-06-29 17:26:22 +01:00
parent f9f5161766
commit 02e8034d77
1 changed files with 7 additions and 2 deletions

View File

@ -12,9 +12,14 @@
register: container_facts
- name: Checking available compute nodes in inventory
vars:
nova_compute_ironic: "{{ nova_services['nova-compute-ironic'] }}"
fail:
msg: "At least 1 compute node required in inventory"
when: groups['compute'] | length < 1
msg: >
At least 1 compute node required in inventory when ironic is disabled.
when:
- groups['compute'] | length < 1
- not nova_compute_ironic.enabled | bool
- name: Checking free port for Nova API
vars: