From 50d9589bc84af02b27880c3074e535ecb325eb5c Mon Sep 17 00:00:00 2001 From: Darren Worrall Date: Fri, 28 Aug 2015 08:21:20 +0100 Subject: [PATCH] Use module level validation for params --- cloud/cloudstack/cs_instance.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cloud/cloudstack/cs_instance.py b/cloud/cloudstack/cs_instance.py index dce853bba47..7aa1b1afe99 100644 --- a/cloud/cloudstack/cs_instance.py +++ b/cloud/cloudstack/cs_instance.py @@ -573,8 +573,6 @@ class AnsibleCloudStackInstance(AnsibleCloudStack): 'cpuSpeed': cpu_speed, 'memory': memory, }] - elif any([cpu, cpu_speed, memory]): - self.module.fail_json(msg='cpu, cpu_speed and memory must be used together') return res def deploy_instance(self): @@ -857,6 +855,7 @@ def main(): ), required_together = ( ['api_key', 'api_secret', 'api_url'], + ['cpu', 'cpu_speed', 'memory'], ), supports_check_mode=True )