ansible - How to filter gathering facts inside a playbook ...
stackoverflow.com › questions › 34485286Dec 28, 2015 · Yes, that's possible, but not in the default behavior of gathering facts. Having set gather_facts to true simply calls the setup module as very first task of the play. This way you do not have any way to parameterize the setup module call. But you can disable the default behavior and call setup yourself with the filter parameter. - hosts: all sudo: yes gather_facts: False tasks: - setup: filter: ansible_*