Hi all,

I have an existing manual process for creating an AMI from an EBS volume 
snapshot (note this is not creating an ami from an existing ec2 instance), 
which ultimately involves ec2-register (or ec2reg) from the AWS cli.  For 
example:

$ ec2reg -a x86_64 -b '/dev/sda1=snap-xxxxx,28:true:gp2' -n amiName -d 
'Description' --root-device=/dev/sda1 --virtualization-type hvm --region us-
west-2


I've now automated most of this in an Ansible playbook, including creating 
and writing the volume with the raw disk image created locally. While the 
'ec2_ami' module in 2.0 now supports the device_mapping property I don't 
see the ability to specify the architecture or virtualization type.  It 
looks like the boto API would support this with the ec2.register_image() 
method.  Would this be a worthwhile extension to the ec2_ami module (or has 
anyone already done this?)

Failing that, I suppose the alternative would be running 'ec2reg' locally 
in the context of the command module:

-name: AMI |Register AMI
 command:/opt/aws/bin/ec2reg-O <AWS key> -W <AWS secretkey> -n amiName -d 
'Description' --root-device=/dev/sda1 --virtualization-type hvm --region us-
west-2


Anything else I might be missing?

Thanks in advance!

    Chris


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/de8d44ae-670b-4e14-beee-bdc204e6c90e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to