Aggregates in network modules

Am I misunderstanding something with the way aggregates work with network modules on 2.4?

From the 2.4 ‘coming soon’ blog post describing aggregate resources, it mentions using them in playbooks to set state without prior knowledge of configuration. The example for the ios_vrf module says that the final configuration includes the specified VRFs and removes all other configurations, which sounds very useful.

When I try to use this with the ios_logging module, the logging destinations I listed i nthe aggregate get added to the configuration on the device, but extra pre-existing destinations are not removed. Looking more, I see ios_vrf has a ‘purge’ statement which ios_logging does not. Is that intentional, or is this still a feature under development and it simply hasn’t been written yet?

Unfortunately there is no way in IOS to reset or delete all logging targets simply - it requires looking at the running config and then explicitly removing each unwanted target. I guess I could write something to fetch the running config and iterate through lines that match the logging configuration to delete them, but using an aggregate to list all of the desired targets and have ansible remove all others seems far simpler…

ios_logging module does not support purge as of now, as you figured it out this is a feature under development.

Also, the way currently aggregate works is subject to change in future as there are ongoing discussions to
implement this using Ansible loops (something similar to with_*).
Stay tuned for more updates on this.

Regards,
Ganesh