Ansible Version
Ansible Collection Versions
------------------ ----------
ansible.netcommon 7.1.0
ansible.posix 2.0.0
ansible.utils 5.1.2
cisco.dcnm 3.11.0-dev
cisco.nac_dc_vxlan 0.7.1-dev
community.general 10.1.0
Cisco Nexus Dashboard Version
Cisco NX-OS Version
Which role is this issue related to?
cisco.nac_dc_vxlan.validate
Which section of the data model is this issue related to?
vxlan.fabric
Expected Behavior
The validation rules should capture if switch definition is missing in a fabric vxlan.topology.switches before managing overlay (vrf/networks) at MSD level
Actual Behavior
The playbook fails with traceback
Ansible Playbook
Data Model
---
vxlan:
multisite:
overlay:
vrfs:
- name: Production
vrf_id: 50001
vlan_id: 2901
vrf_attach_group: all_sites
vrf_attach_groups:
- name: all_sites
switches:
- hostname: A-BGW_SuperSpine1
- hostname: A-BGW_SuperSpine2
- hostname: B-BGW_SuperSpine1
- hostname: B-BGW_SuperSpine2
Steps to Reproduce
Add non existing switch to attach group at MSD level
Relevant Debug Output
Traceback (most recent call last):
File "/Users/skaszlik/.pyenv/versions/3.10.14/envs/sac-ndfc/lib/python3.10/site-packages/ansible/plugins/action/template.py", line 152, in run
resultant = templar.do_template(template_data, preserve_trailing_newlines=True, escape_backslashes=False, overrides=overrides)
File "/Users/skaszlik/.pyenv/versions/3.10.14/envs/sac-ndfc/lib/python3.10/site-packages/ansible/template/__init__.py", line 1044, in do_template
raise AnsibleUndefinedVariable(e, orig_exc=e)
ansible.errors.AnsibleUndefinedVariable: 'dict object' has no attribute 'mgmt_ip_address'. 'dict object' has no attribute 'mgmt_ip_address'
fatal: [NAC-MSD -> localhost]: FAILED! => {
"changed": false,
"msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'mgmt_ip_address'. 'dict object' has no attribute 'mgmt_ip_address'"
}
Ansible Version
Ansible Collection Versions
Cisco Nexus Dashboard Version
.Cisco NX-OS Version
Which role is this issue related to?
cisco.nac_dc_vxlan.validate
Which section of the data model is this issue related to?
vxlan.fabric
Expected Behavior
Actual Behavior
Ansible Playbook
.Data Model
Steps to Reproduce
Relevant Debug Output