Merge pull request #528 from lander2k2/password_required

TODO: check if instance already exists and this is not meant to create it but modify it, not supported by current code which always tries to create when 'present'.
This commit is contained in:
Brian Coca 2015-02-16 19:04:09 -05:00
commit 706be79f8f

View file

@ -456,6 +456,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')
(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__)))