02-27-2025 11:05 AM
any idea or where I can find out how to create vnic templates using ansible in interight?
I basically need vnic templates for ESX server
vnic0-mgmt
vnic1-mgmt
vnic2-vmotion
vnic3 - vmotion
vnic4 - VM
vnic5 - vm
thanks
02-28-2025 07:24 AM
any idea? i followed this repo but it does not crrate vnic templates
https://github.com/ucs-compute-solutions/FlashStack_IMM_Ansible
03-03-2025 01:30 PM
any idea whats wrong with this? i keeop getting an error
- name: "Configure vNIC Template"
vars:
api_info: &api_info_vnic
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
api_uri: "{{ api_uri | default(omit) }}"
validate_certs: "{{ validate_certs | default(omit) }}"
state: "{{ state | default(omit) }}"
cisco.intersight.intersight_rest_api:
<<: *api_info_vnic
resource_path: /vnic/VnicTemplates
query_params:
$filter: "Name eq '{{ name_of_vnic_template }}'"
api_body:
Name: "{{ name_of_vnic_template }}"
Description: "{{ description_of_vnic_template }}"
MacPool:
Moid: "{{ mac_pool_fi_a_details.api_response.Moid }}"
SwitchId: "A"
Organization:
Moid: "{{ intersight_org.api_response.Moid }}"
PolicyBucket:
- Moid: "{{ ethernet_network_group_policy_details.api_response.Moid }}"
ObjectType: "vnic.EthNetworkGroupPolicy"
- Moid: "{{ ethernet_network_control_policy_details.api_response.Moid }}"
ObjectType: "vnic.EthNetworkControlPolicy"
- Moid: "{{ ethernet_qos_policy_details.api_response.Moid }}"
ObjectType: "qos.Policy"
- Moid: "{{ ethernet_adapter_policy_details.api_response.Moid }}"
ObjectType: "vnic.EthAdapterPolicy"
03-04-2025 10:54 AM
any idea? I check and look like vnic template dont support policybucket.
I changed it to
- name: "Configure vNIC Template"
vars:
api_info: &api_info_vnic
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
api_uri: "{{ api_uri | default(omit) }}"
validate_certs: "{{ validate_certs | default(omit) }}"
state: "{{ state | default('present') }}"
cisco.intersight.intersight_rest_api:
<<: *api_info_vnic
resource_path: "/vnic/VnicTemplates"
query_params:
$filter: "Name eq '{{ name_of_vnic_template }}'"
api_body:
ClassId: "vnic.VnicTemplate"
Name: "{{ name_of_vnic_template }}"
Description: "{{ description_of_vnic_template }}"
SwitchId: "A"
EnableOverride: true
MacPool:
Moid: "{{ mac_pool_fi_a_details.api_response.Moid }}"
ClassId: "macpool.Pool"
Organization:
Moid: "{{ intersight_org.api_response.Moid }}"
ClassId: "organization.Organization"
FabricEthNetworkGroupPolicy:
Moid: "{{ ethernet_network_group_policy_details.api_response.Moid }}"
ClassId: "fabric.EthNetworkGroupPolicy"
FabricEthNetworkControlPolicy:
Moid: "{{ ethernet_network_control_policy_details.api_response.Moid }}"
ClassId: "fabric.EthNetworkControlPolicy"
EthQosPolicy:
Moid: "{{ ethernet_qos_policy_details.api_response.Moid }}"
ClassId: "vnic.EthQosPolicy"
EthAdapterPolicy:
Moid: "{{ ethernet_adapter_policy_details.api_response.Moid }}"
ClassId: "vnic.EthAdapterPolicy"
FailoverEnabled: false
Tags:
- Key: "configmode"
Value: "ansible"
- Key: "prefix"
Value: "{{ prefix }}"
but stil failing
03-04-2025 11:05 AM
03-04-2025 01:26 PM
Full example including vNIC derive now posted at https://github.com/CiscoDevNet/intersight-ansible/blob/main/playbooks/intersight_vnic_template.yml
03-13-2025 01:01 PM
hi
any idea how to atttach this to a lan connectivity policy?
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