Someone asked for this a while back before the modules were reorganized, but I’ve seen no mention since, so I’m guess it’s still not possible to create (or manipulate) an Elastic Network Interface (eni) on an EC2 instance yet. That being the case, since this is supported by boto (create_network_interface), is it possible for me to make my own calls via boto somehow? I’m not very deep into Ansible so perhaps this is a nonsensical question.
Unfortunately you wouldn’t be able to create the interface with this attribute. Boto doesn’t support it. You’d have to create the interface and then immediately modify it.
Unfortunately you wouldn’t be able to create the interface with this attribute. Boto doesn’t support it. You’d have to create the interface and then immediately modify it.
I assume you have referenced eni.interface.id because you’ve seen the example? Note the code above that which contains a register statement. This allows you to reference output from that command. See http://docs.ansible.com/playbooks_variables.html for more on that.
Once you’ve used that register command you can reference all the values of the ENI creation.
If you’re still having issues, post your playbook as it stands and any errors you’re getting.
The latest commit has added support for delete_on_termination and source_destination_check. Please test and let me know how it goes.
Can you please give a full example of attaching an interface and setting the delete_on_termination?
I assume you have referenced eni.interface.id because you’ve seen the example? Note the code above that which contains a register statement. This allows you to reference output from that command. See http://docs.ansible.com/playbooks_variables.html for more on that.
Once you’ve used that register command you can reference all the values of the ENI creation.
If you’re still having issues, post your playbook as it stands and any errors you’re getting.
I had two issues, solve one:
region parameter was missing, I set AWS_REGION to solve it.
Would it be nicer to have an explicit parameter for it, like ec2_tag have?
subnet_id was missing, and I cant find an elegant way to get. For me having the instance subnet as a default will solve this problem.