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

Inventory addition to fabric fails when default creds are not set #368

Open
pritispa opened this issue Feb 3, 2025 · 0 comments
Open

Inventory addition to fabric fails when default creds are not set #368

pritispa opened this issue Feb 3, 2025 · 0 comments

Comments

@pritispa
Copy link

pritispa commented Feb 3, 2025

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Ansible Version and collection version

Ansible core: 2.18.0
dcnm collection: 3.5.0

DCNM version

  • ND 3.2.1i/NDFC 12.2.2

Affected module(s)

  • dcnm_inventory

Ansible Playbook

Task:

- name: Add Switches to VXLAN Fabric
  cisco.dcnm.dcnm_inventory:
    fabric: "{{ vxlan_fabric_parameters.FABRIC_NAME }}"
    state: merged
    config: "{{ vxlan_switch_list }}"
  register: result

Vars:

vxlan_switch_list:
  - seed_ip: [IP_REMOVED]
    auth_proto: MD5
    max_hops: 0
    role: spine
    preserve_config: false
    user_name: admin
    password: "pwdremoved"
  - seed_ip: [IP_REMOVED]
    auth_proto: MD5
    max_hops: 0
    role: spine
    preserve_config: false
    user_name: admin
    password: "pwdremoved"
  - seed_ip: [IP_REMOVED]
    auth_proto: MD5
    max_hops: 0
    role: leaf
    preserve_config: false
    user_name: admin
    password: "pwdremoved"
  - seed_ip: [IP_REMOVED]
    auth_proto: MD5
    max_hops: 0
    role: leaf
    preserve_config: false
    user_name: admin
    password: "pwdremoved"
  - seed_ip: [IP_REMOVED]
    auth_proto: MD5
    max_hops: 0
    role: leaf
    preserve_config: false
    user_name: admin
    password: "pwdremoved"
  - seed_ip: [IP_REMOVED]
    auth_proto: MD5
    max_hops: 0
    role: leaf
    preserve_config: false
    user_name: admin
    password: "pwdremoved"

Debug Output

https://gist.github.com/pritispa/3cd01036e1d62493fcaa802d2b86d502

Expected Behavior

Without Default creds being set in NDFC, there are two options to handle this situation:

  1. Update module with option of discoveryCredForLan (GUI: Set individual device write credential) which should be set to true by default
  2. Without providing the option, always set this as individual device write creds, that is discoveryCredForLan=true always.

Actual Behavior

Because of no device write credentials (and no default creds set), devices get stuck in migration mode

Steps to Reproduce

Just try to add switches to inventory using this module, while having no default creds being set in NDFC GUI.

References

prabahal added a commit to prabahal/ansible-dcnm that referenced this issue Feb 5, 2025
Issue:
Switch addition to inventory fails if Default credentials are not set in NDFC.

Solution:
While discovering the switch adding the additional attribute credLan field is used.
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

1 participant