* Added desired_capacity and vpc_zone_identifier to ec2_asg
* Use ec2_argument_spec() method and then remove unnecessary
declarations from argument_spec
* Remove AWS_REGIONS declaration
* Rename block_device_mappings to volumes to be consistent with ec2
* Remove all pep8 warnings except line length and continuation indent
* Use updated module_utils/ec2.py to add profile and security_token
support
* Remove mandatory arguments for delete to make launchconfig deletion
work
* Handle existing launch configurations better
* Improve output information
* Improve documentation
- The AMI unique identifier to be used for the group
required: true
required: false
key_name:
description:
- The SSH key name to be used for access to managed instances
required: true
required: false
security_groups:
description:
- A list of security groups into which instances should be found
required: true
required: false
aws_secret_key:
description:
- AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used.
@ -63,6 +63,18 @@ options:
- The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.
required: false
aliases: ['aws_region', 'ec2_region']
volumes:
description:
- a list of volume dicts, each containing device name and optionally ephemeral id or snapshot id. Size and type (and number of iops for io device type) must be specified for a new volume or a root volume, and may be passed for a snapshot volume. For any volume, a volume size less than 1 will be interpreted as a request not to create the volume.
required: false
default: null
aliases: []
user_data:
description:
- opaque blob of data which is made available to the ec2 instance
required: false
default: null
aliases: []
"""
EXAMPLES = '''
@ -81,6 +93,7 @@ from ansible.module_utils.basic import *
from ansible.module_utils.ec2 import *
try:
from boto.ec2.blockdevicemapping import BlockDeviceType, BlockDeviceMapping
import boto.ec2.autoscale
from boto.ec2.autoscale import LaunchConfiguration
from boto.exception import BotoServerError
@ -88,14 +101,26 @@ except ImportError:
print "failed=True msg='boto required for this module'"
sys.exit(1)
AWS_REGIONS = ['ap-northeast-1',
'ap-southeast-1',
'ap-southeast-2',
'eu-west-1',
'sa-east-1',
'us-east-1',
'us-west-1',
'us-west-2']
def create_block_device(module, volume):
# Not aware of a way to determine this programatically