# Is it possible to tag an ENI in ansible?

**URL:** <https://forum.ansible.com/t/is-it-possible-to-tag-an-eni-in-ansible/27212>\
**Category:** Ansible Project\
**Created:** [April 7, 2018, 3:55am UTC](https://forum.ansible.com/t/is-it-possible-to-tag-an-eni-in-ansible/27212 "2018-04-07T03:55:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl\_Auer](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Post date:** [April 7, 2018, 3:55am UTC](https://forum.ansible.com/t/is-it-possible-to-tag-an-eni-in-ansible/27212/1 "2018-04-07T03:55:20Z")

</div>

Not so much a question as a comment.

I would like to tag the ENIs I create with Ansible.

ENI’s certainly support tags, but the ec2\_eni module doesn’t have a “tags” attribute.

I was able to tag the interfaces using the ec2\_tag module, but it seems an odd omission not to be able to tag on creation.

- ec2\_tag:  
region: “{{ region }}”  
resource: ‘{{ item }}’  
state: present  
tags:  
Name: “{{ group\_name + ‘-’ + server\_name + ‘-primary-eni’ }}”  
GroupName: “{{ group\_name }}”  
with\_items: “{{ eni\_server\_primary\_facts.network\_interfaces[0].id }}”

Regards, K.
