From 8fb5a669442ee3814a7173e355a6b62a50406691 Mon Sep 17 00:00:00 2001 From: willthames Date: Tue, 14 Jan 2014 09:12:01 +1000 Subject: [PATCH] keypair is not absolutely required when creating ec2 instances --- library/cloud/ec2 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/cloud/ec2 b/library/cloud/ec2 index a565b0359a..7ec2c0c647 100644 --- a/library/cloud/ec2 +++ b/library/cloud/ec2 @@ -25,7 +25,7 @@ options: key_name: description: - key pair to use on the instance - required: true + required: false default: null aliases: ['keypair'] id: @@ -655,8 +655,6 @@ def main(): elif module.params.get('state') == 'present': # Changed is always set to true when provisioning new instances - if not module.params.get('key_name'): - module.fail_json(msg='key_name parameter is required for new instance') if not module.params.get('image'): module.fail_json(msg='image parameter is required for new instance') (instance_dict_array, new_instance_ids, changed) = create_instances(module, ec2)