ANSIBLE.EC2(3)

NAME
ec2 - create an instance in ec2, return instanceid

DESCRIPTION

creates ec2 instances and optionally waits for it to be 'running'. This module has a dependency on python-boto >= 2.5

OPTIONS

count
    number of instances to launch (default: yes

ec2_access_key
    ec2 access key

ec2_secret_key
    ec2 secret key

ec2_url
    url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints)

group
    security group to use with the instance

group_id
    security group id to use with the instance(Added in Ansible version 1.1.)

id  identifier for this instance or set of instances, so that the module will be idempotent with respect to EC2 instances.

image
    emi (or ami) to use for the instance(required)

instance_tags
    a hash/dictionary of tags to add to the new instance; '{"key":"value"}' and '{"key":"value","key":"value"}'(Added in Ansible version 1.0.)

instance_type
    instance type to use for the instance(required)

kernel
    kernel eki to use for the instance

key_name
    key pair to use on the instance(required)

monitor
    enable detailed monitoring (CloudWatch) for instance(Added in Ansible version 1.1.)

private_ip
    the private ip address to assign the instance (from the vpc subnet)(Added in Ansible version 1.2.)

ramdisk
    ramdisk eri to use for the instance

region
    the EC2 region to use(Added in Ansible version 1.2.)

user_data
    opaque blob of data which is made available to the ec2 instance(Added in Ansible version 0.9.)

vpc_subnet_id
    the subnet ID in which to launch the instance (VPC)(Added in Ansible version 1.1.)

wait
    wait for the instance to be in state 'running' before returning Choices: yes,no. (default: no)

wait_timeout
    how long before wait gives up, in seconds (default: 300)

zone
    availability zone in which to launch the instance(Added in Ansible version 1.2.)
    # Basic provisioning example
    local_action:
        module: ec2
        keypair: mykey
        instance_type: c1.medium
        image: emi-40603AD1
        wait: yes
        group: webserver
        count: 3
    # Advanced example with tagging and CloudWatch
    local_action:
        module: ec2
        keypair: mykey
        group: databases
        instance_type: m1.large
        image: ami-6e649707
        wait: yes
        wait_timeout: 500
        count: 5
        instance_tags: '{"db":"postgres"}' monitoring=yes'
    # VPC example
    local_action:
        module: ec2
        keypair: mykey
        group_id: sg-1dc53f72
        instance_type: m1.small
        image: ami-6e649707
        wait: yes
        vpc_subnet_id: subnet-29e63245'

AUTHOR
Seth Vidal, Tim Gerla, Lester Wade

SEE ALSO
ansible(1), http://ansible.github.com/modules.html#ec2