@ -59,8 +59,8 @@ options:
required : false
required : false
security_groups :
security_groups :
description :
description :
- A list of security groups to apply to the instances . For VPC instances , specify security group IDs . For EC2 - Classic , specify either security
- A list of security groups to apply to the instances . Since version 2.4 you can specify either security group names or IDs or a mix . Previous to 2.4 ,
group names or IDs .
for VPC instances , specify security group IDs and for EC2 - Classic , specify either security group names or IDs .
required : false
required : false
volumes :
volumes :
description :
description :
@ -150,7 +150,8 @@ EXAMPLES = '''
import traceback
import traceback
from ansible . module_utils . basic import *
from ansible . module_utils . basic import *
from ansible . module_utils . ec2 import *
from ansible . module_utils . ec2 import ec2_argument_spec , ec2_connect , connect_to_aws , \
get_ec2_security_group_ids_from_names , get_aws_connection_info , AnsibleAWSError
try :
try :
from boto . ec2 . blockdevicemapping import BlockDeviceType , BlockDeviceMapping
from boto . ec2 . blockdevicemapping import BlockDeviceType , BlockDeviceMapping
@ -188,7 +189,10 @@ def create_launch_config(connection, module):
name = module . params . get ( ' name ' )
name = module . params . get ( ' name ' )
image_id = module . params . get ( ' image_id ' )
image_id = module . params . get ( ' image_id ' )
key_name = module . params . get ( ' key_name ' )
key_name = module . params . get ( ' key_name ' )
security_groups = module . params [ ' security_groups ' ]
try :
security_groups = get_ec2_security_group_ids_from_names ( module . params . get ( ' security_groups ' ) , ec2_connect ( module ) , vpc_id = None , boto3 = False )
except ValueError as e :
module . fail_json ( msg = str ( e ) )
user_data = module . params . get ( ' user_data ' )
user_data = module . params . get ( ' user_data ' )
user_data_path = module . params . get ( ' user_data_path ' )
user_data_path = module . params . get ( ' user_data_path ' )
volumes = module . params [ ' volumes ' ]
volumes = module . params [ ' volumes ' ]