# ansible read\_csv help

**URL:** <https://forum.ansible.com/t/ansible-read-csv-help/33422>\
**Category:** Ansible Project\
**Created:** [July 17, 2020, 12:58am UTC](https://forum.ansible.com/t/ansible-read-csv-help/33422 "2020-07-17T00:58:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stack\_flow](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@stack\_flow](https://forum.ansible.com/u/stack_flow)\
**Post date:** [July 17, 2020, 12:58am UTC](https://forum.ansible.com/t/ansible-read-csv-help/33422/1 "2020-07-17T00:58:59Z")

</div>

Hello, below is my csv and yml file:

CVS:

tenant,tenant\_description  
tn01,tn01  
tn02,tn02  
tn03,tn03

YML:

---

<div class="post-metadata">

**Author:** ![stack\_flow](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@stack\_flow](https://forum.ansible.com/u/stack_flow)\
**Post date:** [July 18, 2020, 12:01am UTC](https://forum.ansible.com/t/ansible-read-csv-help/33422/2 "2020-07-18T00:01:44Z")

</div>

could someone help please.

---

<div class="post-metadata">

**Author:** ![Thomas\_Renzy](https://avatars.discourse-cdn.com/v4/letter/t/a9adbd/32.png) [@Thomas\_Renzy](https://forum.ansible.com/u/Thomas_Renzy)\
**Post date:** [July 18, 2020, 2:57am UTC](https://forum.ansible.com/t/ansible-read-csv-help/33422/3 "2020-07-18T02:57:48Z")

</div>

So I reviewed this and I think you need to make the following changes:

- name: MANAGE Tenant  
aci\_tenant:  
hostname: “{{ aci\_hostname }}”  
username: “{{ aci\_username }}”  
password: “{{ aci\_password }}”  
tenant: “{{ **item.tenant** }}”  
description: “{{ **item.description** }}”  
validate\_certs: false  
state: present  
loop:  
**- tenant: “{{ tenants.list.0.tenant }}”**  
**description “{{ tenants.list.0.tenant\_description }}”**  
**- tenant: “{{ tenants.list.1.tenant }}”**

**description “{{ tenants.list.1.tenant\_description }}”**

**- tenant: “{{ tenants.list.2.tenant }}”**  
**description “{{ tenants.list.2.tenant\_description }}”**

Hope this helps.

Thanks,  
Thomas
