# Dynamic NIC list using cobbler profile

**URL:** <https://forum.ansible.com/t/dynamic-nic-list-using-cobbler-profile/18699>\
**Category:** Ansible Project\
**Created:** [July 7, 2015, 12:32pm UTC](https://forum.ansible.com/t/dynamic-nic-list-using-cobbler-profile/18699 "2015-07-07T12:32:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_Dobariya](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@Rakesh\_Dobariya](https://forum.ansible.com/u/Rakesh_Dobariya)\
**Post date:** [July 7, 2015, 12:32pm UTC](https://forum.ansible.com/t/dynamic-nic-list-using-cobbler-profile/18699/1 "2015-07-07T12:32:58Z")

</div>

Hi,  
I wish if someonce can help me with my issue…  
I am creating VM, but passing cobbler inventory using cobbler.py as below

ansible-playbook -i /etc/ansible/cobbler.py /etc/ansible/vm.yml --e {“hostname” : “esxi.server”,“guestname” : “vm.name”}

Below is snap for my vm.uml file

vm\_extra\_config:  
vcpu.hotadd: yes  
mem.hotadd: yes  
notes: This is a test VM  
vm\_disk:  
disk1:  
size\_gb: “{{ host.virt\_file\_size }}”  
type: thin  
datastore: datastore1  
vm\_nic:  
nic1:  
type: vmxnet3  
network: VM Network  
network\_type: standard  
macaddress: “{{ host.interfaces.eth0.mac\_address }}”

All variables are available…

I am stuck in configuring nic. My cobbler profiles have 3 nics so is there any way to loop for nic1, nic2 like wise???
