summaryrefslogtreecommitdiffstats
path: root/apex/inventory/inventory.py
diff options
context:
space:
mode:
Diffstat (limited to 'apex/inventory/inventory.py')
-rw-r--r--apex/inventory/inventory.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/apex/inventory/inventory.py b/apex/inventory/inventory.py
index b5ffd2f..0546fe9 100644
--- a/apex/inventory/inventory.py
+++ b/apex/inventory/inventory.py
@@ -67,9 +67,12 @@ class Inventory(dict):
if ha and len(self['nodes']) < 5:
raise ApexInventoryException('You must provide at least 5 '
'nodes for HA deployment')
- elif len(self['nodes']) < 2:
- raise ApexInventoryException('You must provide at least 2 nodes '
+ elif len(self['nodes']) < 1:
+ raise ApexInventoryException('You must provide at least 1 node '
'for non-HA deployment')
+ elif list(self.get_node_counts())[0] < 1:
+ raise ApexInventoryException('You must provide at least 1 '
+ 'control node for deployment')
if virtual:
self['host-ip'] = '192.168.122.1'