From e66a1002ee6d20067e2a82f36c1361b484f2afe7 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Tue, 10 Oct 2017 14:58:09 -0400 Subject: [PATCH] fix equation for isolated instance capacity --- awx/plugins/isolated/awx_capacity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/plugins/isolated/awx_capacity.py b/awx/plugins/isolated/awx_capacity.py index cc69d02a3b..cf370fb56e 100644 --- a/awx/plugins/isolated/awx_capacity.py +++ b/awx/plugins/isolated/awx_capacity.py @@ -41,7 +41,8 @@ def main(): total_mem_value = out.split()[7] if int(total_mem_value) <= 2048: cap = 50 - cap = 50 + ((int(total_mem_value) / 1024) - 2) * 75 + else: + cap = 50 + ((int(total_mem_value) / 1024) - 2) * 75 # Module never results in a change module.exit_json(changed=False, capacity=cap, version=version)