Following up on my own question, it looks like Ansible PR #2029 <https://github.com/ansible/ansible-modules-core/pull/2029> will add this support.
On Saturday, December 19, 2015 at 7:57:07 PM UTC-8, [email protected] wrote: > > 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/4a03297a-db8c-496a-9cba-f951d7c3a778%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
