Hi Brian, If you are making changes in this area, then something that would be really helpful is providing more fine grained control over which facts are collected (currently gather_subset), and which are stored (filter). The gather_subset is quite coarse grained, and filter is only really usable if you are wanting to refresh one or more similarly named facts.
To provide some context, I have been spending a lot of time recently trying to improve the performance of Ansible at a moderate (~200) scale. As I'm sure you're aware, facts are a *huge* source of slowness, taking us from a baseline of 2 seconds to execute a task to 30+ seconds. In our particular case the target hosts are the controllers and hypervisors in an OpenStack cloud. On these machines there can be many virtual network interfaces, each creating a large fact. Our current solution looks like this: filter: "ansible_[!qt]*" Which removes the virtual interfaces that begin with q or t. We are lucky to not be filtering out any useful facts with this. A more flexible system such as a list of regexes would be a big help. Thanks, Mark On Fri, 4 Jun 2021 at 20:33, Brian Coca <bc...@redhat.com> wrote: > > For now module_utils/facts/ is best place to add these. > > In the long run, I hope to be able to make a bunch of 'facts modules' > and eventually deprecate 'setup.py'. > Many of the changes to fact gathering have been moving in this direction: > - gather_facts action is now responsible for the play's gather_facts > (normally still calls setup module) > - gather_facts supports configurable set of modules (network_os > resolution already built in) > - gather_facts can run multiple modules in parallel > > > > > -- > ---------- > Brian Coca > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-devel/CACVha7dRGV-gw86qO1JUsenWi9DxFRkKD6F_bLyC66SMf0WAxA%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/CAFHSqWoq9x8ERXh7Rszc4e3EgYoB3Gh%2BvLKAarspdTsHB2mDZQ%40mail.gmail.com.