EC2 - Delete on termination

473 views
Skip to first unread message

Carlos V

unread,
Nov 3, 2014, 4:55:11 AM11/3/14
to ansible...@googlegroups.com
Hello all,
I've been experimenting with the Ansible ec2 modules and I'm looking for a way to set the default volume created to have the "delete on termination" option set.

I found these volume options:

        volumes:
         
- device_name: /dev/sda1
            volume_size
: 512
            delete_on_termination
: true


but this seems to create a secondary volume and only that one is set to delete on termination. How can I do the same thing for the volume created with the instance? I don't want a secondary volume in this case.

Any help is appreciated, thanks!

Carlos V

unread,
Nov 5, 2014, 6:31:26 PM11/5/14
to ansible...@googlegroups.com
I actually found that by specifying the volume as /dev/sda instead of /dev/sda1, it enables the "delete_on_termination" flag for the primary volume.

James Cammarata

unread,
Nov 7, 2014, 10:47:37 AM11/7/14
to ansible...@googlegroups.com
Hi Carlos,

We actually had someone bring this up in IRC the other day (perhaps it was you?), asking if they could pursue adding the option to delete the volumes as a specific parameter for the module too, so be on the lookout for that. Beyond that, if you continue seeing any problems with this, please let us know.

Thanks!

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4bd82a37-a258-41e6-ac54-0115ffde62e7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Carlos V

unread,
Nov 7, 2014, 1:41:34 PM11/7/14
to ansible...@googlegroups.com
Hi James,
thanks for your reply. That actually was me!

I might still pursue adding the option as my first contribution as I'm trying to learn more about developing Ansible modules.
Reply all
Reply to author
Forward
0 new messages