# nxos\_bgp\_af removes all other advertised networks when adding a new network to address-family #42136

**URL:** <https://forum.ansible.com/t/nxos-bgp-af-removes-all-other-advertised-networks-when-adding-a-new-network-to-address-family-42136/27924>\
**Category:** Ansible Developer\
**Created:** [July 1, 2018, 12:55am UTC](https://forum.ansible.com/t/nxos-bgp-af-removes-all-other-advertised-networks-when-adding-a-new-network-to-address-family-42136/27924 "2018-07-01T00:55:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Flores](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@Gabriel\_Flores](https://forum.ansible.com/u/Gabriel_Flores)\
**Post date:** [July 1, 2018, 12:55am UTC](https://forum.ansible.com/t/nxos-bgp-af-removes-all-other-advertised-networks-when-adding-a-new-network-to-address-family-42136/27924/1 "2018-07-01T00:55:31Z")

</div>

I was running into an issue ([#42136](https://github.com/ansible/ansible/issues/42136)) where the networks you would try to add, would wipe out all other existing advertised networks. I believe it is safer to not automatically purge those networks and instead, have that as a option within the module itself. I have added **networks\_purge:** as a boolean type.

I have never contributed here and can’t seem to figure out how to make a pull request as it seems I need to be granted access. Either way, within the issue linked below, I added the updated version of the code **nxos\_bgp\_af.py** which does not touch the existing networks unless requested. I updated the sub-module within _ **nxos\_bgp\_af** _ to also have a **networks\_purge:** boolean type.

[https://github.com/ansible/ansible/issues/42136](https://github.com/ansible/ansible/issues/42136)

-hazelfire5
