CiscoDevNet / ansible-dcnm

Apache License 2.0
45 stars 36 forks source link

dcnm_network should attach the network to switches without deploying when deploy=false #231

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

DCNM version

Affected module(s)

Ansible Playbook

# Copy-paste your anisble playbook here 
---
- name: network overridden
  hosts: ndfc2
  vars:
    fabric: fabric_stage
    net_config:
       - net_name: net1
         vrf_name: vrf_green
         net_id: 7005
         vlan_id: 150
         gw_ip_subnet: '192.168.30.1/24'
         attach:
           - ip_address: 192.168.123.101
             ports: [Ethernet1/13, Ethernet1/14]
             deploy: false
           - ip_address: 192.168.123.102
             ports: [Ethernet1/13, Ethernet1/14]
             deploy: false
  tasks:
    - name: overridden network
      cisco.dcnm.dcnm_network:
        fabric: "{{ fabric}}"
        state: overridden
        config: "{{ net_config }}"
      tags:
        - network
        - overlay

Debug Output

Expected Behavior

This is a similar issue as #230

Actual Behavior

Steps to Reproduce

References

praveenramoorthy commented 1 year ago

Fixed as part of #233