From 0dbf41e740c6b0fa25989b69ffcd14fba5a55848 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Thu, 9 Jul 2015 10:43:11 -0400 Subject: [PATCH] ensure password or ssh cert specified --- lib/ansible/modules/cloud/azure/azure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/azure/azure.py b/lib/ansible/modules/cloud/azure/azure.py index 45a4b1f78ff..e6a21b716e5 100644 --- a/lib/ansible/modules/cloud/azure/azure.py +++ b/lib/ansible/modules/cloud/azure/azure.py @@ -567,8 +567,8 @@ def main(): module.fail_json(msg='location parameter is required for new instance') if not module.params.get('storage_account'): module.fail_json(msg='storage_account parameter is required for new instance') - if not module.params.get('password'): - module.fail_json(msg='password parameter is required for new instance') + if not (module.params.get('password') or module.params.get('ssh_cert_path')): + module.fail_json(msg='password or ssh_cert_path parameter is required for new instance') (changed, public_dns_name, deployment) = create_virtual_machine(module, azure) module.exit_json(changed=changed, public_dns_name=public_dns_name, deployment=json.loads(json.dumps(deployment, default=lambda o: o.__dict__)))