Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require a Playbook to add a vlan into a vnic template which is under a sub organisation #135

Open
vivekanand552 opened this issue Oct 27, 2020 · 3 comments

Comments

@vivekanand552
Copy link

Hello Team,

I need a ansible playbook to add a vlan to a vnic template which is under a sub-organisation

I have a sub organisation under root called VONE-C and vnic template has been created under the VONE-C sub organisation, I now require to add the vlan to the vnic template under the VONE-C sub organisation.

I tried to assign the sub organisation under the org_dn = org-VONE-C but still the vlan didnt add to the correct vnic template.

Can someone assist with the correct playbook please.

Ansible version: 2.10.

Thanks and Regards
Vivekanand

@vivekanand552
Copy link
Author

Hello Can somebody provide a sample playbook for the above requirement please?

Regards
Vivekanand

1 similar comment
@vivekanand552
Copy link
Author

Hello Can somebody provide a sample playbook for the above requirement please?

Regards
Vivekanand

@bakrir
Copy link

bakrir commented Nov 20, 2020

Hi Vivekanand,

Have you had a look at the sample playbook in the ansible-ucs collection repo which (I believe) supersedes this repo:

https://github.com/CiscoDevNet/ansible-ucs/blob/master/playbooks/ucs_vnic_template.yml

If you are using a role, you should be able to just add your VLANs to the ucs_vnic_template/defaults/main.yml variables file. For example:

ucs_vnic_templates:
- name: vNIC0-A-B
  fabric: A-B
  descr: 
  template_type: updating-template
  mac_pool: MACA
  parent_mo_or_dn: org-root/org-VONE-C
  mtu: '1500'
  vlans_list:
  - name: default
    native: 'yes'
  - name: VLAN200
    native: 'no'

Please make sure the VLAN is created beforehand. :-)

I hope the above helps.

Rami

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants