ansible read_csv help

Hello, below is my csv and yml file:

CVS:

tenant,tenant_description
tn01,tn01
tn02,tn02
tn03,tn03

YML:

could someone help please.

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