CiscoDevNet / ansible-dcnm

Apache License 2.0
47 stars 37 forks source link

dcnm_vrf should attach the vrf to switches when deploy is false #230

Closed dsx1123 closed 1 year ago

dsx1123 commented 1 year ago

Community Note

Ansible Version and collection version

ansible [core 2.12.2]
  config file = /root/.ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/virtualenv/ansible/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /root/virtualenv/ansible/bin/ansible
  python version = 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
  jinja version = 3.1.2
  libyaml = True

NDFC version

Affected module(s)

Ansible Playbook

# Copy-paste your anisble playbook here 
---
- name: vrf overridden
  hosts: ndfc2
  vars:
    fabric: fabric_stage
    vrf_config:
      - vrf_name: vrf_green
        vrf_id: 51011
        attach:
          - ip_address: 192.168.123.101
            deploy: false
          - ip_address: 192.168.123.102
            deploy: false
    - name: overridden vrfs
      cisco.dcnm.dcnm_vrf:
        fabric: "{{ fabric}}"
        state: overridden
        config: "{{ vrf_config }}"
      tags:
        - vrf
        - overlay

Debug Output

Expected Behavior

the VRF vrf_green should be attached to the switches list above, but status should be PENDING, means the config is not deployed to switches

Actual Behavior

Status of VRF is NA

Steps to Reproduce

References

praveenramoorthy commented 1 year ago

Fixed as part of #233