ANSIBLE.EC2_VOL(3)

NAME
ec2_vol - create and attach a volume, return volume id and device map

DESCRIPTION

creates an EBS volume and optionally attaches it to an instance. This module has a dependency on python-boto

OPTIONS

device_name
    device id to override device mapping. Assumes /dev/sdf for instance-store, /dev/sdb for EBS.

instance
    instance ID if you wish to attach the volume.

volume_size
    size of volume (in GB) to create.(required)

zone
    zone in which to create the volume, if unset uses the zone the instance is in (if set)."

EXAMPLES

Simple playbook example
local_action: ec2_vol instance=XXXXXX volume_size=5 device_name=sdd

Advanced - attaching multiple volumes to multiple instances
- name: Launch instances
  local_action: ec2 keypair=$keypair image=$image wait=yes count=3
  register: ec2
- name: Create volumes and attach
  local_action: ec2_vol instance=${item.id} volume_size=5
  with_items: ${ec2.instances}
  register: ec2_vol
None

AUTHOR
Lester Wade

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