Skip to content

[WIP] VRFs should never deploy when deploy flag is False #491

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mikewiebe
Copy link
Collaborator

@mikewiebe mikewiebe commented Aug 9, 2025

Initial Playbook

    - name: Configure VRFs
      cisco.dcnm.dcnm_vrf:
        fabric: nac-msd-fabric1
        state: deleted
        config:
        - vrf_name: NetAsCodeVrf1
          vrf_id: 150001
          vlan_id: 2001
          vrf_intf_desc: Configured by Ansible NetAsCode
          vrf_description: Configured by Ansible NetAsCode
          vrf_int_mtu: 9216
          loopback_route_tag: 12345
          max_bgp_paths: 1
          max_ibgp_paths: 2
          ipv6_linklocal_enable: True
          adv_host_routes: False
          adv_default_routes: True
          static_default_route: True
          disable_rt_auto: False
          netflow_enable: False
          no_rp: False
          trm_enable: False
          redist_direct_rmap: FABRIC-RMAP-REDIST-SUBNET
          attach:
            - ip_address: 10.15.34.13  ## Leaf1
            - ip_address: 10.15.34.14  ## Leaf2
            - ip_address: 10.15.34.15  ## Leaf3
            - ip_address: 10.15.34.16  ## Leaf4
          deploy: false
  • Run the playbook above

    • Initially the VRF will be created and attached to each leaf device but NOT deployed as expected
  • If the attach list is modified to remove or add attach devices there are cases where the VRF will be deployed even though the deploy flag is false which is not correct.

Fix for this issue should ensure the following

  • deploy flag is always honored
  • ensure all states will work (merged,replaced,overridden,deleted)
  • we should be able to attach and detach any devices in the list when deploy is false

@mikewiebe mikewiebe added the wip Work In Progress - DO NOT MERGE YET label Aug 9, 2025
@mikewiebe mikewiebe changed the title VRFs should never deploy when deploy flag is False [WIP] VRFs should never deploy when deploy flag is False Aug 9, 2025
@neiljohn-gh neiljohn-gh self-assigned this Aug 11, 2025
@neiljohn-gh
Copy link
Collaborator

added check to ensure payload {"vrfNames": ""} is not added to diff_deploy, as this would trigger deploy call in push_to_remote

@neiljohn-gh neiljohn-gh added ready for review PR is ready to be reviewed and removed wip Work In Progress - DO NOT MERGE YET labels Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants