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

Prevent VRF deploy when user deploy flag is false #375

Merged
merged 3 commits into from
Feb 27, 2025
Merged

Conversation

mikewiebe
Copy link
Collaborator

@mikewiebe mikewiebe commented Feb 25, 2025

Summary:

This fixes two problems:

  • There is a problem after creating a VRF when the deploy flag is set to false. The first time the VRF will be created and remain in pending state in NDFC but the second time the playbook is run the VRF will be deployed even though the flag is still set to false.
  • Fixes and idempotence issue with bgpPasswordKeyType. Updated to use the correct default value.

Sample Playbook:

    - name: Manage VRFs
      cisco.dcnm.dcnm_vrf:
        fabric: nac-msd1
        state: replaced
        config:
          - vrf_name: NaC-VRF01
            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
            disable_rt_auto: False
            redist_direct_rmap: FABRIC-RMAP-REDIST-SUBNET
            attach:
              - ip_address: 10.15.38.13
              - ip_address: 10.15.38.14
              - ip_address: 10.15.38.32
            deploy: false
          - vrf_name: NaC-VRF02
            vrf_id: 150002
            vlan_id: 2002
            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
            disable_rt_auto: False
            redist_direct_rmap: FABRIC-RMAP-REDIST-SUBNET
            attach:
              - ip_address: 10.15.38.13
              - ip_address: 10.15.38.14
              - ip_address: 10.15.38.32
            deploy: false

Run this playbook 2 times to see the issue without this fix.

@mikewiebe mikewiebe changed the title Never deploy if user flag is false Prevent VRF deploy when user deploy flag is false Feb 25, 2025
Copy link
Collaborator

@allenrobel allenrobel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikewiebe mikewiebe merged commit a7fae84 into develop Feb 27, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants