03-13-2025 12:28 PM
I have following lan connectivity policy and want to know how to attach a vnic template to it
cisco.intersight.intersight_rest_api:
<<: *api_info_fc
resource_path: /vnic/EthIfs
query_params:
$filter: "Name eq '{{ name_of_fc_vnic_0 }}'"
api_body: {
"Name": "{{ name_of_fc_vnic_0 }}",
"MacAddressType": "POOL",
"MacPool": "{{ mac_pool_fi_a_details.api_response.Moid }}",
"Placement": {
"SwitchId": "A",
"AutoPciLink": true,
"AutoSlotId": true,
},
"Cdn": {
"Source": "vnic"
},
"FailoverEnabled": false,
"FabricEthNetworkGroupPolicy": [ "{{ management_network_group_policy.api_response.Moid }}" ],
"FabricEthNetworkControlPolicy": "{{ ethernet_network_control_policy.api_response.Moid }}",
"EthQosPolicy": "{{ ethernet_qos_policy.api_response.Moid }}",
"EthAdapterPolicy": "{{ ethernet_adapter_vmware_policy.api_response.Moid }}",
"StaticMacAddress": "",
"LanConnectivityPolicy": "{{ fc_lan_connectivity_policy.api_response.Moid }}",
"Order": 0
}
05-02-2025 09:42 AM
my lan connectivity included creating vnics. Then i have another playbook that created vnic templates. do i need to create another playbook to attach the vnic to the vnic template for last step?
05-02-2025 01:17 PM
where should i be looking under developer tools?
05-07-2025 08:35 AM
I've added an example of attaching an existing vNIC to a template at https://github.com/CiscoDevNet/intersight-ansible/blob/main/playbooks/intersight_attach_vnic_template.yml The bulk/Requests API is used for attach, and you can filter in a developer console on bulk to see any actions that use that resource.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide