aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
272 stars 197 forks source link

Bug(dhcp_provisioner): dhcp config will be overwritten in a multi dc setup #3812

Open kmueller68 opened 5 months ago

kmueller68 commented 5 months ago

Issue Summary

if you have a dual/multi dc setup with separate group_vars files per dc, the latest one will overwrite all previous configs.

for example like the AVD dual-dc-l3ls example.

Which component(s) of AVD impacted

dhcp_provisioner

How do you run AVD ?

Ansible CLI (with virtual-env or native python)

Steps to reproduce

group_vars/
DC1_FABRIC.yml
DC2_FABRIC.yml

and `fabric_group:` set to the overall fabric name.

- name: Build Switch configuration
  hosts: TOOLS
  connection: local
  gather_facts: false
  tasks:
    - name: Create dhcp configuration file
      ansible.builtin.import_role:
        name: arista.avd.dhcp_provisioner
      vars:
        ztp_network_summary: 10.73.1.0/24
        ztp_pool_start: 10.73.1.200
        ztp_pool_end: 10.73.1.210
        ztp_lease_time: 300
        fabric_group: 'FABRIC'
        ztp_mac_source: system      


### Relevant log output

_No response_

### Contributing Guide

- [X] I agree to follow this project's Code of Conduct
github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. The issue will be reviewed by a maintainer and may be closed